1 1

Raw H264 encoding gstreamer

Recommended Posts




I'm trying to encode Video from the Orangepi gc2035 Camera to raw h264 with newest Armbian Xenial Kernel 3.4. I use a Orangepi One. For that I'm using the following gst Plugin:



If I run the following gstreamer pipeline to get a raw h264 file it perfectly creates the file. But I can just play this file with ffplay. But not with vlc or broadway.js. Any idea how to get it playable in vlc and broadway.js? I've already tried to change to 66 to get baseline profile on following line and recompiled https://github.com/gtalusan/gst-plugin-cedar/blob/master/src/gstcedarh264enc.c#L296 But with no luck to solve the issue.


 # gst-launch-1.0 -ve v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! queue ! cedar_h264enc ! filesink location=test.h264

Edited by kbch

Share this post

Link to post
Share on other sites

I know this thread is over a year old, but I was finally able to get decent camera output out of the GC2035 thanks to the cedar H264 gstreamer plugin linked here!


I'm no gstreamer expert, but what i've been able to figure out is that after the cedar_h264enc stage of the pipeline, you need to add a h264parse stage, which you can then follow with something like matroskamux if you want to write a .mkv file, or rtph264pay if you want to send the data over the network via RTP. eg:


gst-launch-1.0 -ve v4l2src device=/dev/video0 \
! video/x-raw,format=NV12,width=800,height=600,framerate=15/1  \
! cedar_h264enc ! h264parse ! queue \
!  matroskamux ! filesink location=test.mkv


Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

1 1