<p>Raw video is just that - a raw dump of video content payload - there is no packetization or metadata.</p>

<p>Output to Y4M for a format with metadata</p>

<pre><code>ffmpeg -r 50 -i test.ts -pix_fmt yuv420p -vf "setpts=PTS-STARTPTS" -y test.y4m
</code></pre>

CC BY-SA 4.0
2018-06-04T16:51:59.620Z
2018-06-04T16:51:59.620Z
Gyan
<p>I am trying to convert a H.264 video to rawvideo using the following command: </p>

<pre><code>ffmpeg -r 50 -i test.ts -c:v rawvideo -r 50 -pix_fmt yuv420p -filter_complex "[0:v] setpts=PTS-STARTPTS" -y test.yuv
</code></pre>

<p>And here the raw video file is expected to have 50fps: </p>

<pre><code>Output #0, rawvideo, to 'test.yuv':
  Metadata:
    encoder         : Lavf57.71.100
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 552960 kb/s, 50 fps, 50 tbn, 50 tbc
    Metadata:
      encoder         : Lavc57.89.100 rawvideo
frame=15599 fps=111 q=-0.0 Lsize=21058650kB time=00:05:11.98 bitrate=552960.0kbits/s speed=2.22x
video:21058650kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
</code></pre>

<p>But when I check the file with ffmpeg it shows it as 25fps and the duration is double the original duration of the video: </p>

<pre><code>ffmpeg -s:v 1280x720 -i test.yuv

[rawvideo @ 0x55ad594ad840] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'test.yuv':
  Duration: 00:10:23.96, start: 0.000000, bitrate: 276480 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 276480 kb/s, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified
</code></pre>

<p>Why when I check the raw video file with ffmpeg the frame rate is stated as 25fps and the duration is reported to be double the original duration? </p>

<video><ffmpeg><framerate><raw>
Frame rate mismatch when converting to raw video
Georgi Stoyanov
# Frame rate mismatch when converting to raw video

(Asked by: username_0 on 2018-06-04)

I am trying to convert a H.264 video to rawvideo using the following command: 
ffmpeg -r 50 -i test.ts -c:v rawvideo -r 50 -pix_fmt yuv420p -filter_complex "[0:v] setpts=PTS-STARTPTS" -y test.yuv

And here the raw video file is expected to have 50fps: 
Output #0, rawvideo, to 'test.yuv':
  Metadata:
    encoder         : Lavf57.71.100
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 552960 kb/s, 50 fps, 50 tbn, 50 tbc
    Metadata:
      encoder         : Lavc57.89.100 rawvideo
frame=15599 fps=111 q=-0.0 Lsize=21058650kB time=00:05:11.98 bitrate=552960.0kbits/s speed=2.22x
video:21058650kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

But when I check the file with ffmpeg it shows it as 25fps and the duration is double the original duration of the video: 
ffmpeg -s:v 1280x720 -i test.yuv

[rawvideo @ 0x55ad594ad840] Estimating duration from bitrate, this may be inaccurate
Input #0, rawvideo, from 'test.yuv':
  Duration: 00:10:23.96, start: 0.000000, bitrate: 276480 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, 276480 kb/s, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified

Why when I check the raw video file with ffmpeg the frame rate is stated as 25fps and the duration is reported to be double the original duration?

**Tags:** video, ffmpeg, framerate, raw


---

## 1 answers

### Answer by username_1 on 2018-06-04. Score: 1 | Accepted answer

Raw video is just that - a raw dump of video content payload - there is no packetization or metadata.
Output to Y4M for a format with metadata
ffmpeg -r 50 -i test.ts -pix_fmt yuv420p -vf "setpts=PTS-STARTPTS" -y test.y4m


---

