将mp4和wav融合成一个新的mp4
gst-launch-1.0 filesrc location=test.mp4 ! qtdemux name=demux demux.video_0 ! queue ! h264parse ! omxh264dec ! nvv4l2h264enc ! h264parse ! qtmux name=mux ! filesink location=test1.mp4 filesrc location=test.wav ! wavparse ! mux.
摄像头拉流
std::string pipeline = " nvarguscamerasrc "
"! video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1640, "
"height=(int)1232,framerate=(fraction){fps}/1 "
"! nvvidconv left=0 right=1640 top=136 bottom=1096 "
"! video/x-raw,format=(string)I420, width=(int)1024, height=(int)600 "
"! videoconvert "
"! video/x-raw,format=(string)BGR "
"! appsink";
rtsp推流
std::string pipeline_video_writer =
"appsrc "
"! video/x-raw, format=BGR "
"! videoconvert "
"! nvvidconv "
"! nvv4l2h264enc iframeinterval=10 idrinterval=32 "
"! rtspclientsink latency=8000 location=rtsp://{ip_address}:8554/my_pipeline";
视频录制h264编码
std::string pipeline =
"appsrc ! video/x-raw, format=BGR ! queue ! videoconvert ! video/x-raw,format=RGBA ! nvvidconv ! nvv4l2h264enc "
"! h264parse ! qtmux ! filesink location={filename} sync=false";
// nvcompsositor 的两个输入必须是一样的图片格式和内存形式,需要将云图透明部分用白色(255,255,255)填充
两路视频融合,剪切
std::string pipeline_nvcompsositor =
"appsrc "
"! video/x-raw, format=BGR "
"! videoconvert "
"! video/x-raw,format=(string)RGBA, width=(int)1024, height=(int)600"
"! nvvidconv "
"! queue2"
"! nvcompositor name = compos sink_0::zorder=1 sink_0::alpha=0.5 "
"sink_1::alpha=1 "
"sink_1::zorder=0 sink_1::width=1024 sink_1::height=600 "
"! nvvidconv "
"! nvv4l2h264enc "
"! rtspclientsink location=rtsp://192.168.20.99:8554/my_pipeline"
" nvarguscamerasrc "
"! video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1640, height=(int)1232,framerate=(fraction)25/1 "
"! nvvidconv left=0 right=1640 top=136 bottom=1096 "
"! video/x-raw,format=(string)RGBA, width=(int)1024, height=(int)600 "
"! videobalance brightness=0.3 "
"! nvvidconv "
"! queue2"
"! compos. ";