# PatchWork Artifact in transcoded video for HTTP Streaming

**URL:** <https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555>\
**Category:** Wowza Streaming Engine\
**Created:** [November 22, 2012, 10:12am UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555 "2012-11-22T10:12:12Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emanuele\_Bragagnolo](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Emanuele\_Bragagnolo](https://community.wowza.com/u/Emanuele_Bragagnolo)\
**Post date:** [November 22, 2012, 10:12am UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/1 "2012-11-22T10:12:12Z")

</div>

Hello!

I am facing a video quality problem: the video transcoded by wowza transcoder addon seems to have lots of artifact expecially in fast scenes.

Below some configuration information.

Input stream: 1100 kbps h264 baseline profile at 1024x756 25fps with 64 kbps aac audio . No additional information because we don’t control the encoder streaming to wowza. I know the resolution is too higth, and in the next days it will be step down to 720x404.

OutPut stream:

- 1100 kbps Video h264 baseline + 64 audio aac. 25fps. Res 1024xfit-width. Key Frame every 100 frame

- 720 kbps Video h264 baseline + 64 audio aac. 25fps. Res 640xfit-width. Key Frame every 100 frame

- 440 kbps Video h264 baseline + 64 audio aac. 25fps. Res 512xfit-width. Key Frame every 100 frame

- 180 kbps Video h264 baseline + 64 audio aac. 25fps. Res 256xfit-width. Key Frame every 100 frame

- Rtmp input stream. The video reproduced with flash player is ok. I dump to file the stream with ffmepg option -c copy ( no transcoding by ffmpeg ). The recorded file has NO artifacts.

- HLS 1200 transcoded stream. Video reproduced with VLC and IOS devices presents artifacts. I dump to file stream with ffmpeg with option -c copy. The recorded file presents artifacts.

- HDS 1200 transcoded stream. Video reproduced with OSMF Flash player presents artifacts.

- Smooth Streaming 1200 transcoded stream. Video reproduced with silverlight player presents artifacts

- 1200 stream rtmp. The video reproduced with flash shows NO artifacts. I dump to file the stream with ffmpeg with option -c copy. The recorded file presents NO artifacts.

- 1200 stream rtsp. The video reproduced with VLC presents NO artifacts.

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [November 22, 2012, 1:01pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/2 "2012-11-22T13:01:01Z")

</div>

Hi

I think this is due to you not having a high enough Keyframe interval try getting the keyframs to be every 2 seconds (every 50 frames)

Can you also show us the Wowza logs so that we can check for skipped frames or any other issues causing this problem.

Let us know if changing the Keyframe rate helps or fixes the problem.

Jason

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [November 25, 2012, 12:30am UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/3 "2012-11-25T00:30:44Z")

</div>

Are you using “Main” profile? If so, change to “Baseline”

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [November 28, 2012, 10:30pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/4 "2012-11-28T22:30:53Z")

</div>

At 25fps and KeyFrameInterval /Interval set to “100”, that is a key frame interval of 4 seconds. With default cupertinoChunkDurationTarget ([article](https://www.wowza.com/docs/how-to-configure-apple-hls-packetization-cupertinostreaming%28cupertinostreaming%29)) of 10000 (10 seconds), that might cause varying size chunks that might be a problem.

Try setting the interval to “50”

Or try changing cupertinoChunkDurationTarget to a multiple of 4000, following the article above.

To have a look at the chunk size use this url and open the downloaded file:

```auto
http://[wowza-address]:1935/[app-name]/[stream-name]/chunklist.m3u8

```

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [November 29, 2012, 2:13pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/5 "2012-11-29T14:13:18Z")

</div>

You see this error in your logs with and without the Transcoder enabled?

Do you any custom modules?

Richard

---

<div class="post-metadata">

**Author:** ![Jason\_Hilton](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/jason_hilton/32/437_2.png) [@Jason\_Hilton](https://community.wowza.com/u/Jason_Hilton)\
**Post date:** [November 22, 2012, 4:14pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/6 "2012-11-22T16:14:54Z")

</div>

Hi

Thanks for the update.

When looking though the logs do a search for the word “skip”.

Do you see anything that relates to the encoder skipping frames?

Is this effecting all the transcoded streams (3) but not the source which is being passed through.

Jason

---

<div class="post-metadata">

**Author:** ![Emanuele\_Bragagnolo](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Emanuele\_Bragagnolo](https://community.wowza.com/u/Emanuele_Bragagnolo)\
**Post date:** [November 22, 2012, 3:30pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/7 "2012-11-22T15:30:31Z")

</div>

Thank you for the suggestion. I am going to try it.

I’ve already checked logs, but found no errors or warning.

It is strange only http streaming protocol show artifacts, while rtmp and rtsp don’t.

---

<div class="post-metadata">

**Author:** ![Emanuele\_Bragagnolo](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Emanuele\_Bragagnolo](https://community.wowza.com/u/Emanuele_Bragagnolo)\
**Post date:** [November 22, 2012, 3:57pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/8 "2012-11-22T15:57:31Z")

</div>

Artifacts still appear.

The only difference is they remain in screen for less time. Seems keyframes reset previous artifacts.

I add this detail:

log error contains several row like this:

ERROR server comment 2012-11-22 14:40:26 - - - - - 174.753 - - - - - - - - LiveStreamPacketizerCupertino.handleHolder: java.lang.ClassCastException: com.wowza.wms.amf.AMFDataItem cannot be cast to com.wowza.wms.amf.AMFDataObj

I didn’t write before because they seem to be related with a custom jar that handles metadata for HLS.

---

<div class="post-metadata">

**Author:** ![Emanuele\_Bragagnolo](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Emanuele\_Bragagnolo](https://community.wowza.com/u/Emanuele_Bragagnolo)\
**Post date:** [November 22, 2012, 6:48pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/9 "2012-11-22T18:48:29Z")

</div>

Nothing from logs

```auto
[root logs]# cat wowzamediaserver_access.log | grep -i skip
[root logs]# cat wowzamediaserver_error.log | grep -i skip

```

The stream transcoded are 4 not 3. We prefer transcode also the 1200 bitrate to avoid problems like keyframe not alligned between differents bitrate.

I try to summarize:

- Input stream: no artifacts

- ALL transcoded streams viewed with rtsp and rtmp protocols: no artifacts

- ALL transcoded stream viewed with http streaming protocols ( HDS, HLS, Smooth Streaming ): artifacts.

I am trying to reproduce the problem in another test instance, but without success. I can’t find the conditions creating artifacts.

The only component I can’t control is input encoder because is not in our company. However I can’t explain why a stream without artifact once transcoded presents artifact only in http streaming protocols, while rtmp and rtsp are ok.

---

<div class="post-metadata">

**Author:** ![Emanuele\_Bragagnolo](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Emanuele\_Bragagnolo](https://community.wowza.com/u/Emanuele_Bragagnolo)\
**Post date:** [November 26, 2012, 9:11am UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/10 "2012-11-26T09:11:20Z")

</div>

All profiles are Baseline

---

<div class="post-metadata">

**Author:** ![Emanuele\_Bragagnolo](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Emanuele\_Bragagnolo](https://community.wowza.com/u/Emanuele_Bragagnolo)\
**Post date:** [November 29, 2012, 12:39pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/11 "2012-11-29T12:39:51Z")

</div>

KeyFrames are alligned with fragments: for HDS and HLS Fragments length was set to 8 secs, twice keyframe interval. I’ve tryed also a value of 4sec for frag length, but nothing change.

FollowSource sets to false in transrate.xml

However I’ve resolved: no more artifacts.

The cause seems to be the encoder: cpu load was 100%. I suggest to my customer new settings for fmle. After rebooting SO and apply my settings cpu load fall to about 70% and transcoded streams in http streaming protocol do not present artifacts.

However I cannot find a reason becasuse input stream was ok and http streaming transcoded stream not when I faced the artifacts. 😕

One last question:

in error log I continue find these rows. Frequency is about one entry every 5 secs.

```auto
ERROR server comment 2012-11-22 14:40:26 - - - - - 174.753 - - - - - - - - LiveStreamPacketizerCupertino.handleHolder: java.lang.ClassCastException: com.wowza.wms.amf.AMFDataItem cannot be cast to com.wowza.wms.amf.AMFDataObj

```

If I disable transcoding no difference.

This is not a big problem but size of logs raises uselessly

---

<div class="post-metadata">

**Author:** ![Emanuele\_Bragagnolo](https://avatars.discourse-cdn.com/v4/letter/e/e47c2d/32.png) [@Emanuele\_Bragagnolo](https://community.wowza.com/u/Emanuele_Bragagnolo)\
**Post date:** [November 29, 2012, 6:05pm UTC](https://community.wowza.com/t/patchwork-artifact-in-transcoded-video-for-http-streaming/39555/12 "2012-11-29T18:05:26Z")

</div>

Yes, good hint thank’s.

I disable it and errors disappear.

Unfortunatly I need that module because it’s used by other instances under the same application: I’ll will delete the old log files with a script in cron.

Thank you again.
