[FFmpeg-user] Question about MP4 media_time in elst/edts

박근백 kb.park at navercorp.com
Thu Jun 30 16:40:13 CEST 2016


 Hello,
 
I'm using ffmpeg for transcoding test. (version 3.0.2)
When I test ffmpeg encoding, the encoded mp4's media_time (in elst(edts)) is strange.
 
the original video start 0 (media time are all zero), but encoded file's video media time is 800 and audio media time is 2048 
when i change only '-c:a libfdk_aac' -> '-c:a aac', encoded file's audio media time became 1024.
 
Please let me know the reason. (why?? encoded file's media time isn't zero, audio media time is changed by audio codec setting) 
Thanks in advance.
 
(Test log)
# ffmpeg -y -i video.mp4  -c:v libx264 -c:a libfdk_aac   -f mp4  -debug_ts -t 10 aaa.mp4 
 
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
 
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42mp41
    creation_time   : 2015-06-02 14:12:47
  Duration: 00:02:31.18, start: 0.000000, bitrate: 50273 kb/s
...
...
demuxer -> ist_index:0 type:video next_dts:NOPTS next_dts_time:NOPTS next_pts:NOPTS next_pts_time:NOPTS pkt_pts:0 pkt_pts_time:0 pkt_dts:0 pkt_dts_time:0 off:0 off_time:0 
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:0 pkt_pts_time:0 pkt_dts:0 pkt_dts_time:0 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:33367 next_dts_time:0.033367 next_pts:0 next_pts_time:0 pkt_pts:100 pkt_pts_time:0.0333667 pkt_dts:100 pkt_dts_time:0.0333667 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:100 pkt_pts_time:0.0333667 pkt_dts:100 pkt_dts_time:0.0333667 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:66734 next_dts_time:0.066734 next_pts:0 next_pts_time:0 pkt_pts:200 pkt_pts_time:0.0667334 pkt_dts:200 pkt_dts_time:0.0667334 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:200 pkt_pts_time:0.0667334 pkt_dts:200 pkt_dts_time:0.0667334 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:100100 next_dts_time:0.1001 next_pts:0 next_pts_time:0 pkt_pts:300 pkt_pts_time:0.1001 pkt_dts:300 pkt_dts_time:0.1001 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:300 pkt_pts_time:0.1001 pkt_dts:300 pkt_dts_time:0.1001 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:133467 next_dts_time:0.133467 next_pts:0 next_pts_time:0 pkt_pts:400 pkt_pts_time:0.133467 pkt_dts:400 pkt_dts_time:0.133467 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:400 pkt_pts_time:0.133467 pkt_dts:400 pkt_dts_time:0.133467 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:166834 next_dts_time:0.166834 next_pts:0 next_pts_time:0 pkt_pts:500 pkt_pts_time:0.166834 pkt_dts:500 pkt_dts_time:0.166834 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:500 pkt_pts_time:0.166834 pkt_dts:500 pkt_dts_time:0.166834 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:200201 next_dts_time:0.200201 next_pts:0 next_pts_time:0 pkt_pts:600 pkt_pts_time:0.2002 pkt_dts:600 pkt_dts_time:0.2002 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:600 pkt_pts_time:0.2002 pkt_dts:600 pkt_dts_time:0.2002 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:233567 next_dts_time:0.233567 next_pts:0 next_pts_time:0 pkt_pts:700 pkt_pts_time:0.233567 pkt_dts:700 pkt_dts_time:0.233567 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:700 pkt_pts_time:0.233567 pkt_dts:700 pkt_dts_time:0.233567 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:266934 next_dts_time:0.266934 next_pts:0 next_pts_time:0 pkt_pts:800 pkt_pts_time:0.266934 pkt_dts:800 pkt_dts_time:0.266934 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:800 pkt_pts_time:0.266934 pkt_dts:800 pkt_dts_time:0.266934 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:300301 next_dts_time:0.300301 next_pts:0 next_pts_time:0 pkt_pts:900 pkt_pts_time:0.3003 pkt_dts:900 pkt_dts_time:0.3003 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:900 pkt_pts_time:0.3003 pkt_dts:900 pkt_dts_time:0.3003 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:333667 next_dts_time:0.333667 next_pts:0 next_pts_time:0 pkt_pts:1000 pkt_pts_time:0.333667 pkt_dts:1000 pkt_dts_time:0.333667 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:1000 pkt_pts_time:0.333667 pkt_dts:1000 pkt_dts_time:0.333667 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:367034 next_dts_time:0.367034 next_pts:0 next_pts_time:0 pkt_pts:1100 pkt_pts_time:0.367034 pkt_dts:1100 pkt_dts_time:0.367034 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:1100 pkt_pts_time:0.367034 pkt_dts:1100 pkt_dts_time:0.367034 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:400401 next_dts_time:0.400401 next_pts:0 next_pts_time:0 pkt_pts:1200 pkt_pts_time:0.4004 pkt_dts:1200 pkt_dts_time:0.4004 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:1200 pkt_pts_time:0.4004 pkt_dts:1200 pkt_dts_time:0.4004 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:433767 next_dts_time:0.433767 next_pts:0 next_pts_time:0 pkt_pts:1300 pkt_pts_time:0.433767 pkt_dts:1300 pkt_dts_time:0.433767 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:1300 pkt_pts_time:0.433767 pkt_dts:1300 pkt_dts_time:0.433767 off:0 off_time:0
demuxer -> ist_index:0 type:video next_dts:467134 next_dts_time:0.467134 next_pts:0 next_pts_time:0 pkt_pts:1400 pkt_pts_time:0.467134 pkt_dts:1400 pkt_dts_time:0.467134 off:0 off_time:0
demuxer+ffmpeg -> ist_index:0 type:video pkt_pts:1400 pkt_pts_time:0.467134 pkt_dts:1400 pkt_dts_time:0.467134 off:0 off_time:0
demuxer -> ist_index:1 type:audio next_dts:NOPTS next_dts_time:NOPTS next_pts:NOPTS next_pts_time:NOPTS pkt_pts:0 pkt_pts_time:0 pkt_dts:0 pkt_dts_time:0 off:0 off_time:0
demuxer+ffmpeg -> ist_index:1 type:audio pkt_pts:0 pkt_pts_time:0 pkt_dts:0 pkt_dts_time:0 off:0 off_time:0
encoder <- type:audio frame_pts:0 frame_pts_time:0 time_base:1/48000
encoder -> type:audio pkt_pts:-2048 pkt_pts_time:-0.0426667 pkt_dts:-2048 pkt_dts_time:-0.0426667
muxer <- type:audio pkt_pts:-2048 pkt_pts_time:-0.0426667 pkt_dts:-2048 pkt_dts_time:-0.0426667 size:372 
demuxer -> ist_index:1 type:audio next_dts:21333 next_dts_time:0.021333 next_pts:21333 next_pts_time:0.021333 pkt_pts:1024 pkt_pts_time:0.0213333 pkt_dts:1024 pkt_dts_time:0.0213333 off:0 off_time:0
demuxer+ffmpeg -> ist_index:1 type:audio pkt_pts:1024 pkt_pts_time:0.0213333 pkt_dts:1024 pkt_dts_time:0.0213333 off:0 off_time:0
encoder <- type:audio frame_pts:1024 frame_pts_time:0.0213333 time_base:1/48000
encoder -> type:audio pkt_pts:-1024 pkt_pts_time:-0.0213333 pkt_dts:-1024 pkt_dts_time:-0.0213333
...
...
muxer <- type:audio pkt_pts:479232 pkt_pts_time:9.984 pkt_dts:479232 pkt_dts_time:9.984 size:353
[mp4 @ 0x31e8520] EDTS using dts:-800 cts:800 instead of dts:-800 cts:800 tid:1
[mp4 @ 0x31e8520] EDTS using dts:-2048 cts:0 instead of dts:-2048 cts:0 tid:2
frame=  300 fps= 65 q=-1.0 Lsize=   13817kB time=00:00:10.00 bitrate=11312.5kbits/s speed=2.15x    
video:13634kB audio:172kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.081334%
 
 
 
 


More information about the ffmpeg-user mailing list