diff --git a/998d45b0-b0a0-4111-9655-e6e58920bc36TEMP_MPY_wvf_snd.mp3 b/998d45b0-b0a0-4111-9655-e6e58920bc36TEMP_MPY_wvf_snd.mp3 deleted file mode 100644 index fbaabf2..0000000 Binary files a/998d45b0-b0a0-4111-9655-e6e58920bc36TEMP_MPY_wvf_snd.mp3 and /dev/null differ diff --git a/d23f6b79-19b6-4037-bcb2-eb1188f753b6TEMP_MPY_wvf_snd.mp3 b/d23f6b79-19b6-4037-bcb2-eb1188f753b6TEMP_MPY_wvf_snd.mp3 deleted file mode 100644 index f6b9212..0000000 Binary files a/d23f6b79-19b6-4037-bcb2-eb1188f753b6TEMP_MPY_wvf_snd.mp3 and /dev/null differ diff --git a/static/js/generate-timeline.js b/static/js/generate-timeline.js index a931c3a..3251f5d 100755 --- a/static/js/generate-timeline.js +++ b/static/js/generate-timeline.js @@ -87,12 +87,12 @@ function cuttingMode(){ function startCut(){ console.log(timelineTimestamps["timestamps"]); timelineTimestamps["timestamps"] = []; - timelineTimestamps["timestamps"].push([video.currentTime.toString()]); + timelineTimestamps["timestamps"].push([video.currentTime]); } function endCut(){ - timelineTimestamps["timestamps"][0].push(video.currentTime.toString()); + timelineTimestamps["timestamps"][0].push(video.currentTime); cutVideo(id, timelineTimestamps); cutButton.style.display = "flex"; diff --git a/transcription/views.py b/transcription/views.py index ec43195..e805c5e 100644 --- a/transcription/views.py +++ b/transcription/views.py @@ -258,10 +258,16 @@ def cut_files(request): # Iterate over each cut: for cut in cuts: - cut = [eval(i) for i in cut] print(f"Current timestamp: {cut}") - clip = clip.cutout(cut[0] - total_removed, cut[1] - total_removed) + # clip = clip.cutout(cut[0] - total_removed, cut[1] - total_removed) + + duration = clip.duration + + first_clip = clip.subclip(0, cut[0] - total_removed) + second_clip = clip.subclip(cut[1] - total_removed, duration) + + clip = moviepy.editor.concatenate_videoclips([first_clip, second_clip]) total_removed += cut[1] - cut[0]