# How to setup bitrate and frame size for a transcoded video

**URL:** <https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945>\
**Category:** Wowza Streaming Engine\
**Created:** [July 13, 2012, 2:47pm UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945 "2012-07-13T14:47:26Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Vadim\_Lungu](https://avatars.discourse-cdn.com/v4/letter/v/ed8c4c/32.png) [@Vadim\_Lungu](https://community.wowza.com/u/Vadim_Lungu)\
**Post date:** [July 27, 2012, 2:03pm UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/21 "2012-07-27T14:03:56Z")

</div>

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.

* * *

```auto
#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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Vadim\_Lungu](https://avatars.discourse-cdn.com/v4/letter/v/ed8c4c/32.png) [@Vadim\_Lungu](https://community.wowza.com/u/Vadim_Lungu)\
**Post date:** [July 30, 2012, 7:15am UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/22 "2012-07-30T07:15:53Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Vadim\_Lungu](https://avatars.discourse-cdn.com/v4/letter/v/ed8c4c/32.png) [@Vadim\_Lungu](https://community.wowza.com/u/Vadim_Lungu)\
**Post date:** [August 1, 2012, 11:57am UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/23 "2012-08-01T11:57:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Vadim\_Lungu](https://avatars.discourse-cdn.com/v4/letter/v/ed8c4c/32.png) [@Vadim\_Lungu](https://community.wowza.com/u/Vadim_Lungu)\
**Post date:** [August 2, 2012, 10:52am UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/24 "2012-08-02T10:52:36Z")

</div>

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

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

---

<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:** [July 16, 2012, 2:00pm UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/25 "2012-07-16T14:00:08Z")

</div>

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

---

<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:** [July 17, 2012, 10:23am UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/26 "2012-07-17T10:23:33Z")

</div>

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

---

<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:** [July 17, 2012, 12:42pm UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/27 "2012-07-17T12:42:32Z")

</div>

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

---

<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:** [July 17, 2012, 1:51pm UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/28 "2012-07-17T13:51:16Z")

</div>

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

---

<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:** [July 17, 2012, 2:15pm UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/29 "2012-07-17T14:15:34Z")

</div>

Hi

Just checking is your Wowza server tuned?

You can find the tuning guide here,

> **[Tune Wowza Streaming Engine for performance](https://www.wowza.com/docs/tune-wowza-streaming-engine-for-optimal-performance)**
>
> Optimize Java, thread pool, Media Cache, and virtual host performance settings in Wowza Streaming Engine.

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

---

<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:** [July 18, 2012, 11:41am UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/30 "2012-07-18T11:41:24Z")

</div>

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](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

---

<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:** [July 18, 2012, 1:07pm UTC](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945/31 "2012-07-18T13:07:29Z")

</div>

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

[Previous page](https://community.wowza.com/t/how-to-setup-bitrate-and-frame-size-for-a-transcoded-video/36945.md?page=1)
