Menu

DashCast: problem with 24fps input

Help
2014-01-22
2014-01-23
  • Francesc Pinyol Margalef

    Hi,
    I'm running DashCast with a 24fps input, with the conf file modified accordingly:

    dashcast_aac_24.conf

    [v1]
    type=video
    bitrate=400000
    framerate=24
    width=640
    height=480
    crop_x=0
    crop_y=0
    codec=libx264

    [a1]
    type=audio
    bitrate=192000
    samplerate=48000
    channels=2
    codec=aac

    But the output is cumulating some time drift:

    DashCast -av sintel/sintel-1024-stereo.mp4 -live-media -seg-dur 10000 -time-shift -1 -dynamic-ast -conf dashcast_aac_24.conf -ast-offset 5000
    Options:
    video source: sintel/sintel-1024-stereo.mp4
    video crop: 0x0
    audio source: sintel/sintel-1024-stereo.mp4
    Configurations:
    id:v1 res:640x480 vbr:400000
    id:a1 abr:192000
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sintel/sintel-1024-stereo.mp4':
    Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    title : Sintel
    encoder : Lavf55.12.100
    copyright : (c) copyright Blender Foundation | durian.blender.org
    description : Sintel open movie project
    Duration: 00:14:48.09, start: 0.021333, bitrate: 850 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x436 [SAR 1:1 DAR 256:109], 718 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
    Metadata:
    handler_name : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
    handler_name : SoundHandler
    ...

    StartTime: 2014-01-22T13:30:00.184 - startNumber 54 - last number 54
    MPD file generated: output/dashcast.mpd
    UTC diff 559586 - cumulated segment duration 550000 (9586)
    Generating MPD at 2014-01-22T13:30:10.183
    StartTime: 2014-01-22T13:30:10.183 - startNumber 55 - last number 55
    MPD file generated: output/dashcast.mpd
    UTC diff 569762 - cumulated segment duration 560000 (9762)
    Generating MPD at 2014-01-22T13:30:20.182
    StartTime: 2014-01-22T13:30:20.182 - startNumber 56 - last number 56
    MPD file generated: output/dashcast.mpd
    UTC diff 579935 - cumulated segment duration 570000 (9935)
    Generating MPD at 2014-01-22T13:30:30.183
    StartTime: 2014-01-22T13:30:30.183 - startNumber 57 - last number 57
    MPD file generated: output/dashcast.mpd
    UTC diff 590107 bigger than segment duration 57 - some frame where probably lost. Adjusting
    UTC diff 590107 - cumulated segment duration 590000 (107)
    Generating MPD at 2014-01-22T13:30:40.180
    StartTime: 2014-01-22T13:30:40.180 - startNumber 58 - last number 58
    MPD file generated: output/dashcast.mpd
    UTC diff 600282 - cumulated segment duration 600000 (282)
    Generating MPD at 2014-01-22T13:30:50.184
    StartTime: 2014-01-22T13:30:50.184 - startNumber 59 - last number 59
    MPD file generated: output/dashcast.mpd
    UTC diff 610450 - cumulated segment duration 610000 (450)
    Generating MPD at 2014-01-22T13:31:00.182

    As you can see, I finally get the warning "UTC diff 590107 bigger than segment duration 57 - some frame where probably lost. Adjusting"

    I'm using GPAC svn rev 5000 with aac patch, and ffmpeg 2.1.2.

    Francesc

     
  • Francesc Pinyol Margalef

    Hi,
    The problem is the same with a 30fps input, at the same segment (57):

    wget http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4

    ffmpeg -i bbb_sunflower_1080p_30fps_normal.mp4 -c:v copy -c:a aac -strict -2 -ac 2 bbb_sunflower_1080p_30fps_normal_aac.mp4

    DashCast -av bbb/bbb_sunflower_1080p_30fps_normal_aac.mp4 -live-media -seg-dur 10000 -time-shift -1 -dynamic-ast -conf dashcast_aac.conf -ast-offset 5000

    Options:
    video source: bbb/bbb_sunflower_1080p_30fps_normal_aac.mp4
    video crop: 0x0
    audio source: bbb/bbb_sunflower_1080p_30fps_normal_aac.mp4
    Configurations:
    id:v1 res:640x480 vbr:400000
    id:a1 abr:192000
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bbb/bbb_sunflower_1080p_30fps_normal_aac.mp4':
    Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    title : Big Buck Bunny, Sunflower version
    artist : Blender Foundation 2008, Janus Bager Kristensen 2013
    composer : Sacha Goedegebure
    encoder : Lavf55.19.104
    comment : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net
    genre : Animation
    Duration: 00:10:34.53, start: 0.021333, bitrate: 3135 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2998 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc (default)
    Metadata:
    handler_name : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
    handler_name : SoundHandler
    Press q or Q to exit...
    [libx264 @ 0x7fca2c000920] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
    [libx264 @ 0x7fca2c000920] profile Constrained Baseline, level 3.0
    [libx264 @ 0x7fca2c000920] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=7 lookahead_threads=7 sliced_threads=1 slices=7 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=3 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    UTC diff 10204 - cumulated segment duration 10000 (204)
    Generating MPD at 2014-01-22T17:53:48.863
    StartTime: 2014-01-22T17:53:48.863 - startNumber 0 - last number 0
    MPD file generated: output/dashcast.mpd
    UTC diff 20376 - cumulated segment duration 20000 (376)
    Generating MPD at 2014-01-22T17:53:59.36
    StartTime: 2014-01-22T17:53:59.36 - startNumber 1 - last number 1
    MPD file generated: output/dashcast.mpd
    UTC diff 30552 - cumulated segment duration 30000 (552)
    Generating MPD at 2014-01-22T17:54:09.211
    StartTime: 2014-01-22T17:54:09.211 - startNumber 2 - last number 2
    MPD file generated: output/dashcast.mpd
    UTC diff 40724 - cumulated segment duration 40000 (724)
    Generating MPD at 2014-01-22T17:54:19.383
    StartTime: 2014-01-22T17:54:19.383 - startNumber 3 - last number 3
    ...
    StartTime: 2014-01-22T18:02:59.692 - startNumber 56 - last number 56
    MPD file generated: output/dashcast.mpd
    UTC diff 579933 - cumulated segment duration 570000 (9933)
    Generating MPD at 2014-01-22T18:03:09.692
    StartTime: 2014-01-22T18:03:09.692 - startNumber 57 - last number 57
    MPD file generated: output/dashcast.mpd
    UTC diff 590106 bigger than segment duration 57 - some frame where probably lost. Adjusting
    UTC diff 590106 - cumulated segment duration 590000 (106)
    Generating MPD at 2014-01-22T18:03:19.693
    StartTime: 2014-01-22T18:03:19.693 - startNumber 58 - last number 58
    MPD file generated: output/dashcast.mpd
    UTC diff 600282 - cumulated segment duration 600000 (282)
    Generating MPD at 2014-01-22T18:03:29.693
    StartTime: 2014-01-22T18:03:29.693 - startNumber 59 - last number 59
    MPD file generated: output/dashcast.mpd

    Francesc

     
  • Francesc Pinyol Margalef

    Hi,
    Sorry, the problem is the audio. When input audio sampling rate is different from 44100Hz, the problem appears. But with an input file with a 44100Hz audio, everything is fine:

    ffmpeg -i sintel-1024-stereo.mp4 -c:v copy -c:a aac -strict -2 -ar 44100 sintel-1024-stereo_44100.mp4

    DashCast -av sintel/sintel-1024-stereo_44100.mp4 -live-media -seg-dur 10000 -time-shift -1 -dynamic-ast -conf dashcast_aac.conf -ast-offset 5000

    Options:
    video source: sintel/sintel-1024-stereo_44100.mp4
    video crop: 0x0
    audio source: sintel/sintel-1024-stereo_44100.mp4
    Configurations:
    id:v1 res:640x480 vbr:400000
    id:a1 abr:192000
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sintel/sintel-1024-stereo_44100.mp4':
    Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    title : Sintel
    encoder : Lavf55.19.104
    copyright : (c) copyright Blender Foundation | durian.blender.org
    description : Sintel open movie project
    Duration: 00:14:48.11, start: 0.023220, bitrate: 851 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x436 [SAR 1:1 DAR 256:109], 718 kb/s, 24 fps, 24 tbr, 12288 tbn, 48 tbc (default)
    Metadata:
    handler_name : VideoHandler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
    Metadata:
    handler_name : SoundHandler
    Press q or Q to exit...
    [audio_encoder_thread] before optimize: frame_per_seg=430, frame_per_frag=430
    [audio_encoder_thread] after optimize: frame_per_seg=430, frame_per_frag=430
    [libx264 @ 0x7f5960000920] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
    [libx264 @ 0x7f5960000920] profile Constrained Baseline, level 3.0
    [libx264 @ 0x7f5960000920] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=7 lookahead_threads=7 sliced_threads=1 slices=7 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=24 keyint_min=2 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
    [audio_encoder_thread] UTC diff 10031 (1390475145900 - 1390475135869) - cumulated segment duration 10000 (31)
    Generating MPD at 2014-01-23T11:05:50.900
    StartTime: 2014-01-23T11:05:50.900 - startNumber 0 - last number 0
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 9946 (1390475146918 - 1390475136972) - cumulated segment duration 10000 (-54)
    [audio_encoder_thread] UTC diff 20031 (1390475155900 - 1390475135869) - cumulated segment duration 20000 (31)
    Generating MPD at 2014-01-23T11:06:00.900
    StartTime: 2014-01-23T11:06:00.900 - startNumber 1 - last number 1
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 19944 (1390475156916 - 1390475136972) - cumulated segment duration 20000 (-56)
    [audio_encoder_thread] UTC diff 30030 (1390475165899 - 1390475135869) - cumulated segment duration 30000 (30)
    Generating MPD at 2014-01-23T11:06:10.899
    StartTime: 2014-01-23T11:06:10.899 - startNumber 2 - last number 2
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 29944 (1390475166916 - 1390475136972) - cumulated segment duration 30000 (-56)
    [audio_encoder_thread] UTC diff 40031 (1390475175900 - 1390475135869) - cumulated segment duration 40000 (31)
    Generating MPD at 2014-01-23T11:06:20.900
    StartTime: 2014-01-23T11:06:20.900 - startNumber 3 - last number 3
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 39945 (1390475176917 - 1390475136972) - cumulated segment duration 40000 (-55)
    [audio_encoder_thread] UTC diff 50031 (1390475185900 - 1390475135869) - cumulated segment duration 50000 (31)
    Generating MPD at 2014-01-23T11:06:30.900
    StartTime: 2014-01-23T11:06:30.900 - startNumber 4 - last number 4
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 49945 (1390475186917 - 1390475136972) - cumulated segment duration 50000 (-55)
    [audio_encoder_thread] UTC diff 60029 (1390475195898 - 1390475135869) - cumulated segment duration 60000 (29)
    Generating MPD at 2014-01-23T11:06:40.898
    StartTime: 2014-01-23T11:06:40.898 - startNumber 5 - last number 5
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 59945 (1390475196917 - 1390475136972) - cumulated segment duration 60000 (-55)
    [audio_encoder_thread] UTC diff 70029 (1390475205898 - 1390475135869) - cumulated segment duration 70000 (29)
    Generating MPD at 2014-01-23T11:06:50.898
    StartTime: 2014-01-23T11:06:50.898 - startNumber 6 - last number 6
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 69943 (1390475206915 - 1390475136972) - cumulated segment duration 70000 (-57)
    [audio_encoder_thread] UTC diff 80029 (1390475215898 - 1390475135869) - cumulated segment duration 80000 (29)
    Generating MPD at 2014-01-23T11:07:00.898
    StartTime: 2014-01-23T11:07:00.898 - startNumber 7 - last number 7
    MPD file generated: output/dashcast.mpd
    [video_encoder_thread] UTC diff 79944 (1390475216916 - 1390475136972) - cumulated segment duration 80000 (-56)
    [audio_encoder_thread] UTC diff 90029 (1390475225898 - 1390475135869) - cumulated segment duration 90000 (29)
    Generating MPD at 2014-01-23T11:07:10.898
    StartTime: 2014-01-23T11:07:10.898 - startNumber 8 - last number 8
    MPD file generated: output/dashcast.mpd
    ...

    As you can see, I've slightly modified the logs.

    I'm using GPAC svn rev.5000 with aac patch, and ffmpeg 2.1.2.

    Francesc