3
1
I am getting the following warning message when executing ffmpeg
:
[mp4 @ 00000000025c00a0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 00000000025c00a0] pts has no value
The message appears when converting H264
elementary stream into mp4
video file.
I am using ffmpeg
version: ffmpeg-3.3.2-win64
I tried executing the following code, to check if it's a problem in my H264
stream:
ffmpeg -f lavfi -i testsrc -t 3 -r 10 -pix_fmt yuv420p -c:v libx264 test.264
ffmpeg -r 10 -i test.264 -vcodec copy test.mp4
The code creates H264
synthetic video stream using ffmpeg
, and then converts the stream into mp4
.
Since the stream is created by ffmpeg
, there is no reason for it not to contain required Timestamps.
Is it a bug in ffmpeg
?
Is there some king of flag I missed when creating the synthetic H264
stream?
Does H264
elementary supposed to contain Timestamps?
apparently it does not help in this case --> looks related to https://trac.ffmpeg.org/ticket/502#comment:21 – Gyan – 2017-07-06T15:41:56.793
1@slhck Elementary streams cannot have timestamps, so I can safely ignore the warning message. Thank you for your answer. – Rotem – 2017-07-06T17:17:50.780
@Rotem Sure! It's just that it should work with the
-r
parameter as an input option. Perhaps I'll file another bug report. – slhck – 2017-07-07T09:22:13.2931Are there any updates on this or the bug report? I just tried setting
-r
in a current version of ffmpeg and it still gives the same error for H.264 elementary streams. – Andreas Unterweger – 2018-08-27T08:07:02.7001I know this is an old question but since it is asked so often: An unlikely improvement in FFmpeg has given a workaround: Raw h.264 to AVI works fine and has all the timestamp magic, AVI to MP4 works fine as well. So if you are comfortable with 2 muxes, you are covered. This also avoids MP4Box's quirks (such as droping big parts of a raw bitsream as "not referenced") – Eugen Rieck – 2018-11-05T17:07:38.630