Transcoding a video to XviD format with GStreamer

liberforce at freeside.fr liberforce at freeside.fr
Thu Sep 3 06:03:55 PDT 2015


Hi, list.

Not sure this is the best place to ask my question, so feel free to 
redirect me
if you feel it's out of place.

I'm trying to script a GStreamer pipeline to transcode videos to my 
Meizu M6
miniplayer[1]. I found some scripts to do the transcoding with mencoder, 
but
would like to do that with GStreamer. The device supports AVI format 
with XviD
video at up to 20 FPS and 384 to 512 kilobits per second.

The videos produced with mencoder work, and the `file` command returns 
for one
of the generated videos:

* RIFF (little-endian) data, AVI, 240 x 320, 20.00 fps, video: XviD, 
audio:
MPEG-1 Layer 3 (stereo, 44100 Hz)

I tried to generate an AVI/XviD video using GStreamer 1.2, but so far, 
couldn't
generate one that is identified as `XviD`. There were some changes 
between
GStreamer 0.10 and 1.x, and the former xvid plugin doesn't exist 
anymore, it's
supposed to be MPEG 4 part 2. I transcoded some test videos using the 
`mp4`,
`msmpeg4`, `msmpeg4v2` encoders with no success, the device doesn't play 
them:

* tests/s2-mp4.avi:   RIFF (little-endian) data, AVI, 240 x 320, 20.00 
fps,
     video: DivX 4, audio: MPEG-1 Layer 3 (stereo, 44100 Hz)
* tests/s2-msmpeg4.avi: RIFF (little-endian) data, AVI, 240 x 320, 20.00 
fps,
     video: Microsoft MPEG-4 v3, audio: MPEG-1 Layer 3 (stereo, 44100 Hz)
* tests/s2-msmpeg4v2.avi: RIFF (little-endian) data, AVI, 240 x 320, 
20.00 fps,
     video: Microsoft MPEG-4 v2, audio: MPEG-1 Layer 3 (stereo, 44100 Hz)

Most of the documentation I found is of 0.10 era, and thus, outdated.
The question is: How to encode a video into XviD  with GStreamer ? Wich 
plugin
or pipeline should I use to have the `file` command identifying the 
produced
files the same way as files produces with `mencoder`?

Thanks in advance.

   [1]: https://en.wikipedia.org/wiki/Meizu_M6_miniPlayer



More information about the gstreamer-devel mailing list