How can we extract the raw AAC frames from an mp4a-latm content packetized in RTP packets?
I have gone through the RFCs 3016 but nothing is concrete and much clearer.
I have also seen the code of ffmpeg as how they do it. I have understood that they are using the config data and parsing it but how they are using it and what processing they are doing on raw data is not clear.
Can anybody help out?
Related
Is it possible to buffer the video/audio in WebRTC (of course, having then a delay on the other side) to improve the quality?
WebRtc does buffering automatically when it is necessary. You don't have to think about it.
There's no exact way to fully control this, but there are some settings in the Opus codec that can influence it, like, minptime, ptime, maxptime. Please check https://datatracker.ietf.org/doc/html/draft-spittka-payload-rtp-opus-03#page-12 for more info.
I want to send my encoded NAL packets via UDP as a fast webcam streaming program.
Because of the MTU size, I want to set the NAL packets to a max size of around 1390 bytes.
I've found another response on Stack Overflow explaining that one has to set the i_max_slice_size or something, but this was for x264. I've been trying to find the equivalent for x265 but I cannot see it anywhere.
I am using the libx265 (using x265.h) library for encoding.
Can anyone guide me in the right direction please? All help is greatly appreciated!
AFAIK there is no such thing in libx265 currently (it is in earlier stage of development and not all use cases are currently covered). Also as far as I looked it doesn't support more than one slice per frame at all currently not saying about size limited slices.
Could NAudio be used to convert a radio-stream to PCM samples, in real-time?
I've seen documentation and questions regarding conversion of local audio-files, but did not find reference to real-time conversion of an online (radio) stream.
My current specific interest is in a ShoutCAST MP3 stream.
Solution is to embedded in a Winforms application written using VB.Net. Target OS is Windows 7.
Your assistance would be much obliged.
Here's an answer by Mark Heath, on CodePlex:
Regarding MP3 Streams:
hi, have a read of my blog post here about streaming MP3: http://mark-dot-net.blogspot.co.uk/2011/05/how-to-play-back-streaming-mp3-using.html.
To calculate power, you'd examine the PCM sample values after decompressing, and perform your own calculations.
Regarding ShoutCAST Streams:
NAudio does not decode Shoutcast at the moment.
Even so, if someone does have a solution for ShoutCAST streams, I'd appreciate it if you post it here.
I am receiving RTPs via UDP (video data).
The RTPs are holding H264 that I need to decode. Unfortunately, most of the RTPs hold fragmented data. As RTP sequences are missing, I cannot reconstruct the H264 properly.
Any idea on how to reduce data loss in order to be able to decode at least o couple of frames ?
There is not much one can say. Lost data is lost as the adjective suggests. You can't get it back. In almost any case you can still feed the remaining NALs into the decoder and render the video. You will see artifacts that are introduced by the missing NALs but that's life.
Lost data is lost.
In order to reduce data loss you will need to change your transmission protocol. Interleaved RTP in RTSP could be a good choice that bases on a similar technolgy stack.
Changing to TCP will obviously only help if you got enough bandwidth to transmit the video.
If you have control on H264 encoder, enable Error resilience tools,(http://www.slideshare.net/coldfire7/error-resiliency-and-concealment-in-h264-presentation)
which makes your video more robust towards transmission errors.
So that your RTP over UDP becomes 'more resistant' towards packets losses.
So I want to stream the audio from a mic using NAudio and then pass that stream to WCF which a Siverlight app can consume to broadcast the live audio sound. I want the latency to be as low as possible.
Any suggestions or if some one has already done it please point the source. Thanks in advance
what you are asking is certainly possible, but will be a fair amount of work to do.
NAudio can handle to capturing microphone audio.
At the Silverlight end you can play custom audio formats (in this case PCM) using a custom media element streaming source. See this one: http://code.msdn.microsoft.com/wavmss
I suspect latency would not be very good. You can reduce it by keeping the buffer sizes small. Also bear in mind that WAV is not a very efficient format to be sending over the network.
To have low latency as possible, you should use the netTcpBinding and stream your audio in binary format. I would use MemoryStream for this and try to play with the buffersize to figure out what the best performance is. Also, try checking audio formats for best performance. This also depends of the audio quality you expect.