Ticket #349 (assigned Bug)

Opened 4 years ago

Last modified 21 months ago

[PATCH] InsufficientBW with VP6 encoder - live stream

Reported by: uoe2003 Owned by: tiago
Priority: Major Component: Streaming and Networking
Version: 0.9.0 RC1 Keywords: low bitrate FME
Cc:

Description

The problem is not with the screen video as far as we can tell. This is
a problem that has been there for a long time and seems to be brought up
in various contexts and circumstances. Here's what we see as the
consistent factors:

- using VP6 (whether it's FME or a custom VP6 encoder as in our case)
- live video encoding/streaming, not VOD.
- higher quality settings on the encoder (we haven't pegged the bitrate,
but our problems are occurring with a 400kbps stream at 15 fps)
- no load on the server memory or CPU or bandwidth (we're on a gigabit
internal and external)

To solve it, we have modified the Red5 server code (as posted a few days
ago for comment). See below.

As far as we can see, Red5 doesn't understand what the VP6 codec is, so
videoCodec is seen as null. Using the following modification we make it
do nothing if videoCodec is null and it seems to have fixed our problem,
but I think it might have just masked some other issue.

Comments welcome . . .

--- .svn/text-base/PlaylistSubscriberStream.java.svn-base 2007-12-05 05:27:04.000000000 -0500
+++ PlaylistSubscriberStream.java 2007-12-06 11:37:58.000000000 -0500
@@ -1889,6 +1889,8 @@

}


if (videoCodec == null videoCodec.canDropFrames()) {

+ if(videoCodec == null) {
+ } else {

if (state == State.PAUSED) {

// The subscriber paused the video
videoFrameDropper.dropPacket(rtmpMessage);

@@ -1925,6 +1927,7 @@

}


videoFrameDropper.sendPacket(rtmpMessage);

+ }

}

} else if (body instanceof AudioData) {

if (!receiveAudio && sendBlankAudio) {

Andy wrote:


Try this screen video broadcaster....Of course point it to your red5
server ;)

I have no trouble at high bandwidth with screen video. FME hasn't
given me satisfying results... yet.

-----Original Message-----
*From:* red5-bounces@… red5-bounces@… *On
Behalf Of *Mr Seb
*Sent:* Sunday, December 09, 2007 12:15 PM
*To:* red5@…
*Subject:* Re: [Red5] Bandwidth throttling within Red5.

I'm using FME.

The output from FME is a steady 15 FPS (or whatever I set it to),
using whatever bit rate I set it to.

Anything over the 350kbs preset and I suddenly start hitting
InsufficientBW errors.

I'm running the Red5 server remotely - on a linux box. But it's
collocated on 100mbits, and the CPU is not under any load.

As far as I can tell, there's no hardware limitations in the equation.

I haven't tried running it locally - I guess I can try that. But I
don't know what that proves, if there is plenty of bandwidth available
on the remote box!

I was wondering if perhaps the default buffer sizes can't cope with a
high-resolution (720*576) stream at 15 FPS... but... I really don't know :)

The content is the live, stream of the display of my computer. No
audio (yet).

-S

------------------------------------------------------------------------

*From:* red5-bounces@… red5-bounces@… *On
Behalf Of *Andy
*Sent:* 09 December 2007 20:10
*To:* red5@…
*Subject:* Re: [Red5] Bandwidth throttling within Red5.

There are none.

Do you get the same response running it locally?

Or are you already?

Are you using FME? I find it spurts where the screen video capture is
a steady dribble.

I have better luck live, with screen video.

andy

-----Original Message-----
*From:* red5-bounces@… red5-bounces@… *On
Behalf Of *Mr Seb
*Sent:* Sunday, December 09, 2007 11:56 AM
*To:* red5@…
*Subject:* [Red5] Bandwidth throttling within Red5.

Hi,

Could someone walk me through how to ensure there is absolutely no
bandwidth/stream bit rate limits in place?

I'm pretty sure the default red5-trunk install has none in place, but
I'm really out of guesses on why the oflaDemo won't let me stream
anything over 350kbit/sec without a lot of NetStream.InsufficientBW
errors popping up.

Of course, if someone has managed to make an 'unlimited' oflaDemo, I'm
interested in that too!

Cheers,

-S

------------------------------------------------------------------------

Change History

Changed 3 years ago by paul

I have applied a fix to PlayEngine, based on the resolution posted here. The original class referenced has changed quite a bit since this was submitted so the fix will need to be verified. If a bug is found, please resubmit under a new ticket. Applied to r3146 and tested with FME 2.5

Changed 2 years ago by sputnick

  • keywords low bitrate FME added
  • resolution Fixed deleted
  • status changed from closed to reopened
  • component changed from Streaming and Networking to App Server
  • version changed from 0.8 RC2 to 0.9.0 RC1

Hi,

I can confirm that trunk version (0.9) has the same bitrate limiting problem using VP6 AND h.264.
I have tested it extensively and the only difference being is that nothing is reported at all on the server (because the checkbandwidth method was removed I think).

So the problem remains that using FME (3.0 windows and 3.1 mac pre-release) against local server or remote server with plenty of IO and CPU capabilities is always capped at around 450-500Kb for video and audio combined! Which is very bad for live production obviously.

I have so far tested against all 0.9 versions but I haven't tried 0.8 with the above patch (0.8.0 (tag) couldn't stream my video but never dropped a frame).

My test case is simple and needs no special code.

Just stream live from FME to red5 with a video bitrate of 650kb or higher (25 fps vp6 or h.264) and audio 96kb+ and select Auto adjust (to see FME change the bitrate otherwise you will just get very studdering video).

I'm using jwplayer or Publisher to view the video. The players buffer will empty and fill rapidly and if auto adjust is not selected the video will stop.

Eiki, Idega Open Source

Changed 2 years ago by sputnick

Just wanted to add that we have talked alot about this in the mailing list via the thread:
Re: [Red5] Buffer empty - live video streaming - what can cause it?

Changed 2 years ago by sputnick

  • owner changed from paul to tiago
  • status changed from reopened to assigned
  • component changed from App Server to Streaming and Networking

assigned to tiago as requested on the mailing list.

p.s.
I'm also getting very frequent "pops" in the audio no matter how high the bitrate I use.

Changed 21 months ago by bascorp

Note: See TracTickets for help on using tickets.