GStreamer

From LinuxTVWiki
Revision as of 06:46, 28 September 2006 by Liontooth (talk | contribs)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Introduction

The gstreamer0.10-plugins-bad package in Debian recently added Video4Linux2 capture support (cf. bug #379867).

Documentation

  1. Gstreamer project
  2. FAQ
  3. Documentation
  4. man gst-launch

Commands

For a webcam:

gst-launch-0.10 v4l2src use-fixed-fps=false ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=320,height=240 \
! ffmpegcolorspace ! ximagesink
gst-launch-0.10 v4lsrc autoprobe-fps=false device=/dev/video0 ! "video/x-raw-yuv, width=160, height=120, \
framerate=10, format=(fourcc)I420" ! xvimagesink 

For tv -- capture takes place without error messages:

gst-launch-0.10 v4l2src device=/dev/video5 ! video/x-raw-yuv,width=640,height=480 ! avimux ! \
filesink location=/tv7/test0.avi

tcprobe says it's an I420 file and gives the framerate as correct NTSC:

$ tcprobe -i test1.avi
[tcprobe] RIFF data, AVI video
[avilib] V: 29.970 fps, codec=I420, frames=315, width=640, height=480
[tcprobe] summary for test1.avi, (*) = not default, 0 = not detected
import frame size: -g 640x480 [720x576] (*)
       frame rate: -f 29.970 [25.000] frc=4 (*)
   no audio track: use "null" import module for audio
           length: 315 frames, frame_time=33 msec, duration=0:00:10.510

The file will play in mplayer, using the codec [raw] RAW Uncompressed Video.

Some other parameters that might be useful for v4l (this particular combination is not working):

gst-launch-0.10 v4l2src device=/dev/video1 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=640,height=480,\
framerate=(fraction)30000/1001 ! avimux ! fameenc quality=90 ! ffmpegcolorspace ! filesink location=~/test0.avi

To convert the files to matlab (didn't work for me):

mencoder test0.avi -ovc raw -vf format=bgr24 -o test0m.avi -ffourcc none 

For details, see gst-launch and google; the plugins in particular are poorly documented so far.