Wowza Community

How to setup bitrate and frame size for a transcoded video

Still on the same problem,

It is possible that the reason of my problem in the fact that in the content:

the file that describe incoming stream look like this:

program1.stream with the following content:

udp://239.0.12.2:5000

but the original stream is coming through rtp:

rtp://239.0.12.2:5000

When i try to use rtp://239.0.12.2:5000 instead of udp://239.0.12.2:5000, wowza give an error and , I’m not able to play it.


#Fields: x-severity     x-category      x-event date    time    c-client-id     c-ip    c-port  cs-bytes        sc-bytes        x-duration      x-sname x-stream-id     x-spos  sc-stream-bytes cs-stream-bytes    x-file-size     x-file-length   x-ctx   x-comment
WARN    server  comment 2012-07-27      15:00:51        -       -       -       -       -       3.121   -       -       -       -       -       -       -       -       RTPSessionDescriptionDataProviderBasic.getStreamInfo: SDP file missing: /usr/local/WowzaMediaServer/content/[B][COLOR="#FF0000"]rtp://239.0.12.2:5000[/COLOR][/B]
WARN    server  comment 2012-07-27      15:00:51        -       -       -       -       -       3.702   -       -       -       -       -       -       -       -       LiveStreamPacketizerSmoothStreaming.handlePacket[rtplive/_definst_/program2.stream][mp4a.40.33]: MP3 Audio: Audio is not MPEG1 Layer 3. May not be playable by Silverlight player.
WARN    server  comment 2012-07-27      15:00:51        -       -       -       -       -       3.741   -       -       -       -       -       -       -       -       JNI:VideoEncoderH264::setDefaults: CPUID vendor:GenuineIntel isMMX:1 isSSE:1 isSSE2:1 isSSE3:1 cpu_opt:6


If I changed StartupStreams.xml:

from rtp

to liverepeater

it solve sdp error, but appear a new one:

