First 10 seconds don't work well

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

First 10 seconds don't work well

FFmpeg-users mailing list
Hello,

I noticed an "error" on ffmpeg.
When I use it to cut movies, or to extract parts of a movie, the video of the cut piece reproduces the first 10 seconds only audio, after which part audio and video synchronized. I did several tests on different types of files. I give an example to be more precise:
ffmpeg -i input.mp4 -ss 60 -to 600 -c copy output.mp4.

output.mp4 first 10 seconds is not visible, but the audio yes. After about 10 seconds of output.mp4, both are present. It's not dependent of output.mp4 lenght or duration.
How do you solve this problem?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: First 10 seconds don't work well

kumowoon1025
Hello,

> I give an example to be more precise:
> ffmpeg -i input.mp4 -ss 60 -to 600 -c copy output.mp4.
Thanks for the example but it is lacking if you are going for precision. The console output has far more useful information, you should post that also.

> output.mp4 first 10 seconds is not visible, but the audio yes. After about 10 seconds of output.mp4, both are present. It's not dependent of output.mp4 lenght or duration.
I’m thinking it would be dependent of the start point you choose, with there being a certain point every ~20 seconds that you can seek to in the video.

You can try putting the -ss argument before the input to see if it provides the behavior you are looking for.

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: First 10 seconds don't work well

FFmpeg-users mailing list
Ok, I can try re-write position of command's parameter.Thanks :)
   Il venerdì 27 marzo 2020, 13:07:37 CET, Ted Park <[hidden email]> ha scritto:  
 
 Hello,

> I give an example to be more precise:
> ffmpeg -i input.mp4 -ss 60 -to 600 -c copy output.mp4.
Thanks for the example but it is lacking if you are going for precision. The console output has far more useful information, you should post that also.

> output.mp4 first 10 seconds is not visible, but the audio yes. After about 10 seconds of output.mp4, both are present. It's not dependent of output.mp4 lenght or duration.
I’m thinking it would be dependent of the start point you choose, with there being a certain point every ~20 seconds that you can seek to in the video.

You can try putting the -ss argument before the input to see if it provides the behavior you are looking for.

Regards,
Ted Park

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".  
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: First 10 seconds don't work well

Carl Eugen Hoyos-2
In reply to this post by FFmpeg-users mailing list
Am Fr., 27. März 2020 um 13:00 Uhr schrieb Resh via ffmpeg-user
<[hidden email]>:

> I noticed an "error" on ffmpeg.
> When I use it to cut movies, or to extract parts of a movie, the video of the cut
> piece reproduces the first 10 seconds only audio, after which part audio and
> video synchronized. I did several tests on different types of files.

You should have added that this depends on the player, ffplay should
work better than MPlayer for this specific case.

> I give an example to be more precise:
> ffmpeg -i input.mp4 -ss 60 -to 600 -c copy output.mp4.
>
> output.mp4 first 10 seconds is not visible, but the audio yes. After about 10

"Not visible" is of course the ideal outcome, I would say it gets problematic
only if the player starts playing audio and video and some time passes until
A/V sync is restored.
(Theoretically, there should be a player that skips the first seconds of audio.)

> seconds of output.mp4, both are present. It's not dependent of output.mp4
> lenght or duration.

> How do you solve this problem?

By re-encoding or choosing a value for -ss that closely aligns with a keyframe.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".