【引用】gst-launch samples

夏侯林
2023-12-01

come from http://general.blog.51cto.com/927298/313422

Player

AVI (xvid, mp3)
gst-launchfilesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux name=demux  demux.audio_00 ! mad ! audioconvert !audioresample ! autoaudiosink demux.video_00 ! queue ! xviddec !ffmpegcolorspace ! videoscale ! autovideosink

Time Overlay
gst-launchfilesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux name=demux  demux.audio_00 ! mad ! alsasink demux.video_00 !queue ! xviddec ! ffmpegcolorspace  ! timeoverlay ! xvimagesink

With Seeking
gst-launchfilesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux name=demux  demux.audio_00 ! mad ! alsasink demux.video_00 !queue ! xviddec ! ffmpegcolorspace  ! progressreport ! navseekseek-offset=10 ! timeoverlay ! xvimagesink

Video Transition
gst-launch-v videotestsrc pattern=1 ! smpte name=s border=20000 type=234duration=2000000000 ! ffmpegcolorspace ! ximagesink videotestsrc ! s.

gst-launchfilesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux ! xviddec ! ffmpegcolorspace ! smpte name=s border=20000type=234 duration=2000000000 ! ffmpegcolorspace ! xvimagesink filesrclocation=/MediaSamples/movies/AeonFlux/aeon2.avi ! avidemux ! xviddec !s.

Overlay
gst-launch filesrclocation=/home/magpie/sample-multimedia/wowintro2.avi ! avidemuxname=demux  demux.audio_00 ! mad ! alsasink demux.video_00 ! queue !xviddec ! ffmpegcolorspace  ! timeoverlay ! xvimagesink

Multi Video
gst-launch filesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux ! xviddec ! ffmpegcolorspace !  videoscale ! video/x-raw-yuv,width=320  ! videobox border-alpha=0 alpha=1 top=-10 bottom=0 left=-150! videomixer name=mix ! ffmpegcolorspace ! xvimagesink filesrclocation=/home/magpie/sample-multimedia/texas.avi ! avidemux ! xviddec! ffmpegcolorspace !  videoscale ! video/x-raw-yuv, width=640 ! alphaalpha=1 ! mix.

gst-launch  filesrclocation=/home/magpie/sample-multimedia/wowintro2.avi ! avidemux !xviddec ! ffmpegcolorspace !  videoscale ! video/x-raw-yuv, width=320 ! videobox border-alpha=0 alpha=0.5 top=-10 bottom=0 left=-150 !videomixer name=mix ! ffmpegcolorspace ! ffenc_mpeg4 ! avimux !filesink location=test01.avi filesrclocation=/MediaSamples/movies/wowintro2.avi ! avidemux ! xviddec !ffmpegcolorspace !  videoscale ! video/x-raw-yuv, width=640 ! alphaalpha=1 ! mix.

Slide Show
multifilesrclocation=image-%05d.jpg num-buffers=25 ! image/jpeg,framerate=25/1 !  jpegdec ! videoflip method=vertical-flip ! jpegenc !  multifilesinklocation=image-out-%05d.jpg

Fakesink and capsfilter
gst-luanchfilesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux ! xviddec ! videoscale ! "video/x-raw-rgb, width=176,height=144" ! ffmpegcolorspace ! videorate ! "video/x-raw-rgb, bpp=32,depth=32, framerate=3/1" ! fakesink


COMF Player gstreamer link

If NOT use fakesink
gst-launch filesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux ! xviddec ! videoscale ! video/x-raw-yuv ! ffmpegcolorspace !videobalance ! videorate ! video/x-raw-yuv, width=320, framerate=25/1 ! xvimagesink

gst-launch  filesrclocation=/home/magpie/sample-multimedia/wowintro2.avi ! avidemux !xviddec ! videoscale ! video/x-raw-yuv ! ffmpegcolorspace ! xvimagesink

