Answers.Body: <p>At the very least, you are limited by the speed of the video decoder. But ffplay does seem to have some barrier to speed increase.</p>
  
  <p>For now, a workaround is to pipe from ffmpeg</p>
  
  <pre><code>ffmpeg -i in -an -vf setpts=PTS/60 -f yuv4mpegpipe - | ffplay -
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-15T16:53:27.233Z
Answers.LastActivityDate: 2019-01-15T16:53:27.233Z
Answers.UserDisplayName: Gyan
Answers.Body: <p>Example:</p>
  <pre><code>ffplay -f v4l2 -framerate 15 /dev/video4
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-11-28T11:54:19.773Z
Answers.LastActivityDate: 2024-11-28T11:54:19.773Z
Answers.UserDisplayName: Rexcirus
Body: <p>If I have a video, say an mkv with h.264 codec @ 25 fps. Can I play it in ffplay with a different fps, say 30fps?</p>
  
  <p>I know if the video was in still images, ffplay lets you assign a -framerate 30. But the -framerate and -r commands don't seem to function given my input is a video to begin with. I tried finding more information in the documentation and online, but I only found references to changing the fps when I have still image formats.</p>
  
  <p>Is the solution to use <code>ffplay -vf "setpts=0.5*PTS" -i input</code>to simply modify the speed of playback? I was curious about the PTS value and how to confirm what that is and how it changed my command if I have a weird framerate like 24.4444534634. Cause the generic is listed as 0.5 equating to 2x faster, and 2.0 equating to 0.5x slower. I find this doesn't addup though, especially when you get to higher values like 60x speed, etc. i.e. <code>ffplay -vf "setpts=1/60*PTS" -i input</code> This is outputting a speed the exact the same as 1/100000000000 and etc for many values. Is this a case of my pc not being able to generate the output within the presets of the system fast enough? Or just the weird fps of my footage is doing something? Or I need to confirm the PTS value and do the calculation properly for the specific video in question?</p>
  
Tags: <ffmpeg>
Title: Changing the fps of playback in ffplay
UserDisplayName: kite
ThreadText: # Changing the fps of playback in ffplay
  
  (Asked by: username_0 on 2019-01-15)
  
  If I have a video, say an mkv with h.264 codec @ 25 fps. Can I play it in ffplay with a different fps, say 30fps?
  
  I know if the video was in still images, ffplay lets you assign a -framerate 30. But the -framerate and -r commands don't seem to function given my input is a video to begin with. I tried finding more information in the documentation and online, but I only found references to changing the fps when I have still image formats.
  
  Is the solution to use `ffplay -vf "setpts=0.5*PTS" -i input`to simply modify the speed of playback? I was curious about the PTS value and how to confirm what that is and how it changed my command if I have a weird framerate like 24.4444534634. Cause the generic is listed as 0.5 equating to 2x faster, and 2.0 equating to 0.5x slower. I find this doesn't addup though, especially when you get to higher values like 60x speed, etc. i.e. `ffplay -vf "setpts=1/60*PTS" -i input` This is outputting a speed the exact the same as 1/100000000000 and etc for many values. Is this a case of my pc not being able to generate the output within the presets of the system fast enough? Or just the weird fps of my footage is doing something? Or I need to confirm the PTS value and do the calculation properly for the specific video in question?
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-01-15. Score: 0 | Accepted answer
  
  At the very least, you are limited by the speed of the video decoder. But ffplay does seem to have some barrier to speed increase.
  
  For now, a workaround is to pipe from ffmpeg
  
  ```
  ffmpeg -i in -an -vf setpts=PTS/60 -f yuv4mpegpipe - | ffplay -
  
  ```
  
  
  ---
  
  ### Answer by username_2 on 2024-11-28. Score: 0
  
  Example:
  
  ```
  ffplay -f v4l2 -framerate 15 /dev/video4
  
  ```
  
  
  ---
  
  