[FFmpeg-devel] FreeSwitch Video decoding (consulting opportunity)

Luciano Panaro lgpanaro at gmail.com
Thu Sep 11 22:05:46 CEST 2014

Hi everyone,

In the company I work at we are trying to build a decoder for a video
format generated by Freeswitch [1], a SIP platform through which we are
recording a+v. We are using a module from FS called mod_fsv (details below).

We are able to decode audio successfully but video is not being garbled. We
believe someone more familiar with ffmpeg internals should be able to pick
this up and help us wrap up this project. We would of course contribute the
mod_fsv decoder back to ffmpeg.

If you are available for hire let you can contact me directly. In any case
any pointers or help would be much appreciated.


Tech details:

Mod_fsv generates videos in a format that stores audio using the L16 audio
codec and video frames as seen inside RTP packets. So the demuxer code is
basically an adaptation of the *libavformat/rtpdec.c *that comes with ffmpeg

The file header consists of a 4 bytes version ID, 32 bytes IANA video codec
name (presumably RFC4855 and similarly-registered names), 128 bytes video
format descriptor (the content of the SDP format-specific parameters "fmtp"
attribute field), 4 bytes audio rate, 4 bytes audio packetization time, and
a creation time tag.

The frames are stored in the same order as they are received. A 32 bit (4
bytes) little-endian header is used to tell if the next packet is a video
or audio and the length of the packet. The top bit is *1* if frame is
video, and *0* if it is audio; the 31 lower bits are used to store the size
of the packet.

If the packet is a video packet, then its content is an entire RTP video
frame. If the packet is an audio packet, then its content is audio using
the L16 codec.

We achieved a decoder which successfully decodes audio, but decoded video
appears garbled. We suppose the parsing of the FSV packets is ok, and the
problem should be on the way we provide Ffmpeg with the data to create the

I have attached the fsvdec.patch [3], and an example of FSV file [4], The
cli line we use to decode is the following: *./ffmpeg -i testrecord.fsv
-vcodec h264 -acodec aac -strict experimental -ar 44.1k -t 16 -pix_fmt
yuv420p output.mp4*
[1] http://www.freeswitch.org/
[2] https://wiki.freeswitch.org/wiki/Mod_fsv
[3] https://www.dropbox.com/s/crk4g775b0ql55m/fsvdec.patch?dl=0
[4] https://www.dropbox.com/s/9vt6btexevqj3g9/testrecord.fsv?dl=0

More information about the ffmpeg-devel mailing list