(GstPipeline *)gst_parse_launch("appsrc name=src is-live="true" do-timestamp="true" caps="video/x-h264.....

Tim Müller tim at centricular.com
Sun May 25 04:09:54 PDT 2014


On Sun, 2014-05-25 at 10:35 +0000, João Machado wrote:

Hi,

> I am newbie with Gstreamer and I am having problems to create a
> pipeline to display mp4 video format.

I'm not sure if I really understand what you're trying to do. Why are
you using appsrc, for example?. A pipeline to display an mp4 file would
be, for example:

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

(you should really use 1.x if possible at all).

Or:

gst-launch-1.0 uridecodebin uri=file:///path/to/foo.mp4 ! videoconvert !
videoscale ! autovideosink

gst-launch-0.10 uridecodebin uri=file:///path/to/foo.mp4 !
ffmpegcolorspace ! videoscale ! autovideosink

If you do want to use appsrc, you can pass an appsrc:// URI to
playbin/uridecodebin and set it up in the setup-source signal callback.
 
 Cheers
  -Tim

> The output of the gst-discoverer-0.10 of the related file is: 
> ------------------------------------------------
> Topology:
>   container: Quicktime
>     audio: MPEG-4 AAC
>     video: H.264
> 
> Properties:
>   Duration: 0:0Set the pipeline state to playing, so it actually
> displays video1:27.574000000
>   Seekable: yes
>   Tags: 
>       video codec: H.264 / AVC
>       language code: en
>       audio codec: MPEG-4 AAC audio
>       maximum bitrate: 139644
>       bitrate: 139644
>       encoder: Lavf55.36.100
>       container format: ISO MP4/M4A
> ------------------------------------------------
> 
> The "producer side is working" and the output of the
> gst_caps_from_string() is
> 
> video/x-h264, stream-format=(string)avc, alignment=(string)au,
> level=(string)4.1, 
>  profile=(string)high,
> codec_data=(buffer)01640029ffe1003527640029ac34c80780227e5c05b808080a000007d20001d4c1d0c000e4e00000e4e1d77971a18001c9c00001c9c3aef2e1f088451601000428ee3830, width=(int)1920, height=(int)1080, framerate=(fraction)30000/1001, pixel-aspect-ratio=(fraction)1/1
> 
> In the "Consumer side" I tried something similar with the previous
> caps but without success and the GStreamer thrown an error and defined
> the following caps:
> 
> video/quicktime; video/mj2; audio/x-m4a; application/x-3gp
> 
> 
> 
> I have managed to create a pipeline with the following line but for
> VP8 encoding format:
> 
> (GstPipeline *)gst_parse_launch(
>         "appsrc name=\"src\" is-live=\"true\" do-timestamp=\"true\" "
>         "caps=\"video/x-vp8, width=(int)640, height=(int)360, "
>         "pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)1000/1
> \" ! queue2 ! "
>         " vp8dec ! ffmpegcolorspace ! ximagesink sync=\"false\" ",
>         NULL); 
> 
> 
> I need something similar to this but I haven't manage to find. 
> 
> Please let me know if you know what is the issue.
> 

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com



More information about the gstreamer-devel mailing list