Discussion:
[FFmpeg-user] Bitrate won't change
Michael Murphy
2017-12-18 14:20:24 UTC
Permalink
Fairly new user here trying to stream an IP camera from a Rasberry Pi3 (Debian) to Youtube for live view.

This works but crashes as the audio and video bitrate do not change and are too high.

Here's my command line:

ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -thread_queue_size 512 -i rtsp://admin:***@xx.xx.xx.xxx/544/h264/ch1/main/av_stream -tune zerolatency -vcodec libx264 -preset slower -x264opts bitrate=2500:vbv-maxrate=2500:vbv-bufsize=166 -g 120 -pix_fmt yuv420p+ -c:v copy -c:a aac -strict experimental -b:a 128k -f flv rtmp://a.rtmp.youtube.com/live2/my_youtube_key


Once launched terminal shows stream as
Frame= 69 fps= 68 q=-1.0 size= 1043kb time=00:00:02.09 bitrate=4086.9kbits/


Youtube reports:
The audio stream's current bitrate (2.00 Kbps) is lower than the recommended bitrate. We recommend that you use an audio stream bitrate of 128 Kbps.
The stream's current bitrate (4001.00 Kbps) is higher than the recommended bitrate. We recommend that you use a stream bitrate of 2500 Kbps.

Mike Murphy - Supervisor
uOttawa Science Electronics Shop
009-140 Louis Pasteur Priv
Ottawa, ON K1N 6N5
(613)562-5800 ext.6745
***@uottawa.ca<mailto:***@uottawa.ca>
[uOttawa]
Simon Brown
2017-12-18 17:10:22 UTC
Permalink
Post by Michael Murphy
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -thread_queue_size 512 -i
zerolatency -vcodec libx264 -preset slower -x264opts
bitrate=2500:vbv-maxrate=2500:vbv-bufsize=166 -g 120 -pix_fmt yuv420p+
-c:v copy -c:a aac -strict experimental -b:a 128k -f flv rtmp://
a.rtmp.youtube.com/live2/my_youtube_key
Unless I'm much mistaken you have -c:v copy which implies it's not going
to change the video bit rate at all - it's just copying the video stream.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with subje
Michael Murphy
2017-12-18 20:19:38 UTC
Permalink
Worse!

ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -thread_queue_size 512 -i rtsp:// admin:***@xx.xx.xx.xxx /544/h264/ch1/main/av_stream -tune zerolatency -vcodec libx264 -preset slower -x264opts bitrate=4000:vbv-maxrate=4000:vbv-bufsize=166 -g 120 -c:a aac -b:a 128k -f flv rtmp://a.rtmp.youtube.com/live2/ my_youtube_key


Mike Murphy - Supervisor
uOttawa Science Electronics Shop
009-140 Louis Pasteur Priv
Ottawa, ON K1N 6N5
(613)562-5800 ext.6745
***@uottawa.ca



-----Original Message-----
From: ffmpeg-user [mailto:ffmpeg-user-***@ffmpeg.org] On Behalf Of Simon Brown
Sent: December-18-17 12:10 PM
To: FFmpeg user questions
Subject: Re: [FFmpeg-user] Bitrate won't change
Post by Michael Murphy
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -thread_queue_size 512
-tune zerolatency -vcodec libx264 -preset slower -x264opts
bitrate=2500:vbv-maxrate=2500:vbv-bufsize=166 -g 120 -pix_fmt
yuv420p+ -c:v copy -c:a aac -strict experimental -b:a 128k -f flv
rtmp:// a.rtmp.youtube.com/live2/my_youtube_key
Unless I'm much mistaken you have -c:v copy which implies it's not going
to change the video bit rate at all - it's just copying the video stream.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-***@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-re
Carl Eugen Hoyos
2017-12-18 23:28:44 UTC
Permalink
Complete, uncut console output missing.
Post by Michael Murphy
The audio stream's current bitrate (2.00 Kbps) is lower than the recommended
bitrate. We recommend that you use an audio stream bitrate of 128 Kbps.
FFmpeg aac encoder does not support cbr, silence always uses a low bitrate.
Post by Michael Murphy
The stream's current bitrate (4001.00 Kbps) is higher than the recommended
bitrate. We recommend that you use a stream bitrate of 2500 Kbps.
Isn't this what you requested?

Consider using file input and file output to make
reproducing your use case easier.

Remember not to top-post here, Carl Eugen
_______________________________________________
ffmpeg-user mailing list
ffmpeg-***@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-***@ffmpeg.org with s

Loading...