Introducing GStreamer The media framework on GNU/Linux COSCUP 2010
$4
$4 → £4 英屬曼島商肯諾有限公司 Canonical Limited
Ubuntu Hardware Summit 月 24 日 免費報名參加
Agenda 多媒體軟體介紹 多媒體影音格式 GStreamer 基本框架 GStreamer 簡單範例
多媒體播放器 Mplayer VLC Xine Totem
影音轉檔 Mencoder VLC FFmpeg
影音串流 VLC Flumotion Icecast
多媒體中心 Moovida (Elisa) Enna
GStreamer based 多媒體播放器 Totem 影音串流 Flumotion 多媒體中心 Moovida 視訊錄影 Cheese 影音剪輯 Pitivi 影音檔案管理 Rhythmbox
多媒體影音格式 封裝格式 影像格式 聲音格式 字幕格式 Container Video Audio Subtitle Container Video Audio Subtitle
封裝格式 Container WebM MOV - QuickTime OGG ASF MKV - Matroska MP4 RM MPEG-TS MPEG-PS Container Video Audio Subtitle Container Video Audio Subtitle
影像格式 Video Codec VP8 Theora/VP3 H.263 / H.261 MPEG-4 MPEG-2 / MPEG-1 DivX WMV RealVideo Container Video Audio Subtitle Container Video Audio Subtitle
聲音格式 Audio Codec MPEG audio AAC MP3 WAV Vorbis WMA RealAudio Container Video Audio Subtitle Container Video Audio Subtitle
字幕格式 Subtitle VobSub SubRip SSA/ASS SAMI SUB MicroDVD MPSub SubViewer XSUB Container Video Audio Subtitle Container Video Audio Subtitle
GStreamer 基本結構 Elements 元件 Pads 接口 Bins & Pipelines 容器與管線 Communication 通訊
Elements 元件 Source elements Filters, convertors, demuxers, muxers and codecs Sink elements
Bins & Pipelines 容器與管線
Pads 接口
Communication 通訊
GStreamer Overview
GStreamer Package gst-plugins-base 必需的基本元件 gst-plugins-good 在 LGPL 授權下品質良好的元件 gst-plugins-ugly 在授權上有法律問題但是品質良好的元件 gst-plugins-bad 品質差的元件
gst-inspect / gst-launch example-content Debian / Ubuntu apt-get install gstreamer-tools gst-inspect 查詢 GStreamer 元件及插件資訊 gst-launch 建立及執行 GStreamer 管線 example-content Ubuntu 預設提供的範例檔案 PPA for GStreamer developers ppa:gstreamer-developers/ppa
videotestsrc / audiotestsrc gst-launch videotestsrc ! xvimagesink audiotestsrc ! pulsesink videotestsrc src xvimagesink sin k pulsesink sin k audiotestsrc src 測試元件
OGG Audio 播放器 OGG audio player filesrc src vorbisdec src sin k oggdemux src sin k pulsesink sin k gst-launch filesrc location=FrustrationBlues-ColinRoss.oga ! oggdemux ! vorbisdec ! pulsesink 播放 OGG Audio 檔案
OGG Video 播放器 OGG video player gst-launch filesrc location=UbuntuIsHumanity.ogv ! oggdemux name=demuxer \ demuxer. ! queue ! theoradec ! xvimagesink \ demuxer. ! queue ! vorbisdec ! pulsesink filesrc src theoradec src sin k oggdemux src sin k xvimagesink sin k vorbisdec src sin k pulsesink sin k 播放 OGG Video 檔案
Radio PTT Radio gst-launch souphttpsrc location= ! mad ! pulsesink souphttpsrc src mad src sin k pulsesink sin k KISS Radio gst-launch mmssrc location="mmsh://bcr.media.hinet.net/RA000042\?MSWMExt\=.asf" ! ffdemux_asf ! ffdec_wmav2 ! pulsesink mmssrc src ffdemux_asf src sin k pulsesink sin k ffdec_wmav 2 src sin k 播放網路廣播
WebCam gst-launch v4l2src ! 'video/x-raw-yuv,width=320,height=240' ! xvimagesink v4l2src src filter src sin k xvimagesink sin k 播放視訊鏡頭畫面
Record gst-launch souphttpsrc location= ! mad ! tee name=tee \ tee. ! queue ! pulsesink \ tee. ! queue ! audioconvert ! vorbisenc ! oggmux ! filesink location=record.oga souphttpsr c sr c mad sr c si n k tee sr c si n k pulsesink si n k audioconvert sr c si n k vorbisenc sr c si n k oggmux sr c si n k filesink si n k 邊聽邊錄下網路廣播
Mashup v4l2src sr c filter sr c si n k tee sr c si n k gst-launch --gst-debug-level=$LEVEL \ souphttpsrc location= ! mad ! tee name=radio \ radio. ! queue ! pulsesink \ radio. ! queue ! audioconvert ! vorbisenc ! oggmux name=mux ! filesink location=mashup.ogv \ v4l2src ! 'video/x-raw-yuv,width=320,height=240' ! tee name=webcam \ webcam. ! queue ! timeoverlay ! xvimagesink \ webcam. ! queue ! videorate ! theoraenc ! mux. timeoverla y sr c si n k xvimagesin k si n k videorate sr c si n k theoraenc si n k sr c oggmux si n k sr c filesin k si n k souphttpsr c sr c mad sr c si n k tee sr c si n k audioconvert sr c si n k vorbisenc sr c si n k pulsesink si n k
Streaming gst-launch videotestsrc ! 'video/x-raw-yuv,width=640,height=480' ! videorate ! theoraenc ! oggmux ! shout2send mount=test videotestsrc sr c filter sr c si n k videorate sr c si n k theoraen c sr c si n k oggmux sr c si n k shout2sen d si n k 將視訊鏡頭的畫面轉成網路串流 網路視訊監控
Mashup2 將網路廣播混合視訊鏡頭影像再轉成網路串流 souphttpsrc sr c mad sr c si n k audiorate sr c si n k audioconvert sr c si n k oggmux sr c si n k shout2sen d si n k v4l2src sr c filter sr c si n k videorate sr c si n k theoraen c sr c si n k vorbisenc sr c si n k gst-launch souphttpsrc location= ! mad ! audiorate ! audioconvert ! vorbisenc ! oggmux name=mux ! queue ! shout2send mount=mashup \ v4l2src ! 'video/x-raw-yuv,width=640,height=480' ! videorate ! theoraenc ! mux.
Thanks CC-BY-SA