How to get H264 & V4L2 pipeline work together?

Tzu-Jung Lee roylee17 at gmail.com
Mon Apr 29 23:38:59 PDT 2013


Hi Folks,

I'm working on a device which can do mpeg2 to h264 transcoding.
I already have a preliminary V4L2 driver implementation, and can do
file to file transcoding with the v4l2-ctl utility.
And now I'd like to do the streaming over UDP with gstreamer.

What are the best pipeline to do the streaming over UDP?
(I configure the device to do h264 to h264 transcoding, which takes
h264 ES feed, and output h264 ES)

Current, I can get the transcode ES muxed and streamed over UDP with:

    gst-launch-1.0 v4l2src ! h264parse ! mpegtsmux ! rndbuffersize
min=188 max=188 ! udpsink host=192.168.1.10 port=1234&


But I can't feed the bitstream to the device from udpsrc or filesrc yet.

    gst-launch-1.0 filesrc location=test.264 ! h264parse ! v4l2sink
device=/dev/video0

The following is the less verbose message. The full log is attached

v4l2sink device=/dev/video0
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps =
video/x-h264, width=(int)1920, height=(int)1088, parsed=(boolean)true,
stream-format=(string)avc, alignment=(string)au,
pixel-aspect-ratio=(frac0
ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse0:
GStreamer encountered a general stream error.
Additional debug info:
gstbaseparse.c(3038): gst_base_parse_loop ():
/GstPipeline:pipeline0/GstH264Parse:h264parse0:
streaming stopped, reason not-negotiated
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...


Both of the following works:

    gst-launch-1.0 filesrc location=test.264 ! h264parse ! filesink
location=/tmp/out.264

    gst-launch-1.0 filesrc location=test.264 ! filesink location=/tmp/out.264

Any comment or suggestion?

Thanks.

Roy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fail.log
Type: application/octet-stream
Size: 30497 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130430/97612c31/attachment-0001.obj>


More information about the gstreamer-devel mailing list