I am trying to record audio using C++ with openAL and save it as .wav file, so far i suceeded with first part, but can't find a way to save audio in a file. I read documentation and didn't find any way to do so. Am I missing something?
To save a *.wav file, you don't really need OpenAL. Look at the *.wav type-specifications, which are all over the web. You have just to create a header which describes your data and paste in your recorded data.
Related
I read about wav file format and found too many projects of steganography based on it but didn't found that much projects based on mp3 though it is found more frequently on web than wav.
The wav format is uncompressed audio with no formatting headers. You can change a few bits in this format without significantly affecting the audio; you will not break the file format and a listener will not be able to tell the difference between the original file and the modified one.
The mp3 format is compressed audio. If you change bits in mp3, you run risks:
You modify a header and the audio no longer plays back
You modify the audio, and a listener can tell the file is weird. The audio is compressed, so changes in the audio data get magnified upon decompression.
i'm a bit at loss here. My goal is to merge two video files (which might be of different file formats) and i'm already using libffmpeg for other simple tasks. I thought libffmpeg exposed some kind of function to merge files, but i can't find it.
I found these pages on the documentation that might be relevant: http://ffmpeg.org/doxygen/trunk/structConcatStream.html and http://ffmpeg.org/doxygen/trunk/group__lavf__encoding.html
I'm not sure if this is really relevant though? Can anybody point me in the right direction? Do i need to use FFmpeg muxing and manually joins streams? Is there any example that can explain to me what i should do? thanks!
For those looking for an example, i ended up using
How to use libavformat to concat 2 video files with same codec (re-muxing)?
there's a nice snippet and it works very well
Use ffmpeg to open file 1, start reading frames, converting to target format, and writing to the output file. When there are no more frames, close file 1 (leave output open). Open file 2, start reading frames, converting to target format, and writing to the output file. When there are no more frames, close file 2 and close output.
Merged and formats reconciled.
Let's say I have a WAV file. I downloaded Synthesis Tool Kit to use for reading/writing of these files.
I know I will need to figure out how to load up the file to be read, and afterwards get the sampling rate of the file, but I'm stuck after that. What do I need to do to grab the decibel values of this file? I want my audio processing to recognize what is noise and how to ignore it, while performing a FFT on when actual sound from my sensor is recorded.
Here is a picture of what my files look like when I open them with Audacity, while viewing them as Waveform(dB) as selected from a drop-down menu.
How do I get this type of data returned to me with the libraries available for C++?
I'm trying to work on loopback capture(What you hear) and record this file in mp3/aac format using VC++.
->I can capture audio and can create a .wav file i.e. not compressed but I want a compressed file so I'm encoding this through ffmpeg to write an mp3 file not a .wav.
However I'm not getting any way to do it directly?
I referred this for loopback capture.
Please share your experience and opinions.
Thanks!
I'm using the vp8 SDK (www.webmproject.org) to create a vp8-encoded video file. However, the SDK sample produces an IVF file, which the browser doesn't play.
I know the webm format is a matroska container so I guess I should store the video data in that format, but the mkv format specification is lengthy and complex and I don't think I should reinvent the wheel by figuring it out by myself.
So I would like to know if someone can recommend a sample of how to encode and produce a playable webm vp8 file.
If there is no such sample (as my searches on google suggest) at least point me to a simple and usable matroska lib which is proven to work for the browsers.