[FFmpeg-user] Is a video generated with transitions different from a normal video?

iburman at compuscience.com iburman at compuscience.com
Sun Jun 20 15:28:23 EEST 2021


Let's say that I concatenated two videos using transitions (xfade). Does the
final video "know/remember" that part of it was generated through
transitions?

 

Here is what is going on:

 

I have two videos with 9 seconds each. I concatenate them using transition
with duration 4 and offset 7. So the final video has the transition part
between 7 and 11. 

 

The transition is created like this:

Ffmpeg -i v1.mp4 -i v2.mp4 -filter_complex
"xfade=transition=hlslice:duration=4:offset=7"  -pix_fmt yuv420p output.mp4

 

So far so good. The transition happens between 7 and 11 of the new video.

 

Now I want to create a new video by extracting the part that has the
transition, with an additional second on each side, so I want to cut from 6
to 12 and I use the following:

 

Ffmpeg -ss 6 -i input.mp4 -to 6 -c copy output.mp4

 

I expect a final video with 6 seconds, showing the transition starting at 1
and ending at 5. Instead I get a video with 9 seconds and the transition
seems to start at 5.

 

If I use exactly the same command (Ffmpeg -ss 6 -i input.mp4 -to 6 -c copy
output.mp4) on a video without transitions  I get what is expected, a video
with 6 seconds.

Why is that? Why is the video with transition different from a regular
video?

 

 

Thanks

 

 



More information about the ffmpeg-user mailing list