I want to convert the asf file which is having codec "A4;ACELP;;Racal Recorders".
Codec is detected using MediaInfo library. The file is not playable using any common audio/video players like VLC. Converting to wav using FFmpeg fails with error unknown codec.
Is there any converter/FFmpeg-plugin available for this codec?
PS:I'm not able to share the file due to security policy
Related
I need to convert an audio file (any common format) into a rtp stream saved in a .pcap file with G.722 Codec.
The generated .pcap file will be sent with SIPp using:
<exec play_pcap_audio="g722.pcap"/>
I know it is possible to send also .wav file with the following command, if the .wav is correctly encoded:
<exec rtp_stream="g711.wav"/>
But seems that is not possible to encode a .wav with G722.
There are multiple solutions on the web and SO on how to convert a .pcap into an audio file, but I'm actually looking for the opposite.
Steps to convert wav audio to .pcap file:
Split audio to 20 ms chunks
Encode each chunk with G.722 encoder
Create RTP header for each encoded chunk
Save RTP stream to .pcap
I've never used SIPp, but if it can process encoded G.722 stream, then use ffmpeg for encoding:
ffmpeg -i sample.wav -ar 16000 -acodec g722 sample.g722
Get softphone supporting wav files as source and G.722 codec, make call with only G.722 enabled, capture RTP stream to pcap.
I want to add a 5.1 .flac audio track to a .ts file that already has three audio tracks. I tried with tsMuxer and ffmpeg with unsuccessful results. In tsMuxeR the .flac track is not recognized and in ffmpeg everything seems to work fine until the very last moment when I check the file and the .flac audio track is not included in the "output.ts". The .flac track is about 3GB and its lenght is around two and a half hours.
Thank you so much.
I don't think you'll find any existing software that maps FLAC into a MPEG-2 Transport Stream.
This gives you an idea what sort of issues you run into: https://xiph.org/flac/ogg_mapping.html
Let's say you came up with a reasonable way of mapping FLAC into a MPEG-2 Transport Stream - there won't be anything reading it.
Unless there is a specified way of mapping FLAC into a MPEG-2 Tranport Stream - you are on your own.
But PCM is supported in a MPEG-2 Transport Stream (for example Blu-Ray).
I'd use ffmpeg to transcode your audio from FLAC to PCM and then mux it into your transport stream.
Your audio transcode (FLAC to PCM) is lossless.
I have got this capture file (pcap) with RTP packets seems to be encoded by opus. In wireshark, analyzed the stream and saved as raw file.
Now I have got the .raw file of the audio. Using the opus tool from http://www.opus-codec.org/downloads/
I cannot decode it direct to wav because the file is raw,not .opus. I cannot encode it to .opus because this raw data is the extract of already encoded stream.
I just need to play this voice back. Any suggestions Please
As far as I know you won't be able to decode Opus stream extracted that way - framing information is lost. You need either write Wireshark module that would be able to decode opus or write another tool to extract stream from RTP into another container (typically OGG is used).
http://xiph.org/~giles/2012/rtpopus.c seems to be tool that you need.
Old question, but if anyone needs to decode Opus RTP packets, here is the solution:
PJSIP comes with a tool (pjsip-apps/src/samples/pcaputil.c) that does just that. It gets compiled by default, just make sure you have libopus-dev installed before you build PJSIP. Simply feed a pcap file with RTP packets to pcaputil and specify the codec on the command line (e.g. "opus/48000"). You will get the decoded audio as a PCM WAV file.
pcaputil can also decrypt SRTP packets (if given the key), however I could not get that to work and instead used srtp-decrypt to decrypt the packets, followed by Wireshark to convert the .txt output back to .pcap for feeding to PJSIP's pcaputil (see also https://www.acritelli.com/hacking-voip-decrypting-sdes-protected-srtp-phone-calls/).
I have a text file contaning payload of RTP packets (in hex,coded with GSM\ opus\speex ) belong to a VoIP conversation, does anyone know how to convert this file into a .wav audio file?
I'm using windows.
Thanks
.wav is just an file container which you can have an any codec format and makes the player to recognize the codec inside. Refer Wiki: WAV and for more technical details refer WaveFormat. And It just wrappers the raw codec content. If you have experience in C program, there are open source available to convert one codec to PCM. Since PCM is the raw audio data in 16 bit format.
But I suggest an solution but don't know it will met your requirement.
install latest wireshark
using wireshark capture the RTP packets.
Select UDP packet and Right click and choose Decode As option
Select Transport tab and choose RTP protocol
Now you can see RTP packet with right codec
Go to Telephony -> RTP -> Stream analysis -> Save the RTP Payload as .raw
At this stage the codec data is available in .raw file format.
There are open software are available are available such as SoX, ffmpeg etc...
From there are you can covert .raw to .wav format.
After that you can play in VLC (PCM, GSM, ADPM, Alaw , uLaw) or any other supported player (Amr)
You won't find Speex, g729 since these are paid
I need to find the codec of an audio file. How can I do this?
Do I need to write code to do this or is there a simpler way?
Please help me. If possible share helpful links.
The good old file utility will reveal lots of information about audio files, sometimes including the codec:
$ file X.wav
X.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 Hz
#bhebsquines
"It is important to distinguish between a file format and an audio codec. A codec performs the encoding and decoding of the raw audio data while the data itself is stored in a file with a specific audio file format. Although most audio file formats support only one type of audio data (created with an audio coder), a multimedia container format (as Matroska or AVI) may support multiple types of audio and video data." - http://en.wikipedia.org/wiki/Audio_file_format
The application gspot does a good job of pulling codecs from audio and video files.
http://www.headbands.com/gspot/
run it and drag a file into the window. It will pull all of the data from there. Note that some audio files will not display a codec as they are made from "Raw" audio.
You can identify your codec by extenion name itself example file1audio.mp3 or fileaudio.avi, .mp3, .avi will be your file type or codec, you can use k-lite codec pack for your different type audio format. use this link http://www.free-codecs.com/download/k_lite_codec_pack.htm