Moviepy: frozen seconds in beginning of subclip using ffmpeg_extract_subclip()

Created on 6 Sep 2018  路  9Comments  路  Source: Zulko/moviepy

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
3rd-party bug video

Most helpful comment

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.

All 9 comments

You may be right. There is no way to choose the order of -i nd -ss in moviepy, but if one works and the other not, then its a bug and needs a PR. I am too busy to test it unfortunately, but I think we can trust you on this.

I can confirm the fix is correct. There鈥檚 also
https://stackoverflow.com/a/33188399/5459467 which points in the same direction.

@Zulko very sorry to bother, but it would be very cool if you could merge that 馃槃

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

@Zulko Thanks a lot for your quick response. You should be able to close https://github.com/Zulko/moviepy/issues/508, https://github.com/Zulko/moviepy/pull/579 and this issue now

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.

what do i need when i want this fix? currently i installed it with pip and get version 1.0.0 from end of february.

The commit is 8 months old, but was merged 2 moths ago. Therefore it's not in 1.0. You need to download and install the master branch

@DallasHoelscher still having this issue now mid-2020, super frustrating. It's happened to me out of thin air.

@halesyy Did you have a look at what @gpotter2 said to the previous commenter? I.e. was your issue also related to your using version 1.0? Otherwise we could reopen the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Deng-deng-deng-deng picture Deng-deng-deng-deng  路  3Comments

arianaa30 picture arianaa30  路  4Comments

bobozar picture bobozar  路  4Comments

PyB1l picture PyB1l  路  3Comments

Netherdrake picture Netherdrake  路  5Comments