[FFmpeg-user] h264_mp4toannexb does not store a proper frame-rate.

Nicolas Gaullier nicolas.gaullier at cji.paris
Thu Feb 8 10:37:04 EET 2024


>De : ffmpeg-user <ffmpeg-user-bounces at ffmpeg.org> De la part de Wodzu
>Objet : [FFmpeg-user] h264_mp4toannexb does not store a proper frame-rate.
>
>Hi,   I have an mp4 file, that I want to convert to Annex B. The file properties are:     Duration: 01:59:59.97, start: 0.000000, bitrate: 1221 kb/s      Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuvj420p(pc, >bt470bg/bt470bg/smpte170m), 1280x720, 1221 kb/s
>
>15 fps, 15 tbr, 15360 tbn, 60 tbc (default)
>
>    I am converting to Annex B this way:   ffmpeg -i file.mp4 -vcodec copy -vbsf h264_mp4toannexb -an output_file.264   After running >ffprobe on the output_file.264:     Duration: N/A, bitrate: N/A      Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt470bg/bt470bg/smpte170m, progressive), 1280x720,
>
30 fps, 30 tbr, 1200k tbn, 60 tbc

>As you can see, the duration information has been lost
This is expected for an elementary stream; a muxer is required to gain instant access to such a value. Otherwise, the full elementary stream has to be parsed from end to end which means some delay and performance issues.

>and fps is now 30 fps. It it possible to retain the original FPS?   Cheers,   Bruce
Probing an elementary stream is usually the best way, the most reliable to get such a value. I think it is correct here.
I think your MP4 input looks suspicious with "15 fps / 60 tbc".
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list