audio file format
See original GitHub issueIssue Description
Hi,
I am trying to record audio in the browser
const {
status,
startRecording,
stopRecording,
mediaBlobUrl,
} = useReactMediaRecorder({
video: false,
audio: true,
blobPropertyBag: {
type: "audio/wav"
}
});
and fetching the file from it
const audioBlob = await fetch(mediaBlobUrl).then(r => r.blob());
console.log(audioBlob);
const audiofile = new File([audioBlob], `${uuidv4()}.wav`, { type: "audio/wav" })
Now i saved this file in disk, and used file audio.wav
and it shows up as as WebM file
$ file b61508fa-9c4e-47fc-bb54-5def7abf9bfc.wav ─╯
b61508fa-9c4e-47fc-bb54-5def7abf9bfc.wav: WebM
what i need is a wav file ! and it is giving me a WebM file
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Audio file format - Wikipedia
An audio file format is a file format for storing digital audio data on a computer system. The bit layout of the audio...
Read more >The 10 Most Common Audio Formats: Which One Should You ...
Audio File Format: MP3 · Audio File Format: AAC · Audio File Format: OGG (Vorbis) · Audio File Format: WMA (Lossy).
Read more >Best audio format file types | Adobe
The best audio format types for audiophiles. · MP3 MP3 (MPEG-1 Audio Layer III) is the most popular of the lossy formats. ·...
Read more >Top 10 Audio File Formats - Sage Audio
Top 10 Audio File Formats · 10. DSD · 9. Ogg Vorbis · 8. WMA (Lossless) · 7. WMA (Lossy) · 6. ALAC...
Read more >Audio Format - GeeksforGeeks
Audio Format ; PCM – · WAV – · AIFF – ; MP3 – · AAC – · WMA – ; FLAC –...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
blobPropertyBag
is used only for generating the blobs (after the recording has been completed) inside the media recorder. If you want to use a specific codec to use, you need to pass throughmediaRecorderOptions
. It’ll check for the browser support first and will emit aconsole.error
if there’s no support. I’d say not to use theblobPropertyBag
if it’s not a big-deal. It’s just a placeholder for extending theBlob
object. Or else we need to keep them in-sync.That being said, currently this library defaults to
video/mp4
/audio/wav
while generating the blob, which is kinda incorrect. That needs to be fixed.For a quick conversion, I’d suggest
ffmepg
, which has webm --> wav support I believe.