rtsp stream quality poor

Ok so after a long few days getting my http stream into wowza i have came up with a new problem. One of the best ways to show this problem is with a few pictures.

As you can see the output bitrate is very low resulting in a video stream which looks like this.

My ffmpeg command which is bringing the stream into the application looks like this.

ffmpeg -threads 0 -re -i "http://[server.url]" -vcodec libx264 -crf 24 -vb 150000 -g 60 -vprofile baseline -level 2.1 -acodec aac -ab 64000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb  -strict experimental -f mpegts udp://127.0.0.1:10000?pkt_size.1316

The -crf 24 i have added trying to tune this picture also the -threads 0 to try and make it use more cpu as it was only using about 10% for this single stream.

So my question is, Why is the output bitrate so low and how can i correct this.

Hi,

It might be related to the stream itself, but you may want to try removing the -re as that is usually used to maintain real time reading

of a local file instead of reading as fast a possible. It’s not normally used with input streams. Worth a try at least.

Daren

Hi,

The issue then is likely to be the http input stream and ffmpeg’s ability to process it.

Is there any error or other informational output from the ffmpeg command?

If you post that, perhaps someone in the community will recognize the issue.

Daren

Hi,

It might be related to the stream itself, but you may want to try removing the -re as that is usually used to maintain real time reading

of a local file instead of reading as fast a possible. It’s not normally used with input streams. Worth a try at least.

Daren

Hello thanks for the reply. I have tried removing the -re on the ffmpeg command and it has helped remove the errors which were appearing on the terminal when i was running ffmpeg. But still no joy. I have noticed that it can take 4 or 5 attempts to get vlc to play the stream. The server will show it as a player connected but no output bandwidth, then disconnect. but when it does connect the video still looks like it does in the image on the first post. I have treid playing the stream through a mobile device and desktop with the same results. I seems almost like the output bandwidth is sitting at 1/10th what is comming in?

I have this wowza server running on an aws instance so bandwidth shouldnt be a problem for one stream? Any more suggestions would be greatly appreciated…

It seems it is the way ffmpeg is handeling the stream. I have tried to transcode with vlc and everything works fine. I would prefer to use ffmpeg, as i think it will be more stable in the long run. I will keep you all posted if I finally find a solution to this.

Hi,

I want to ask a question.

Code:

I use this code — ffmpeg -i “udp://228.85.85.2**:3456” -vcodec libx264 -vb 150000 -s 640x360 -vprofile baseline -level 2.1 -acodec aac -ab 64000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:10000?pkt_size.1316

How can I use this code with ffmpeg publish this udp stream outgoing protocols RTSP ? and I don’t know How to receive with VLC this stream ?

P.s:This code running but with any player “Ex:VLC” that I don’t receive any stream .

Thanks for your help …