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?