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.

frozen seconds in beginning of subclip using ffmpeg_extract_subclip()

See original GitHub issue

Hi everyone,

not sure if this is a bug, however I have an issue here:

The docs of ffmpeg state, that -ss should be specified before -i, at least when input seeking.

But I think ffmpeg_extract_subclip(), specifies it after -i. That is at least what causes trouble when I call ffmpeg_extract_subclip()

For myself:

~\AppData\Local\imageio\ffmpeg\ffmpeg-win32-v3.2.4.exe -y -i raw\pt01c.avi -ss 33.00 -t 40.00 -vcodec copy -acodec copy corridor\pt01-corridor.avi

leads to a frozen video sequence of 2-6 seconds in the beginning of the video with sound playing.

Whereas

C:\Users\jog54yy\AppData\Local\imageio\ffmpeg\ffmpeg-win32-v3.2.4.exe -y  -ss 33.00 -i raw\pt01c.avi  -t 40.00 -vcodec copy -acodec copy corridor\pt01-corridor.avi

works as expected.

Is there any thing that I am missing? Is that how it is thought to be? Is there a way to specifiy the order of specification of -iand -ss?

Edit: Looks like Issue #508 but this did not help.

Best Jonas


Here’s the rest:

Expected Behavior

No frozen seconds before video starts playing.

Actual Behavior

ffmpeg_extract_subclip() produces frozen seconds before video starts playing, sound is good form the beginning. However, couldn’t test for synchrony (That is what other report as well, when specifing it the wrong way).

Steps to Reproduce the Problem

see above

Specifications

  • Python Version: 3.7.0
  • Moviepy Version: 0.2.3.5
  • Platform Name: Windows
  • Platform Version: Windwos 10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
DallasHoelschercommented, Mar 12, 2019

I know this is closed, but is it possible this issue is still happening with concatenate_videoclips. My clips where I use ffmpeg_extract_subclip() are creating the clips correctly, with no pause. When I concatenate the clips together in the end though the very first clip has a 5 second pause with no audio or video playing.

2reactions
Zulkocommented, Mar 4, 2019

@gpotter2 I merged #848. Sorry for being slow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - MoviePy - Subclip extraction broken?
Each clip (after 5 seconds) which should then switch to a different clip will instead freeze until the 9-10 seconds duration of the...
Read more >
How to Cut Video Using FFmpeg in 3 Easy Ways (Extract ...
The first is to specify the start and end times for the section you want to extract. For example, to extract the first...
Read more >
Cut video freezes for first 8 seconds - ffmpeg
I tried cutting my video using ffmpeg with this command: ... The only problem is the final video starts at second 8. The...
Read more >
CHANGELOG.md · Gitee 极速下载/moviepy - Gitee.com
New pix_fmt parameter in VideoFileClip , VideoClip.write_videofile() ... frozen seconds in beginning of subclip using ffmpeg_extract_subclip() #847 ...
Read more >
Extract subvideos from a longer video : r/learnpython
I'm facing a very important problem... and it is that some videos it extract are just black frames (for like 5 seconds), or...
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