9

I have some .264 video files that I would like to view at half playback speed, without encoding them into a new file. I remember using ffplay to do this in the past, but it was some time ago, and I can't seem to be able to do it now. From lots of searching, this is what is supposed to work:

ffplay -f h264 -vf "setpts=2.0*PTS" filename.264

However this does not seem to change the playback speed at all. If I try:

ffplay -f h264 -filter:v "setpts=2.0*PTS" filename.264

I get an error message saying 'Failed to set value 'setpts=2.0*PTS' for option 'filter:v': Option not found'.

I specifically remember being able to do this before but cannot find any information about this now. Converting the videos is not really an option because the files are finicky and often cause an error halfway through converting, corrupting the whole file.

Is there a simple solution to this problem? Am I typing one of the commands wrongly?

1
  • 3
    ffplay -vf "setpts=2*PTS" file does change the speed to 2 times slow.
    – halfelf
    Nov 2, 2016 at 3:12

2 Answers 2

12

Raw H.264 streams do not have PTS values. They do have a framerate, so use

ffplay -f h264 file.264 -vf "setpts=2.0*N/FRAME_RATE/TB"
12

Just managed to do this with the not-very-well-documented -framerate option for an MJPEG stream, for anyone else who finds this post but isn't necessarily using H264.

ffplay udp://224.0.1.2:5004 -f mjpeg -framerate 30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.