Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: How to determine the correct parameters for a raw audio stream? (Read 2529 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to determine the correct parameters for a raw audio stream?

Hello

I have a raw audio file extracted from a CCTV DVR. The DVR uses a Techwell TW2865 video / audio codec. The datasheet states "PCM 8/16 bit and u-Law/A-Law 8bit for audio word length".

The audio stream has what looks like an 8-byte header at the start of every frame. Each frame is 248 bytes in size (including the header). The header begins with the byte values "00 01 7A 00".

Using Sox I am able to play the file with the following (guessed) command line:-

Code: [Select]
sox -r 8k -e a-law audio.raw -d


However the playback is swamped with noise; I can barely hear the speech in the recording.

I have tried experimenting with various options in Sox and also Audacity (import>raw) but I get the same results.

I have stripped the 8-byte headers from each frame but I get the same results.

Has anyone seen this type of audio stream before? Does anyone have suggestions on how to play the file correctly?

The file (with and without the 8-byte frame headers) can be downloaded from here:-

Raw audio with headers
Raw audio without headers

Thanks
Robin

How to determine the correct parameters for a raw audio stream?

Reply #1
Normally, raw audio doesn't have headers or frames.    It's just a series of bytes and you have to know (or guess) the paramaters.

Do you have the audio/video file?  Can you play the audio/video file on the computer?  If you can play it, there are probably tools that can extract to WAV or convert to another format.    Have you tried opening the audio/video file in Audacity?  (You'll probably need the FFMPEG library).

If all else fails, you should be able to make an "analog" copy from the DVR.  (i.e. Plug the DVR's analog audio output to line-in on your soundcard, and record with Audacity.)

How to determine the correct parameters for a raw audio stream?

Reply #2
Sorry, Doug, but did you actually read the post before replying?


How to determine the correct parameters for a raw audio stream?

Reply #3
Sorry, Doug, but did you actually read the post before replying?
What did I miss?

I'm suggesting he try to open the original audio/video file instead of the extracted/demultiplexed audio-only stream.   

How to determine the correct parameters for a raw audio stream?

Reply #4
Never mind. I’m the one who needs to read better. I didn’t properly consider the de/multiplexing. :/ Sorry, Doug.

 

How to determine the correct parameters for a raw audio stream?

Reply #5
I played with the file but could not work it out. Actually, it is a very good idea that the audio sample was demultiplexed incorrectly. That would explain the re-occuring marks.