What is the file format/encoding of this binary data stream

194 views Asked by At

I have some binary blobs (blob from MySQL). These are suppose to be an audio stream recorded using JS web-app.

I took one of these blobs and save it as a.wtf file. When I ran strings a.wtf, I get some useful information.

webmB
QTmuxingAppLibWebM-0.0.1WA
QTwritingAppLibWebM-0.0.1
A_OPUSc
OpusHead
OPUS
...

I also tried the following in the terminal (tips on google).

[dilawars@chutki data (master)]$ mkvextract a.wtf tracks 0:audio.opus
Error: (mkvextract) The file 'a.wtf' could not be opened for reading: Not a valid Matroska file (no segment/level 0 element found).

Download a.wtf.

Any help is very much appreciated? Ideally, I'd like to convert them to WAV format.

Update

I used this tool.

[dilawars@chutki data (master)]$ hachoir-metadata a.wtf 
[err!] Unable to parse file: a.wtf
1

There are 1 answers

2
Dilawar On BEST ANSWER

Thanks to the tip by @bryc, I managed to find a solution. The data in MySQL is in base64 encoding (uploaded file a.wtf is already in binary format). I decode them back to a binary stream and saved it as a.webm file. After that, I ran the following command.

$ ffmpeg -i a.webm -ac 1 -f wav -vn -ar 20500 a.wav