For target MARU 0.2
gst-launch filesrc location=./wow_qcif.avi ! avidemux ! ffdec_mpeg4 ! videoscale !video/x-raw-yuv, width=320, height=240 ! ffmpegcolorspace ! ximagesink
gst-launch filesrc location=./wow_qcif.avi ! avidemux ! ffdec_mpeg4 ! videoscale !video/x-raw-yuv, width=640, height=480 ! ffmpegcolorspace ! videorate !ximagesink

gst-launch  filesrc location=./wow_qcif.avi !avidemux name=demux  demux.audio_00 ! mad ! audioconvert !audioresample ! autoaudiosink demux.video_00 ! queue ! ffdec_mpeg4 !videoscale ! video/x-raw-rgb, width=640, height=480 ! ffmpegcolorspace! ximagesink

gst-launch filesrc location=./wow_qcif.avi !avidemux name=demux  demux.audio_00 ! mad ! audioconvert !audioresample ! autoaudiosink demux.video_00 ! queue ! ffdec_mpeg4 !videoscale ! video/x-raw-yuv, width=640 ! ffmpegcolorspace ! ximagesink

gst-launch playbin uri=file:///opt/cosmos/sample-multimedia/zippel.mp4
gst-launch playbin uri=file:///opt/cosmos/sample-multimedia/wowintro2.avi -v
gst-launch playbin uri=file:///opt/cosmos/sample-multimedia/wow_qcif.avi -v


? Above italic text means that Player use Playbin pipeline

If DO use fakesink
gst-launch filesrc location=/home/magpie/sample-multimedia/wowintro2.avi !avidemux ! xviddec ! videoscale ! video/x-raw-rgb ! ffmpegcolorspace !videorate ! video/x-raw-rgb, width=320, height=240, framerate=25/1, bpp=32, depth=32, red_mask=0x0000ff00, blue_mask=0xff000000,alpha_mask=0x000000ff  ! fakesink -v



Recorder


Example link element for recording
gst-launch v4lsrc ! video/x-raw-yuv, width=320, height=240, framerate=25/1 ! xvimagesink
gst-launchv4lsrc ! video/x-raw-yuv, width=320, height=240, framerate=25/1 !ffmpegcolorspace ! tee ! queue ! video/x-raw-rgb ! ximagesink
gst-launchv4lsrc ! video/x-raw-yuv, width=320, height=240, framerate=25/1,bpp=16, depth=16 ! ffmpegcolorspace ! tee ! queue ! video/x-raw-rgb !ximagesink

Fakesink
gst-launch v4lsrc ! video/x-raw-yuv,width=320, height=240, framerate=25/1, bpp=16, depth=16 !ffmpegcolorspace ! tee ! queue ! video/x-raw-rgb, bpp=32, depth=32,red_mask=0x0000ff00, blue_mask=0xff000000, alpha_mask=0x000000ff,framerate=25/1 ! fakesink -v



Link element in COMF Recorder

COMF_RECORDING_TYPE_MP3_DIVX_AVI  ::  COMF_RECORDING_TYPE_MP3_XVID_AVI

To display
v4lsrc ! capsfilter (input-filter) ! ffmpegcolorspace ! tee ! queue ! capsfilter (fake-filter) ! fakesink
v4lsrc ! capsfilter (input-filter) ! ffmpegcolorspace ! tee ! queue ! ximagesink

gst-launchv4lsrc ! video/x-raw-yuv, width=320, height=240, framerate=25/1,bpp=16, depth=16 ! ffmpegcolorspace !  tee ! queue ! capsfilter(fake-filter) ! fakesink
gst-launch v4lsrc ! video/x-raw-yuv,width=320, height=240, framerate=25/1, bpp=16, depth=16 !ffmpegcolorspace !  tee ! queue ! ximagesink

To record (filesink)
DIVX_AVI
v4lsrc ! capsfilter (input-filter) ! ffmpegcolorspace ! tee ! queue ! videoscale ! xviddec ! mux ! filesink
XVID_AVI
v4lsrc ! capsfilter (input-filter) ! ffmpegcolorspace ! tee ! queue ! videoscale ! ffenc_mpeg4 ! mux ! filesink
NONE_VIDEO
audio element ! filesink



 类似资料: