[Libav-user] Application provided duration: -10 / timestamp: 14571389 is out of range for mov/mp4 format

Alfred E. Heggestad alfred.heggestad at gmail.com
Fri Jun 7 16:06:26 EEST 2019


hi,


I am using libavformat with the dash muxer, and
everytime it opens a new m4s file it prints a
strange warning about timestamp.


if I use the ffmpeg command to create a similar
pipeline, there is no warning:


ffmpeg -re -i input.mp4 \
	-map 0 -map 0 \
	-c:a aac \
	-c:v libx264 \
	-b:v:0 800k -b:v:1 300k \
	-s:v:1 320x170 \
	-profile:v:1 baseline -profile:v:0 main \
	-bf 1 -keyint_min 120 -g 120 -sc_threshold 0 \
	-b_strategy 0 \
	-ar:a:1 22050 \
	\
	-use_timeline 1 \
	-use_template 1 \
	-window_size 5 \
	-adaptation_sets "id=0,streams=v id=1,streams=a" \
	-f dash /tmp/out.mpd



here is the warning:



[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/media_1.m3u8.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream0-00008.mp4.tmp' for writing
[mp4 @ 0x55aa00b76880] Application provided duration: -10 / timestamp: 
4248461 is out of range for mov/mp4 format
[mp4 @ 0x55aa00b76880] pts has no value
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream1-00008.mp4.tmp' for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/playlist.mpd.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/media_0.m3u8.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/media_1.m3u8.tmp' 
for writing
[mp4 @ 0x55aa00b740c0] Application provided duration: -16 / timestamp: 
1749872 is out of range for mov/mp4 format
[mp4 @ 0x55aa00b740c0] pts has no value
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream0-00009.mp4.tmp' for writing
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream1-00009.mp4.tmp' for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/playlist.mpd.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/media_0.m3u8.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/media_1.m3u8.tmp' 
for writing
[mp4 @ 0x55aa00b740c0] Application provided duration: -16 / timestamp: 
1921072 is out of range for mov/mp4 format
[mp4 @ 0x55aa00b740c0] pts has no value
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream0-00010.mp4.tmp' for writing
[mp4 @ 0x55aa00b76880] Application provided duration: -10 / timestamp: 
5294998 is out of range for mov/mp4 format
[mp4 @ 0x55aa00b76880] pts has no value
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream1-00010.mp4.tmp' for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/playlist.mpd.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/media_0.m3u8.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening '/var/spool/live/bbbb/media_1.m3u8.tmp' 
for writing
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream0-00011.mp4.tmp' for writing
[mp4 @ 0x55aa00b76880] Application provided duration: -9 / timestamp: 
5779349 is out of range for mov/mp4 format
[mp4 @ 0x55aa00b76880] pts has no value
[dash @ 0x55aa00b6f200] Opening 
'/var/spool/live/bbbb/chunk-stream1-00011.mp4.tmp' for




the dash options in my program is like this:


	ret |= av_opt_set_int(obj, "remove_at_exit",    true, 0);
	ret |= av_opt_set_int(obj, "hls_playlist",      true, 0);
	ret |= av_opt_set_int(obj, "streaming",         true, 0);
	ret |= av_opt_set_int(obj, "window_size",          5, 0);
	ret |= av_opt_set_int(obj, "extra_window_size",    5, 0);
	ret |= av_opt_set(obj, "seg_duration",  "00:10", 0);
	ret |= av_opt_set_int(obj, "global_sidx",    false, 0);



the timestamp warning is only for the audio packets (AAC). there is no
warning for the video packets (H264).




all the packets that I send into libavformat has a correct and valid
timestamp. it looks like the dash/mp4 muxer is re-calculating the
duration to a wrong value (e.g. -9).



any help or hints is greatly appreciated :)




/alfred





More information about the Libav-user mailing list