Jump to content

Raw H264 encoding gstreamer


kbch

Recommended Posts

Hello,

 

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:

https://github.com/gtalusan/gst-plugin-cedar

 

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
Link to comment
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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines