ffplay - change playback speed without re-encoding
Asked Answered
D

2

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?

Depurative answered 2/11, 2016 at 0:39 Comment(1)
ffplay -vf "setpts=2*PTS" file does change the speed to 2 times slow.Lemmon
M
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"
Mcmath answered 2/11, 2016 at 6:52 Comment(0)
A
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
Amphimixis answered 18/11, 2017 at 1:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.