This is a home page of crusher264 library, based on the reverse-engineered turbo.264/RDX-160-EF Crusher and CrusherCapture H264 Encoder stick. It created to implement linux driver for Maxim's MG1264/MG3500 chips.
Hardware:
- Elgato Turbo.264 (MG1264-based)
- Elgato Turbo.264HD (MG3500-based) - not supported yet.
- ADS RDX-160-EF (MG1264-based)
- Blackmagic Design Video recorder (MG1264-based) - work in porgress.
Supported features:
- H264 Baseline profile (I & P frames only).
- Bitrate, framerate, width, height regulation.
- Gop size set.
- RC buffer size set.
- Deblocking filter flag (+alpha & beta values).
- Flag to create new gop on scene change.
- Real-time (or faster) conversion up to 640x480.
- Max image dimensions: 768x576.
News:
NEWS 2009-27-10:
- previous code fully rewritten and publically released as crusher264
- patch for ffmpeg added
Downloads:
crusher264-1.0.0.tar.gz (bzr branch)
Installation:
$ tar -xvzf crusher264-1.0.0.tar.gz $ cd crusher264-1.0.0/firmware $ wget http://tipok.org.ua/downloads/hardware/crusher264/firmware/FX2Firmware.hex $ wget http://tipok.org.ua/downloads/hardware/crusher264/firmware/qmmapp.seve1-... $ cd .. $ ./configure $ make $ sudo make install
FFmpeg patching:
(after installing crusher264)
$ git clone git://git.ffmpeg.org/ffmpeg/ $ cd ffmpeg $ git clone git://git.ffmpeg.org/libswscale/ $ wget http://tipok.org.ua/downloads/hardware/crusher264/patch/libcrusher264.patch $ patch -p1 < libcrusher264.patch $ ./configure --enable-gpl --enable-libcrusher264 $ make $ sudo make install
Usage:
Here we using patched ffmpeg:
$ ffmpeg -flags +loop -i test.mpg -f h264 -vcodec libcrusher264 -an -deinterlace -g 25 -sc_threshold 1 -b 1800k -s 720x576 -y test.h264 $ ffmpeg -flags +loop -i test.mpg -f mpegts -vcodec libcrusher264 -an -deinterlace -g 25 -sc_threshold 1 -b 600k -s 640x480 -y test.ts $ ffmpeg -async 1 -flags +loop -i udp://239.102.1.2:5004 -f mpegts -vcodec libcrusher264 -acodec mp2 -ab 128k -deinterlace -g 25 \ > -sc_threshold 1 -b 500k -s 320x240 -y test.ts
Or use stand-alone application to encode uncompressed raw video (but first create it):
$ ffmpeg -i test.mpg -f rawvideo -an -deinterlace -s 720x576 -pix_fmt yuv420p -y test720x576.yuv $ sample/crusher264 -i test720x576.yuv -s 720x576 -b 1500000 -o test.h264
TODO:
- Fix bug with codec hot-starting.
- Add pthreads flag to increase ffmpeg encoding speed (this is due long time, needed to sending uncompressed video over USB).
- Add SPS/PPS extradata extraction to ffmpeg patch (this needs to creating mp4 files).
- Add CrusherCapture support (Blackmagic Video recorder).
- Add MG3500 (H.264 HD Encoder) Support.
- Move some parts of code into v4l driver.
More Info:
Crusher reference design consists from this IC's:
- USB-controller: Cypress EZ2 (CY7C68013A-56LFXC)
- Encoder: Mobilygen MG1264
- RAM: EtronTech (EM639165TS-7G), or similar.
- Video ADC: ADV7180, Audio ADC: CS4265, i2c EEPROM 24LC02 (in CrusherCapture).
