View Single Post
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#7
So here is solution how to play theora videos using gstreamer libraries.

What is needed: theora and vorbis decoder for gstreamer; simple gstreamer utility which connect buffer pipes togeter.

Installing packages (as root):
$ apt-get install gstreamer0.10-ogg gstreamer0.10-vorbis gstreamer0.10-theora gstreamer-tools

Playing theora video and vorbis audio from file (file may have extension .ogv):
$ gst-launch filesrc location=<video.ogv> \! oggdemux name=demuxer demuxer. \! queue \! theoradec \! xvimagesink demuxer. \! queue \! vorbisdec \! pulsesink

Q: What?? Why this very long command??
A: gst-launch is very simple program which only connect buffer pipes togeter. '\!' means similar as s pipe '|' in shell/bash. First is needed to demux file into audio and video part. Video stream needs to be decoded from theora format to RGB/YUV images which can be shown on screen by Xv. Next audio stream needs to be decoded from vorbis format to uncompressed RAW/WAV which pulseaudio can play.