Results 1 to 4 of 4

Thread: MPEG DASH encoding with ffmpeg - artefacts on seek

  1. #1
    Join Date
    Nov 2014
    Posts
    5

    Default MPEG DASH encoding with ffmpeg - artefacts on seek

    Since a couple of days i try to get the "perfect" settings for my chain-encoder i am actually writing. It gonna be used to transcode user generated content into a VOD streaming Site.

    So far everything works. RTMP, HLS and DASH. I just have one problem left: If i seek in DASH mode (regardless of the used Player) i get artefacts till it reaches the next Keyframe.
    Regardless what settings i tried so far - it is still the same.

    first i get ffprobe informations to determine the correct framerate - in this case lets assume 25

    #crf attempt
    ffmpeg -r 25/1 -i "/data/cephfs/input.mkv" -y -acodec libfaac -ab 128k -ac 2 -crf 23 -vcodec libx264 -x264opts 'keyint=25:min-keyint=25:scenecut=-1' -preset veryslow -flags +cgop -movflags faststart -threads 16 -r 25/1 -bufsize 1000k -f mp4 -keyint_min 25 -g 25 -sc_threshold 0 '/data/cephfs/output.mp4'

    another attempt: (multipass)
    ffmpeg -r 25/1 -i "/data/cephfs/input.mkv" -y -an -b:v 1250k -minrate 500k -maxrate 2000k -pass 1 -vcodec libx264 -x264opts 'keyint=25:min-keyint=25:scenecut=-1' -preset veryslow -tune zerolatency -flags +cgop -movflags faststart -threads 16 -r 25/1 -f mp4 -keyint_min 25 -g 25 -sc_threshold 0 -passlogfile /data/cephfs/log_file /dev/null

    pass2:
    ffmpeg -r 25/1 -i "/data/cephfs/input.mkv" -y -an -b:v 1250k -minrate 500k -maxrate 2000k -pass 2 -vcodec libx264 -x264opts 'keyint=25:min-keyint=25:scenecut=-1' -preset veryslow -tune zerolatency -flags +cgop -movflags faststart -threads 16 -r 25/1 -bufsize 2000k -f mp4 -keyint_min 25 -g 25 -sc_threshold 0 -passlogfile /data/cephfs/log_file '/data/cephfs/v360p.mp4'

    those files works fine with any other streaming method
    any suggestions ?

  2. #2
    Join Date
    Nov 2014
    Posts
    5

    Default little better but

    is it just me thinking, that the support here is not so good? also the email replies take ages. and i payed a lot for licenses ! somehow i start to regret buying perpetual

    can anybody give me a ffmpeg command which produces a mp4 working with wowza DASH? or is the DASH support still buggy?


    Pass1
    /usr/local/bin/ffmpeg -i "/data/cephfs/upload.avi" -i '/data/cephfs/audio.m4a' -map 0:0 -map 1:0 -c:a copy -y -threads 16 -keyint_min 24 -sc_threshold 0 -vcodec libx264 -profile:v high -level 4.2 -preset ultrafast -r 24 -b:v 1197k -g 24 -x264opts 'keyint=24:min-keyint=24:scenecut=0:no-scenecut:vbv-maxrate=2394:vbv-bufsize=4788' -movflags 'frag_keyframe+empty_moov' -f mp4 -pass 1 -passlogfile /data/cephfs/log_file /dev/null

    Pass 2
    /usr/local/bin/ffmpeg -i "/data/cephfs/upload.avi" -i '/data/cephfs/audio.m4a' -map 0:0 -map 1:0 -c:a copy -y -threads 16 -keyint_min 24 -sc_threshold 0 -vcodec libx264 -profile:v high -level 4.2 -preset ultrafast -r 24 -b:v 1197k -g 24 -x264opts 'keyint=24:min-keyint=24:scenecut=0:no-scenecut:vbv-maxrate=2394:vbv-bufsize=4788' -movflags 'frag_keyframe+empty_moov' -f mp4 -pass 2 -passlogfile 264opts 'keyint=24:min-keyint=24:scenecut=0:no-scenecut:vbv-maxrate=2394:vbv-bufsize=4788' -movflags 'frag_keyframe+empty_moov' -f mp4 -pass 1 -passlogfile '/data/cephfs/out.mp4'

    with this settings at least the bitdash player can seek a little - but also works not flawlessly

  3. #3
    Join Date
    Nov 2014
    Posts
    5

    Default funny

    i tried the mp4 files you mention in your tutorial: http://www.wowza.com/forums/content....rate-streaming

    came out - those files also not work with DASH correctly:

    my smil:
    <?xml version="1.0" encoding="UTF-8"?>
    <smil title="">
    <body>
    <switch>
    <video src="bigbuckbunny_450.mp4" width="320" system-bitrate="483341" title=">
    <param name="audioBitrate" value="131803" valuetype="data"></param>
    <param name="videoBitrate" value="344453" valuetype="data"></param>
    </video>
    <video src="bigbuckbunny_750.mp4" width="476" system-bitrate="783141" title=">
    <param name="audioBitrate" value="131803" valuetype="data"></param>
    <param name="videoBitrate" value="644274" valuetype="data"></param>
    </video>
    </switch>
    </body>
    </smil>


    i don't understand why you choose 44100 as bitrate for the audio, which clearly seems to be KHZ -anyhow those bitrate values come from script and taken from ffprobe

    it is not even playing... when i now wget the manifest you can see:

    <Location>https://xxxxxxxxxxxxxxxxxxxxxxxxxx/smil:vid.smil/manifest_w1420876468.mpd</Location>
    <Period id="0" start="PT0.0S">
    <AdaptationSet id="0" mimeType="video/mp4" maxWidth="476" maxHeight="268" par="16:9" frameRate="24" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
    <SegmentTemplate presentationTimeOffset="0" timescale="90000" media="chunk_ctvideo_cfm4s_rid$RepresentationID$_cs$Time$_w1420876468_mpd.m4s" initialization="chunk_ctvideo_cfm4s_rid$RepresentationID$_cinit_w1420876468_mpd.m4s">
    <SegmentTimeline>
    <S t="0" d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="1080000"/>
    <S d="761220"/>
    </SegmentTimeline>
    </SegmentTemplate>
    <Representation id="p0a0r0" codecs="avc1.4d400c" width="320" height="180" sar="1:1" bandwidth="344000" />
    <Representation id="p0a0r1" codecs="avc1.4d4015" width="476" height="268" sar="1:1" bandwidth="644000" />
    </AdaptationSet>
    <AdaptationSet id="1" mimeType="audio/mp4" lang="eng" segmentAlignment="true" startWithSAP="1" subsegmentAlignment="true" subsegmentStartsWithSAP="1">
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
    <SegmentTemplate presentationTimeOffset="0" timescale="48000" media="chunk_ctaudio_cfm4s_rid$RepresentationID$_cs$Time$_w1420876468_mpd.m4s" initialization="chunk_ctaudio_cfm4s_rid$RepresentationID$_cinit_w1420876468_mpd.m4s">
    <SegmentTimeline>
    <S t="0" d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="576000"/>
    <S d="405984"/>
    </SegmentTimeline>
    </SegmentTemplate>
    <Representation id="p0a1r0" codecs="mp4a.40.2" audioSamplingRate="48000" bandwidth="131000">
    <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
    </Representation>
    </AdaptationSet>
    </Period>
    </MPD>



    so the segment timeline ... shouldn't we not see here some different values?

    im desperately try to solve this - can anyone share some light into this ?

  4. #4
    Join Date
    Jun 2011
    Posts
    1,037

    Default

    Hi,
    Did you raise a ticket for this issue with support?
    If not I suggest emailing support@wowza.com and refer to this post url.
    Also mention what player you are using specifically.

    MPEG-DASH is more strict than the other protocols. The alignment has to be
    accurate, and those particular files might not necessarily be. However, I did try
    playing the bigbuckbunny.smil and I could both play and seek without seeing artifacts
    using the Shaka player built into the Manager.

    Daren

Similar Threads

  1. video artefacts when seeking
    By Grillj in forum On-Demand Streaming
    Replies: 1
    Last Post: 11-03-2014, 08:57 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •