[gst-devel] Video Recording

Zaheer Merali zaheerabbas at merali.org
Tue Sep 5 08:50:56 CEST 2006


On 9/4/06, Pavan Kumar Patale <pavanpatale at hotmail.com> wrote:
> Hi,
> >
> >please, try
> >
> >1- download latest version of gstreamer from cvs
> >
> >2- gst-launch-0.10 -v v4l2src ! xvimagesink
> >
> >3- send me the output
>
> I have reconstructed the pipeline to
>
> $gst-launch-0.10 v4lsrc ! ffmpegcolorspace ! xvimagesink.
>
> By using the above pipeline i was able to view video. Then i tried to encode
> by constructiing
> the pipeline
>
> $gst-launch-0.10 v4lsrc ! ffmpegcolorspace ! ffenc_mpeg4 ! filesink
> location=1.mp4
>
> I am able to get the 1.mp4 file.  But i am not able to play it using mplayer
> or windows media.
>
> Can you pls let me know it if is correctway of doing ?
>
> Thanks,
> Pavan.
>


Hi Pavan

You have just saved raw mpeg4 video to a file, this will not be
playable by any player because it is not in a container such as
mp4/iso/qt or asf or avi.

We have an avi muxer in GStreamer so change your pipeline to something like:

v4l2src ! ffmpegcolorspace ! ffenc_mpeg4 ! avimux ! filesink location=a.avi

However I recommend you to use Ogg/Theora, and you will get more
support from GStreamer devs if you do because it's more used and
tested by us.  To encode in Ogg Theora, do:

gst-launch-0.10 v4l2src ! ffmpegcolorspace ! theoraenc ! oggmux !
filesink location=a.ogg

If you want to add audio from the sound card do:

gst-launch-0.10 oggmux name=mux ! filesink location=a.ogg v4l2src !
ffmpegcolorspace ! theoraenc ! queue ! mux. alsasrc ! audioconvert !
vorbisenc ! mux.

Zaheer




More information about the gstreamer-devel mailing list