Best method to encode with video priority

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

Best method to encode with video priority

Gabriele Greco-2
I guys,

I was wandering what are the correct ffmpeg options to encode a video
giving priority to video (i.e. never dropping a frame) in case of damaged
files with missing video frames and/or missing audio blocks.

Specifically I'd like to:

- add silence if there are video frames with timestamp for which there is
no audio
- replicate frames if there is an audio block with no matching video frames.

Looking at the ffmpeg documentation it seems that: -vsync and -async are
the options I need to work with to achieve this.

So I suppose I have to add to my encoding string:

-vsync 1

... I read a few stack overflow post suggesting also to use -async 1, but I
read in the documentation that it's a deprecated option and I fear to have
A/V sync problems with it since it will check only timestamp at the
beginning

--
Bye,
 Gabry
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Best method to encode with video priority

Carl Eugen Hoyos-2
2018-12-10 12:18 GMT+01:00, Gabriele Greco <[hidden email]>:

> I guys,
>
> I was wandering what are the correct ffmpeg options to encode a video
> giving priority to video (i.e. never dropping a frame) in case of damaged
> files with missing video frames and/or missing audio blocks.
>
> Specifically I'd like to:
>
> - add silence if there are video frames with timestamp for which there is
> no audio

-async 1 (the console output explains the option)

> - replicate frames if there is an audio block with no matching video frames.

-vsync cfr may be what you want but this description doesn't sound
correct.

> Looking at the ffmpeg documentation it seems that: -vsync and -async are
> the options I need to work with to achieve this.
>
> So I suppose I have to add to my encoding string:
>
> -vsync 1

> ... I read a few stack overflow post suggesting also to use -async 1, but I
> read in the documentation that it's a deprecated option and I fear to have
> A/V sync problems with it since it will check only timestamp at the
> beginning

That sound's wrong.

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

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