I have a C920 logitec usb webcam installed on an odroid xu4, with linux ubuntu installed. I want to record video at the highest quality in h264 format.
So 30 frames per seconds and 1920x1080 video size. While at the same time send a stream h264 format but on a lower quality.
I can record and stream at the same quality but not with different quality. Does anybody now how to fix the pipeline such that I can stream at lower quality ? Working (same resolution):
gst-launch-1.0 v4l2src device=/dev/video0 ! tee name=t \
! queue ! video/x-h264,framerate=30/1,width=1920,height=1080 ! h264parse ! mp4mux ! filesink location=/media/webcam.mp4 -v -e t. \
! queue ! h264parse ! rtph264pay ! udpsink host=113.141.0.1 port=4321
Not working: (sending size 800x600):
gst-launch-1.0 v4l2src device=/dev/video0 ! tee name=t \
! queue ! video/x-h264,framerate=30/1,width=1920,height=1080 ! h264parse ! mp4mux ! filesink location=/media/webcam.mp4 -v -e t. \
! queue ! video/x-h264,framerate=30/1,width=800,height=600 ! h264parse ! rtph264pay ! udpsink host=113.141.0.1 port=4321
here is the error i get when trying different resolutions :
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
/GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstPad:src: caps = video/quicktime, variant=(string)iso
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)iso
ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse1: No valid frames found before end of stream
Additional debug info:
gstbaseparse.c(1153): gst_base_parse_sink_event_default (): /GstPipeline:pipeline0/GstH264Parse:h264parse1
ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse0: No valid frames found before end of stream
Additional debug info:
gstbaseparse.c(1153): gst_base_parse_sink_event_default (): /GstPipeline:pipeline0/GstH264Parse:h264parse0