Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

decode a mp4 video with gstreamer

I want to play a mp4 video in Gstreamer, but i got an error with the x264dec which is not found. I wrote this pipeline

  gst-launch filesrc \
     location=/media/thesis/Gstreamer/pub_Irma.mp4 \
   ! qtdemux name=demux demux. ! queue ! faad \
   ! audioconvert ! audioresample ! autoaudiosink demuxer. \
   ! queue ! x264dec ! ffmpegcolorspace ! autovideosink 

After this step, my aim is to generate execution traces of a mp4 video decoding. I don't know where is the problem with x264dec.

like image 724
KKc Avatar asked Nov 21 '12 19:11

KKc


2 Answers

This might be easier:

gst-launch-0.10 playbin2 uri=file:///path/to/foo.mp4

or

gst-launch-1.0 playbin uri=file:///path/to/foo.mp4

(You still need the required elements installed of course).

like image 77
Tim Avatar answered Oct 12 '22 07:10

Tim


This command

gst-launch-0.10 filesrc location=/root/gstreamerexamples/big.mp4 ! qtdemux name=demux demux. ! queue ! faad ! audioconvert ! audioresample ! autoaudiosink demux. ! queue ! ffdec_h264 ! ffmpegcolorspace ! autovideosink  

works fine for me.

To play mp4 file take bigBuckBunny mp4 video as test file. Next please sure all the elements mentioned in the gst-launch is built in the x86 or any other target platform.

Please send lot of time in correct installation of GStreamer.

like image 38
Manoj Avatar answered Oct 12 '22 06:10

Manoj