Transcoding with GStreamer
Saturday, May 7th, 2005So on Tuesday night someone recorded on their mobile phone, a video in the Kop starting just before the final whistle for 4 minutes. It was posted on the net in WMV9 format. With Ronald‘s new GStreamer plugin pitfdll, I transcoded it to Ogg. Here is what I did:
gst-launch-0.8 filesrc location=Downloads/kop204.wmv ! decodebin name=d { oggmux name=mux max-delay=500000000 max-page-delay=500000000 ! filesink location=kop3.ogg } { d. ! queue ! ffmpegcolorspace ! theoraenc bitrate=300 ! queue ! mux. } { d. ! queue ! audioscale ! audio/x-raw-int,rate=26000 ! audioconvert ! audio/x-raw-float,channels=1 ! rawvorbisenc bitrate=16000 ! queue ! mux. }
On Gentoo, getting the prerequsites are easy. Just emerge gstreamer gst-plugins gst-plugins-ffmpeg gst-plugins-ogg gst-plugins-theora gst-plugins-vorbis gst-plugins-pitfdll. Pitfdll only works on x86 due to its use of winelib to use the directshow dll’s for wmv9. The same pipeline string should work for all video files that you can play in GStreamer.
The resulting video can be played from: http://www.lfcherts.org/index.php?module=videolibrary. If you use Internet Explorer and Windows, it will use an activex control to play it otherwise it’ll use cortado (a java applet) to play it.