wrong caps for decoding

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

wrong caps for decoding

Chuck Crisler-2
I have captured a stream with the following command:

gst-launch -v v4l2src always-copy=FALSE device=/dev/video0 ! video/x-raw-yuv,width=640,height=480,framerate=10/1  \
    ! queue ! ffmpegcolorspace ! x264enc byte-stream=TRUE bitrate=256 \
    ! mpegtsmux ! filesink location=test.ts

Now I am trying (and failing) to play it back. For example,

gst-launch -v filesrc location=/home/.../test.ts ! ffdec_h264 ! video/x-h264,width=640,height=480 ! ximagesink

fails to link ffdec_h264 to ximagesink.

gst-launch -v filesrc location=/home/.../test.ts ! ffdec_h264 ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! ximagesink

fails because the input format on ffdec_h264 was not set before data start.

What am I doing wrong? I know that this can be done because playbin2 works. I want to learn how to do this manually.

Thank you for all help! Also, I would appreciate all suggestions of how to figure out my error so I can learn from my mistakes.

Chuck


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: wrong caps for decoding

Tim-Philipp Müller-2
On Mon, 2012-09-10 at 16:53 -0400, Chuck Crisler wrote:

Hi,

> Now I am trying (and failing) to play it back. For example,
>
> gst-launch -v filesrc location=/home/.../test.ts ! ffdec_h264 !
> video/x-h264,width=640,height=480 ! ximagesink
>
> fails to link ffdec_h264 to ximagesink.
>
> gst-launch -v filesrc location=/home/.../test.ts ! ffdec_h264 !
> video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! ximagesink
>
> fails because the input format on ffdec_h264 was not set before data
> start.
>
> What am I doing wrong? I know that this can be done because playbin2
> works. I want to learn how to do this manually.
>
> Thank you for all help! Also, I would appreciate all suggestions of
> how to figure out my error so I can learn from my mistakes.

Try:

 gst-launch-0.10 filesrc location=foo.ts ! decodebin2 !
ffmpegcolorspace ! videoscale ! xvimagesink

or

 gst-launch-0.10 filesrc location=foo.ts ! tsdemux ! ffdec_h264 !
ffmpegcolorspace ! videoscale ! xvimagesink

(or mpegtsdemux if you don't have tsdemux).

Cheers
 -Tim

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel