# MPEG DASH encoding with ffmpeg - artefacts on seek

**URL:** <https://community.wowza.com/t/mpeg-dash-encoding-with-ffmpeg-artefacts-on-seek/44240>\
**Category:** Wowza Streaming Engine\
**Created:** [November 20, 2015, 6:50am UTC](https://community.wowza.com/t/mpeg-dash-encoding-with-ffmpeg-artefacts-on-seek/44240 "2015-11-20T06:50:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Schuchhardt](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Thomas\_Schuchhardt](https://community.wowza.com/u/Thomas_Schuchhardt)\
**Post date:** [November 20, 2015, 6:50am UTC](https://community.wowza.com/t/mpeg-dash-encoding-with-ffmpeg-artefacts-on-seek/44240/1 "2015-11-20T06:50:21Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Thomas\_Schuchhardt](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Thomas\_Schuchhardt](https://community.wowza.com/u/Thomas_Schuchhardt)\
**Post date:** [November 21, 2015, 8:05pm UTC](https://community.wowza.com/t/mpeg-dash-encoding-with-ffmpeg-artefacts-on-seek/44240/2 "2015-11-21T20:05:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Daren\_Johnson](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@Daren\_Johnson](https://community.wowza.com/u/Daren_Johnson)\
**Post date:** [December 3, 2015, 11:39pm UTC](https://community.wowza.com/t/mpeg-dash-encoding-with-ffmpeg-artefacts-on-seek/44240/3 "2015-12-03T23:39:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Thomas\_Schuchhardt](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Thomas\_Schuchhardt](https://community.wowza.com/u/Thomas_Schuchhardt)\
**Post date:** [November 22, 2015, 2:53am UTC](https://community.wowza.com/t/mpeg-dash-encoding-with-ffmpeg-artefacts-on-seek/44240/4 "2015-11-22T02:53:05Z")

</div>

i tried the mp4 files you mention in your tutorial: [https://www.wowza.com/docs/how-to-do-adaptive-bitrate-streaming](https://www.wowza.com/docs/how-to-do-adaptive-bitrate-streaming)

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

my smil:

\<?xml version="1.0" encoding="UTF-8"?\>

\<video src=“bigbuckbunny\_450.mp4” width=“320” system-bitrate=“483341” title="\>

\<video src=“bigbuckbunny\_750.mp4” width=“476” system-bitrate=“783141” title="\>

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:

[https://xxxxxxxxxxxxxxxxxxxxxxxxxx/smil:vid.smil/manifest\_w1420876468.mpd](https://xxxxxxxxxxxxxxxxxxxxxxxxxx/smil:vid.smil/manifest_w1420876468.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 ?
