mod_mp4v2
About
mod_mp4v2 implemented a record_mp4 APP and the mp4 file format.
Click here to expand Table of Contents
- 1 Configuration
- 2 CPU Load
- 3 Status
- 4 Compile
Configuration
mod_mp4v2 implemented a record_mp4 APP and the mp4 file format.
So you could do (with video echoed back like record_fsv)
<action application="record_mp4" data="/tmp/test.mp4"/>
or the record APP (without video echoed back, and need code in the video-media-bug branch to work), be sure to disable file write buffering, needed for audio/video(ear-mouth) sync.
<action application="export" data="enable_file_write_buffering=false"/>
<action application="record" data="/tmp/test.mp4"/>
Also uuid_record should work
uuid_record <uuid> start /tmp/test.mp4
CPU Load
A few parameters may be prepended to the record file path inside braces to indicate video encoding speed/quality and which video profile to use. This affects CPU load since slower encoding yields better video quality at the cost of greater CPU computation load.
{vencspd=fast,vprofile=baseline}/path/to/file.mp4
vencspd
- one of fast, medium, slow
vprofile
- baseline, main, high
For other parameters see /usr/src/freeswitch/src/switch_core_file.c
Status
It's currently in the video-media-bug branch.
Audio codec using PCMU and video is H264 only.
There's a mod_mp4 which implemented play_mp4. However it need the mp4 file be probably "hinted". I haven't find a tool that can hint an existing mp4 file so I never get it work.
I tried to contact the original author but got no response. And also because mod_mp4 is C++ and I'm more happy to C, so I created mod_mp4v2. And also because I added the file format interface, I think it's more reasonable to put it under mod/formats.
Video has tons of params and most are hard coded. To make everything work still need a lot of work...
Compile
The current Makefile need mp4v2-2.0.0 in the current(mod_mp4v2) directory.
Download from http://code.google.com/p/mp4v2/downloads/list
git checkout video-media-bug
cd src/mod/formats/mod_mp4v2
cd mp4v2-2.0.0
make
cd ..
make install
Have fun.