Wowza Community

Wowza Streaming Engine segmenting 1 hour video in 2 chunks

Hello,

I have a MP4 video that when I play it locally, I can see it without problems but when I play it via Wowza the chunks are huge.

From Windows I can get the following information on the file properties and VLC’s codec information:

But when I try to play it via VOD in Wowza Streaming Engine, the following playlist and chunklist:

It is a 1.2 GB video that lasts more than an hour and WSE is segmenting it in 2 chunks! Since we have a link with a small BW to the WSE you can imagine how that it takes 20 minutes just to get the video started.

I must add that I already tried adding “/Root/Application/HTTPStreamer - cupertinoChunkDurationTarget - Integer - 10000” to Application > Properties > Custom, and the result is exactly the same.

Can someone tell me how to solve this?

Wowza Streaming Engine creates chunks on keyframes in the video you are delivering. You must make sure that your source content has keyframes, also known as a Group of Pictures or GOP, at even distances. From what you describe the video you have was created with an open GOP. Streaming media does not support an open GOP.

We have an article on how to create streaming media compatible content. While the article focuses on the free and open source command line encoder FFmpeg, the same concepts apply to all encoders and content.

https://www.wowza.com/docs/how-to-encode-vod-using-ffmpeg-with-wowza-streaming-engine

Please do not use Handbrake to create content as they removed the “no-scenecut” option from their source code and as such it cannot make streaming media compatible content.

https://github.com/HandBrake/HandBrake/blob/master/libhb/encx264.c

How can I check that this is actually the reason? How can I evaluate the distances of the video’s keyframes? Also, what do you mean by Handbrake?

You were right. The keyframes are not at even distances:

I am trying to encode the video with the ffmpeg command mentioned in the article you references but I get a “sergmentation fault (core dumped)”.

The command is:

ffmpeg -i fb9cd51f-7e8f-4d50-b324-fcfd0809fec0.mp4 -pix_fmt yuv420p -vsync 1 -threads 0 -vcodec libx264 -r 29.970 -g 60 -sc_threshold 0 -preset medium -profile:v main -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af “aresample=async=1:min_hard_comp=0.100000:first_pts=0” -f mp4 -y fb9cd51f-7e8f-4d50-b324-fcfd0809fec0.tmp -loglevel debug

And the result I get is the following:

Do you have any ideas as why can this be happening?

It was due to older version of ffmpeg (3.4). I tried with 4.1 and it worked.

Thanks for the update!