Frame dropping

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Frame dropping

mohammed bey ahmed khernache
Hello,
could you tell me how to enable "frame dropping" while decoding with ffmpeg
?

Thank you in advance
_______________________________________________
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: Frame dropping

Gabriel Balaich
>
> Hello,
> could you tell me how to enable "frame dropping" while decoding with ffmpeg
> ?
>

*"-vsync parameter*
*Video sync method. For compatibility reasons old values can be specified
as numbers. Newly added values will have to be specified as strings always.*

*0, passthrough*
*Each frame is passed with its timestamp from the demuxer to the muxer.*

*1, cfr*
*Frames will be duplicated and dropped to achieve exactly the requested
constant frame rate.*

*2, vfr*
*Frames are passed through with their timestamp or dropped so as to prevent
2 frames from having the same timestamp.*

*drop*
*As passthrough but destroys all timestamps, making the muxer generate
fresh timestamps based on frame-rate.*

*-1, auto*
*Chooses between 1 and 2 depending on muxer capabilities. This is the
default method."*

If I'm understanding you correctly -vsync should be what you are looking
for.
_______________________________________________
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: Frame dropping

mohammed bey ahmed khernache
Thank you for your reply.
The input video is encoded with hevc at 25 fps.
I tries this command:
ffmpeg -threads 1 -vsync drop -i <input_video> -f null /dev/null
I got this message in yellow:
Encoder did not produce proper pts, making some up

Unfortunately, I can not reach 25 fps while decoding, even with dropping
frames.
So I think that the option for "frame dropping" is not working !!



On Wed, May 9, 2018 at 5:11 PM, Gabriel Balaich <[hidden email]>
wrote:

> >
> > Hello,
> > could you tell me how to enable "frame dropping" while decoding with
> ffmpeg
> > ?
> >
>
> *"-vsync parameter*
> *Video sync method. For compatibility reasons old values can be specified
> as numbers. Newly added values will have to be specified as strings
> always.*
>
> *0, passthrough*
> *Each frame is passed with its timestamp from the demuxer to the muxer.*
>
> *1, cfr*
> *Frames will be duplicated and dropped to achieve exactly the requested
> constant frame rate.*
>
> *2, vfr*
> *Frames are passed through with their timestamp or dropped so as to prevent
> 2 frames from having the same timestamp.*
>
> *drop*
> *As passthrough but destroys all timestamps, making the muxer generate
> fresh timestamps based on frame-rate.*
>
> *-1, auto*
> *Chooses between 1 and 2 depending on muxer capabilities. This is the
> default method."*
>
> If I'm understanding you correctly -vsync should be what you are looking
> for.
> _______________________________________________
> 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".
_______________________________________________
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: Frame dropping

Gabriel Balaich
>
> Unfortunately, I can not reach 25 fps while decoding, even with dropping
> frames.
> So I think that the option for "frame dropping" is not working !!
>

-vsync should be listed after the input, if you are looking for a constant
25fps try this:

 ffmpeg -threads 1 -framerate 25 -i <input_video> -vsync 1 -f null /dev/null
_______________________________________________
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: Frame dropping

Carl Eugen Hoyos-2
In reply to this post by mohammed bey ahmed khernache
2018-05-09 17:53 GMT+02:00, mohammed bey ahmed khernache:

> Thank you for your reply.
> The input video is encoded with hevc at 25 fps.
> I tries this command:
> ffmpeg -threads 1 -vsync drop -i <input_video> -f null /dev/null
> I got this message in yellow:
> Encoder did not produce proper pts, making some up
>
> Unfortunately, I can not reach 25 fps while decoding, even
> with dropping frames.
> So I think that the option for "frame dropping" is not working !!

The option vsync allows to duplicate / drop decoded frames to
maintain A/V sync, it is not related to the decoding speed.
Use "-skip_loop_filter all" to get some speed-up without
noticeable visual effect, use "-skip_frame noref" in addition to
get significant speed-up for some videos, feel free to also try
"-skip_frame bidir" (can cause artefacts iirc) and
"-skip_frame nokey" (which skips nearly all frames).

Please remember not to top-post here, Carl Eugen

PS: vsync is neither an input nor an output option, it is a
global option.
_______________________________________________
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: Frame dropping

Carl Eugen Hoyos-2
2018-05-09 19:51 GMT+02:00, Carl Eugen Hoyos <[hidden email]>:

> 2018-05-09 17:53 GMT+02:00, mohammed bey ahmed khernache:
>> Thank you for your reply.
>> The input video is encoded with hevc at 25 fps.
>> I tries this command:
>> ffmpeg -threads 1 -vsync drop -i <input_video> -f null /dev/null
>> I got this message in yellow:
>> Encoder did not produce proper pts, making some up
>>
>> Unfortunately, I can not reach 25 fps while decoding, even
>> with dropping frames.
>> So I think that the option for "frame dropping" is not working !!
>
> The option vsync allows to duplicate / drop decoded frames to
> maintain A/V sync, it is not related to the decoding speed.
> Use "-skip_loop_filter all" to get some speed-up without
> noticeable visual effect, use "-skip_frame noref" in addition to
> get significant speed-up for some videos, feel free to also try
> "-skip_frame bidir" (can cause artefacts iirc) and
> "-skip_frame nokey" (which skips nearly all frames).
>
> Please remember not to top-post here, Carl Eugen
>
> PS: vsync is neither an input nor an output option, it is a
> global option.
>
_______________________________________________
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: Frame dropping

Gabriel Balaich
In reply to this post by Carl Eugen Hoyos-2
>
> PS: vsync is neither an input nor an output option, it is a
> global option.


Good to know.
_______________________________________________
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: Frame dropping

mohammed bey ahmed khernache
Thank you very much for your help.



On Wed, May 9, 2018 at 8:21 PM, Gabriel Balaich <[hidden email]>
wrote:

> >
> > PS: vsync is neither an input nor an output option, it is a
> > global option.
>
>
> Good to know.
> _______________________________________________
> 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".
>
_______________________________________________
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".