WARN    server  comment 2012-07-27      15:19:05        -       -       -       -       -       5.476   -       -       -       -       -       -       -       -       NetConnectionConnection.connect: Failed to connect[239.0.12.2:5000]: org.apache.mina.common.RuntimeIOException: Failed to get the session[java.net.SocketException: Network is unreachable].
WARN    server  comment 2012-07-27      15:19:08        -       -       -       -       -       8.476   -       -       -       -       -       -       -       -       NetConnectionConnection.connect: Failed to connect[239.0.12.2:5000]: org.apache.mina.common.RuntimeIOException: Failed to get the session[java.net.SocketException: Network is unreachable].
WARN    server  comment 2012-07-27      15:19:11        -       -       -       -       -       11.476  -       -       -       -       -       -       -       -       NetConnectionConnection.connect: Failed to connect[239.0.12.2:5000]: org.apache.mina.common.RuntimeIOException: Failed to get the session[java.net.SocketException: Network is unreachable].
WARN    server  comment 2012-07-27      15:19:11        -       -       -       -       -       11.577  -       -       -       -       -       -       -       -       NetConnectionConnection.connect: Failed to connect[239.0.12.2:5000]: org.apache.mina.common.RuntimeIOException: Failed to get the session[java.net.SocketException: Network is unreachable].
WARN    server  comment 2012-07-27      15:19:14        -       -       -       -       -       14.577  -       -       -       -       -       -       -       -       NetConnectionConnection.connect: Failed to connect[239.0.12.2:5000]: org.apache.mina.common.RuntimeIOException: Failed to get the session[java.net.Socke

the firewall is stopped, if i take the cable that with incoming stream and connect to my laptop I can get the source stream.

once again , thank you for your help

Hello, here is not the router problems. Because i checked and the outgoing stream (the stream that is getting out after wowza transcoding), and at this moment start the problem of the packet lost.

Still having problems , and i got the same question , why I can’t use rpt protocol for incoming stream, but just udp?

Then why if I’am doing transcoding on vlc, it is accepting rtp?

The source stream is h.264 and mpeg 1 audio.

Hi

You said

The transcoding is working fine

But then you said

I think that I’m unable to do transcoding at all.

Which one is it?

Do you know the bitrate of the source stream?

You have the first transcoder block set to false which means it wont be active and the second block “_360p” is set to transcode the stream to 850(kbps), I’d say this is quite high but that would depend on the bitrate of the source.

Can you post what it says in the Wowza logs when you’re transcoding?

Jason

Hi

Looking at the source stream coming into the transcoder it appears that the source audio isn’t accepted.

Supported Video and Audio Codecs for Ingest

Wowza Transcoder supports the following video and audio codecs:

Video decoding: H.264, MPEG2, MPEG4 Part 2

Video encoding: H.264

Audio decoding: AAC, MP3, MPEG 1 Part 1/2, Speex, G.711 (a-law and mu-law)

Audio encoding: AAC

Your error in the Error log:

MP3 Audio: Audio is not MPEG1 Layer 3

If the audio is mp3 the frequency must be one of these values:

32000 32000 Hz

44100 44100 Hz

48000 48000 Hz

and the bitrate must be one of these values:

32000 32 kbps

40000 40 kbps

48000 48 kbps

56000 56 kbps

64000 64 kbps

80000 80 kbps

96000 96 kbps

112000 112 kbps

128000 128 kbps

160000 160 kbps

192000 192 kbps

224000 224 kbps

256000 256 kbps

320000 320 kbps

The error “Video behind filter state change. New state: ALLFRAMESOFF” means that you have run out of CPU on the server doing the transcoding.

It appears that you are trying to transcode 6+ streams on this server according to the logs.

Jason

Hi

Take a look in the logs again and see if you get some kind of SKIPPED message where a frame was missed. It should look similar to “Video behind filter state change. New state: ALLFRAMESOFF”.

I assume you have taken some of the transcoding off in order to get this far?

This is probably the reason for white noise and possibly a keyframe was being skipped as well.

It’s not because its a trial license this only makes the overly compulsory.

What are the server hardware specs?

RAM, CPU, Network speed, etc.

Jason

Hi

So as you can see you have had a big improvement when lowering the number of transcodes, as this is only a single quad-core CPU and you are still experiencing problems (possibly skipping frames), I would lower the transcodes further to test whether lowering the number of transcodes resolves this issue.

Did you see anything else in the Access logs about skipping frames?

Jason

Hi

Just checking is your Wowza server tuned?

You can find the tuning guide here,

https://www.wowza.com/docs/how-to-do-performance-tuning

This may improve the quality and/or number of available transcodes you can do.

Is the audio stream from your source meeting the mp3 requirements?

If the audio is mp3 the frequency must be one of these values:

32000 32000 Hz

44100 44100 Hz

48000 48000 Hz

and the bitrate must be one of these values:

32000 32 kbps

40000 40 kbps

48000 48 kbps

56000 56 kbps

64000 64 kbps

80000 80 kbps

96000 96 kbps

112000 112 kbps

128000 128 kbps

160000 160 kbps

192000 192 kbps

224000 224 kbps

256000 256 kbps

320000 320 kbps

What client are you playing the transcoded stream through?

Does both the source and transcoded stream both get audio when playing through Wowza?

If the above information is true (1 of each value) I can’t figure out why you’re getting these messages :

MP3 Audio: Audio is not MPEG1 Layer 3. May not be playable on iOS Device.

MP3 Audio: Audio is not MPEG1 Layer 3. May not be playable by Flash player.

MP3 Audio: Audio is not MPEG1 Layer 3. May not be playable by Silverlight player.

Can you give the codec info on the source stream, maybe open with VLC and look at the codec from a client to see what that says.

Jason

Hi

Thanks for the new info,

You originally had a problem with “program1.stream” and “program3.stream” but I can’t see anything to do with program1/3.stream in the access log which we were tracking yesterday. Lets fix one problem before moving on to any others, Is the transcoded stream still giving a intermittent pixel problem?

If it is you can add some debug to the access log by following this tutorial,

https://www.wowza.com/docs/how-to-turn-on-an-rtp-jitter-buffer-and-packet-loss-logging-rtp-and-mpeg-ts

could you also send me the startupstreams info again please?

Are you still using program1,2 and 3.stream?

What is in the “program4.stream” file?

Jason

Hi

In my opinion the best thing to do from here is change the encoder to stop running on all channels except one as you currently have it running mulitcast to multiple channels.

Test on the one channel you are now sending the stream to and see if you have any issues, the debug hasn’t displayed anything and may have been added incorrectly.

Jason