//编译
$CC PlayCamera.c -o PlayCameraH265 `pkg-config --cflags --libs gstreamer-1.0`
gcc -Wall $(pkg-config --cflags --libs gstreamer-0.10) helloworld.c -o helloworld
//H265
gst-launch-1.0 filesrc location=/home/root/1080p_30fps_h265.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=1024, height=600 ! waylandsink
//H264
gst-launch-1.0 filesrc location=H264_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=1024, height=600 ! waylandsink
//测试
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12 ! imxvideoconvert_g2d ! video/x-raw,format=RGB16 ! waylandsink
gst-launch-1.0 videotestsrc ! video/x-raw,format=NV12,width=1280,height=720 ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=640, height=480 ! waylandsink window-height=300 window-width=512
//视频播放控制输出窗口大小
gst-launch-1.0 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! waylandsink window-height=300 window-width=512 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! waylandsink window-height=300 window-width=512 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! waylandsink window-height=300 window-width=512 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! waylandsink window-height=300 window-width=512
//设置4视频同屏显示
gst-launch-1.0 imxcompositor_g2d name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=512 sink_0::height=300 sink_1::xpos=0 sink_1::ypos=300 sink_1::width=512 sink_1::height=300 sink_2::xpos=512 sink_2::ypos=0 sink_2::width=512 sink_2::height=300 sink_3::xpos=512 sink_3::ypos=300 sink_3::width=512 sink_3::height=300 ! video/x-raw,format=RGB16 ! waylandsink filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_0 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_1 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_2 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_3
gst-launch-1.0 imxcompositor_g2d name=comp \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=512 sink_0::height=300 \
sink_1::xpos=0 sink_1::ypos=300 sink_1::width=512 sink_1::height=300 \
sink_2::xpos=512 sink_2::ypos=0 sink_2::width=512 sink_2::height=300 \
sink_3::xpos=512 sink_3::ypos=300 sink_3::width=512 sink_3::height=300 ! \
video/x-raw,format=RGB16 ! waylandsink \
v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! comp.sink_0 \
v4l2src device=/dev/video1 ! video/x-raw,width=640,height=480 ! comp.sink_1 \
v4l2src device=/dev/video2 ! video/x-raw,width=640,height=480 ! comp.sink_2 \
v4l2src device=/dev/video3 ! video/x-raw,width=640,height=480 ! comp.sink_3
//一视频
gst-launch-1.0 imxcompositor_g2d name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=512 sink_0::height=300 sink_0::keep-ratio=true ! video/x-raw, format=RGB16, width=512, height=300 ! waylandsink filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! comp.sink_0
//两视频
gst-launch-1.0 imxcompositor_g2d name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=512 sink_0::height=300 sink_1::xpos=512 sink_1::ypos=0 sink_1::width=512 sink_1::height=300 ! video/x-raw,format=RGB16 ! waylandsink filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_0 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_1
//三视频
gst-launch-1.0 imxcompositor_g2d name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=512 sink_0::height=300 sink_1::xpos=0 sink_1::ypos=300 sink_1::width=512 sink_1::height=300 sink_2::xpos=512 sink_2::ypos=0 sink_2::width=512 sink_2::height=300 ! video/x-raw,format=RGB16 ! waylandsink filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_0 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_1 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_2
//显示1图片
gst-launch-1.0 filesrc location=image.png ! pngdec ! imagefreeze ! videoconvert ! autovideosink
filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_2 filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_3
filesrc location=H265_1080.mp4 typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=512, height=300 ! comp.sink_0
gst-launch-1.0 imxcompositor_g2d name=comp sink_1::xpos=160 sink_1::ypos=480 ! glimagesink videotestsrc ! comp.sink_0 videotestsrc ! comp.sink_1
gst-launch-1.0 filesrc location=image.png ! pngdec ! imagefreeze ! videoconvert ! autovideosink
gst-launch-1.0 -v imxcompositor_g2d name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=512 sink_0::height=300 sink_1::xpos=0 sink_1::ypos=300 sink_1::width=512 sink_1::height=300 sink_2::xpos=512 sink_2::ypos=0 sink_2::width=512 sink_2::height=300 sink_3::xpos=512 sink_3::ypos=300 sink_3::width=512 sink_3::height=300! waylandsink videotestsrc ! comp.sink_0 videotestsrc ! comp.sink_1 videotestsrc ! comp.sink_2 videotestsrc ! comp.sink_3
gst-launch-1.0 -v imxcompositor_g2d name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=512 sink_0::height=300 sink_1::xpos=0 sink_1::ypos=512 sink_1::width=512 sink_1::height=300 sink_2::xpos=300 sink_2::ypos=0 sink_2::width=512 sink_2::height=300 sink_3::xpos=300 sink_3::ypos=512 sink_3::width=512 sink_3::height=300 waylandsink sync=false filesrc location=H265_1080.mp4 ! typefind=true ! video/quicktime ! aiurdemux ! queue max-size-time=0 ! vpudec ! imxvideoconvert_g2d ! video/x-raw, format=RGB16, width=1024, height=600 ! tee name=t t. ! queue ! comp.sink_0 t. ! queue ! comp.sink_1 t. ! queue ! comp.sink_2 t. ! queue ! comp.sink_3
//大华摄像头
rtsp://admin:cx123456@192.168.60.67:554/cam/realmonitor?channel=1\&subtype=0\&unicast=true\&proto=Onvif
rtsp://admin:cx123456@192.168.60.67:554/cam/realmonitor?channel=1\&subtype=1\&unicast=true\&proto=Onvif
//海康威视摄像头
rtsp://admin:cx123456@192.168.60.64
//MP4视频地址
rtsp:
评论0