I'm studying to collect RTSP stream's video information
Codec, Frame rate, resolution, bitrate, etc.
But i can't find How to get realtime RTSP stream's bitrate.
What is formula of RTSP stream's bitrate??
I googled that. but i can't find it. It was just formula for saved video's bitrate or network bitrate.
please help me
A picture that explains the answer I want
Related
This video clip:
https://www.youtube.com/watch?v=wc0PB6Azwn0
What is the max audio bitrate and how to detect real audio bitrate? is it the same? Please no rumors and no guessing.
Does it depend on the video quality I am watching (1080p, 720p, etc)?
If you say - yes, it makes no sense, because the clip was uploaded at one bitrate only.
Hope, someone who knows the subject can answer that questions.
Is it possible to detect the audio bitrate from YouTube video at all?
Stats for nerds is useless, it shows no audio bitrate.
Taking consideration lossy (vs lossless) audio max is 320 Kbps, it cannot be higher than that by definition.
Anyone who knows?
You can use the command line tool youtube-dl to list all available transcodings for a given YouTube video by running youtube-dl -F <url-to-your-video>.
Example output using the URL mentioned in your question:
Studying the output we can see that the audio transcoding with the highest bitrate is "format 251" using the opus codec at an average bitrate of around 145k. Note that YouTube is not using a fixed bitrate but rather a variable bitrate with target of ~160k.
The opus codec is currently supported in most modern browsers (but not Safari). Browsers without support for opus will fallback to the m4a stream at a variable bitrate targeting ~128k.
If you want to make 100% sure which audio transcoding you're currently listening to, you can right click the YouTube video player and select "Stats for nerds" and look for the number mentioned in the codecs section and cross-reference that with the output given by youtube-dl:
Does it depend on the video quality I am watching (1080p, 720p, etc)? If you say - yes, it makes no sense, because the clip was uploaded at one bitrate only.
Yes, it depends on video quality. When you're choosing a video quality, you're not just choosing the video quality... you're choosing the audio quality as well. YouTube isn't giving you the option, but it's part of the package.
Videos aren't served as-is, they're transcoded. You upload your video and it's re-compressed at a variety of different bitrates with different settings.
Your audio bitrate depends on what YouTube decided to encode it as. Each video may have many versions of the stream.
The best thing you can do is get a build of FFmpeg with libquvi enabled, and let it parse the page, find the streams, download the stream, demux, and figure things out for you from there.
Taking consideration lossy (vs lossless) audio max is 320 Kbps, it cannot be higher than that by definition.
Your definition is wrong. There are all kinds of lossy audio codecs, and they can be ran at a variety of bitrates.
I am working on "upload video & audio to server",I want to know which format is best for upload (consider the quality & file-size)
video formats are just containers, if you want to consider quality and file size you should look into the encoding of video. For ios based devices h264 encoder with high efficiency level 4 provides the good compression, hence you will get good quality in less file size.
If you want to learn about conversion of video data from one format to another please look into ffmpeg.
How can I speed up video encoding (VideoWriter) and decoding (VideoCapture) in opencv? Can I use TBB (threading building blocks) library?
I am working with 1280x720 (720p) video and developing a real-time system but my video frame reading and writing alone are consuming 35 ms per frame. Please help.
I am currently in a webcam streaming server project that requires the function of dynamically adjusting the stream's bitrate according to the client's settings (screen sizes, processing power...) or the network bandwidth. The encoder is ffmpeg, since it's free and open sourced, and the codec is MPEG-4 part 2. We use live555 for the server part.
How can I encode MBR MPEG-4 videos using ffmpeg to achieve this?
The multi-bitrate video you are describing is called "Scalable Video Codec". See this wiki link for basic understanding.
Basically, in a scalable video codec, a base layer stream itself has completely decodable; however, additional information is represented in the form of (one or many) enhancement streams. There are couple of techniques to be able to do this including lower/higher resolution, framerate and change in Quantization. The following papers explains in details
of Scalable Video coding for MEPG4 and H.264 respectively. Here is another good paper that explains what you intend to do.
Unfortunately, this is broadly a research topic and till date no open source (ffmpeg and xvid) doesn't support such multi layer encoding. I guess even commercial encoders don't support this as well. This is significantly complex. Probably you can check out if Reference encoder for H.264 supports it.
The alternative (but CPU expensive) way could be transcode in real-time while transmitting the packets. In this case, you should start off with reasonably good quality to start with. If you are using FFMPEG as API, it should not be a problem. Generally multiple resolution could still be a messy but you can keep changing target encoding rate.
I was planning to decode H.264 based RTSP stream using FFMPEG in OpenCV but, when I tried so it gave some errors. Later, I found that many people have faced issues while decoding H.264 stream using ffmpeg (libavcodec). Typically the below mentioned error messages pop-up while using libavcodec:
"[h264 # 0xa766dd0]concealing 1200 DC, 1200 AC, 1200 MV errors"
Has anyone used any other library successfully for decoding H.264 based RTSP. If so, which is the library (I have heard of live555 which is used within vlc player for decoding such streams). I would also like to know the output format and how it can be made compatible with OpenCV (typically within opencv we can use cvQueryFrame to directly extract a frame from a video stream, but in case we are using a library other than ffmpeg how to go about it).
Thanks in advance.
Regards,
Saurabh Gandhi
VLC is using ffmpeg to decode h.264.
the problem can happen when you have the wrong SPS PPS, or don't have.
You need to extract it from the RTSP protocol and pass it to the ffmpeg before trying to decode video.
To Decode your RTSP stream , The best libraries are FFMPEG and Gstreamer.
To decode the stream you need to feed the decoder with the right buffer for which you have to understand your H.264 stream so that you can arrange your SPS, PPS and NAL data before feeding it to the Library Decoder