question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jumpcutting 12 hour video "jumpcutter.py in line 108"...

See original GitHub issue

Hi, So I tried this on a 12-hour video, and it failed on audio. It throws me an error saying:

Traceback (most recent call last):
  File "jumpcutter.py", line 108, in <module>
    sampleRate, audioData = wavfile.read(TEMP_FOLDER+"/audio.wav")
  File "C:\Python37\lib\site-packages\scipy\io\wavfile.py", line 264, in read
    is_big_endian, mmap)
  File "C:\Python37\lib\site-packages\scipy\io\wavfile.py", line 129, in _read_data_chunk
    data = numpy.frombuffer(fid.read(size), dtype=dtype)
ValueError: buffer size must be a multiple of element size.

Here is the full log: https://pastebin.com/5Re462TW. Now, I still have the cmd open and TEMP folder with ALL the 1.8 million frames. I need to edit your code, to just start extracting the audio, and continue. Can somebody help me with that? I started learning python only this year at my school.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
torsrexcommented, May 20, 2019

May I suggest splitting the video up into 1h cunks, running the script on those 1h chunks and then combining them together again?

Splitting can be done using:

ffmpeg -i input.mp4 -c copy -map 0 -segment_time 01:00:00 -f segment output%03d.mp4

Then run the jumpcutter script on each individual file. Then move the files to a separate folder. Run this

(for %i in (*.mp4) do @echo file '%i') > mylist.txt

Which will create a list of all the files. You might want to check the mylist.txt file to ensure the order is correct. Then run

ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

to combine the files back together, and you should be good!

0reactions
kubo6472commented, May 11, 2020

Hi, thanks for everything. The combination of re-encoding thru HandBrake, and obtaining a new jumpcutter.py along with all the extensions, pip, and python updates made it eventually working. I am so happy this project has got this active community.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Sound Of Silence: Speed Up Your Video Consumption
The command line tool takes a video and strips out the parts that are silent ... For an hour lecture that could add...
Read more >
ffmpeg: Removing parts with silence - Super User
I'm trying to remove parts of a video, where there is no (or little) audio. For ...
Read more >
REVIEW: Horrible Histories: The Movie - Rotten Romans (2019)
This 2019 British historical comedy, adapted from the best-selling 'Horrible Histories' children's stories by Terry Deary is directed by ...
Read more >
Untitled
World record for rubik's cube 2013, 2014-15 u of m football schedule, Black flapper dress size 12, Ryk spoor, Abdominal stretching pain pregnancy, ......
Read more >
Jump cut video app | Automatically Remove Silence
Automatically jump cut video to remove silence and awkward pauses from long video and podcasts. Rapidly edit any scene or word. World's fastest...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found