Wowza Community

PatchWork Artifact in transcoded video for HTTP Streaming

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

    Cpu average load about 45%, maximun load 65%.

    Wowza Version 3.1.2 running on ubuntu 12.04 in ec2.

    The output video is available to clients with HDS, HLS and Smooth Streaming Protocol. RTMP and rtsp is available for debug purpose.

    All http streaming video reproduced presents lots of artifact like patchwork. I have taken some screen shot.

    To debug purpose I’ve tested deeply single 1200 transcoded bitrate. I’ve tested quickly also the others bitrate, and the behaviour is the same of 1200 one.

    This is what I noticed:

  • 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.

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

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

Richard

At 25fps and KeyFrameInterval /Interval set to “100”, that is a key frame interval of 4 seconds. With default cupertinoChunkDurationTarget (article) 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:

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

Richard

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

Do you any custom modules?

Richard

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

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.

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.

Nothing from logs

[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.

All profiles are Baseline

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. :confused:

One last question:

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

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

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.