-
Notifications
You must be signed in to change notification settings - Fork 6
MISRC Capture
misrc_capture
is a simple CLI (command line interface) tool to trigger capture from the ADC channels and the AUX data pins.
This now has misrc_extract
integrated with libflac
meaning it can unpack and compress data streams in real-time.
The MISRC captures with 2 ADC channels 12-bit and the 6-bit AUX data is interleaved into 32 bit words, so you end up with a 32-bit word stream.
This tool interacts with hsdaoh takes the RF stream de-interleaves that data to s16 and or compresses it to FLAC.
The new and current capture workflow is using the Tang Nano as an FPGA sending raw data over a YUV 4:2:2 stream.
This data is then captured with MS2130 or MS2131 based cards.
You can save the RF stream in the following flavors
- 32-bit raw feed to file
- 16-bit .s16 upacked data to file
- 16-bit .flac compressed data to file
Tested and built on Linux Mint 21.03 and 22 / Ubuntu 22.04
First install dependencies
apt install libflac-dev
- Install hsdaoh this allows you to use the MS2130 & MS2131 chips directly.
Caution
The main hsdaoh branch does not have the required changes merged yet, ensure the above liked repo is used for install or your application will not build.
Restart and then continue
Install capture & extract tools (Linux & MacOS)
git clone https://github.com/Stefan-Olt/MISRC.git
Enter Directory
cd MISRC/misrc_tools
Build and install
mkdir build
cd build
cmake ..
make
sudo make install
Run mirsc_extract
or misrc_capture
in any directory without arguments to trigger the help menu.
Create a folder which you wish to capture inside, open it inside terminal and then run misrc_capture
Append the start of video_rf
& hifi_rf
with your tape or project name as you need.
Example RAW:
misrc_capture -a video_rf.s16 -b hifi_rf.s16
Example with FLAC compression:
misrc_capture -f -a video_rf.flac -b hifi_rf.flac
You can also define its directory path of each RF stream manually:
misrc_capture -f -a /mnt/my_video_storrage/video_rf.flac -b ../../this/is/a/relative/path/hifi_rf.flac
- Run tools without arguments to see options
Press Ctrl+C to copy and Ctrl+P to past your config from a notepad or txt file.
Use <+> to move edit position on the command line to edit the name or command while in terminal and Enter to run the command.
Ctrl+C Will kill the current process, use this to stop the capture manually.
-d
device_index (default: 0)
-n
number of samples to read (default: 0, infinite)
-a
ADC A output file (use '-' to write on stdout)
-b
ADC B output file (use '-' to write on stdout)
-x
AUX output file (use '-' to write on stdout) (6 aux pins for audio ADCs)
-r
raw data output file (use '-' to write on stdout)
-p
pad lower 4 bits of 16 bit output with 0 instead of upper 4
-f
compress ADC output as FLAC
-l
LEVEL set flac compression level (default: 1)
-v
enable verification of flac encoder output