「GStreamer」の版間の差分
Kusakata.bot (トーク | 投稿記録) (Pkg/AUR テンプレートの更新) |
(英語版からUsage転載) |
||
| 21行目: | 21行目: | ||
* {{Pkg|gst-plugins-ugly}} - 配布に問題がある高品質のプラグイン。 |
* {{Pkg|gst-plugins-ugly}} - 配布に問題がある高品質のプラグイン。 |
||
* {{AUR|gst-plugin-libde265}} - gstreamer 用の {{Pkg|libde265}} プラグイン (オープンな h.265 動画コーデックの実装)。 |
* {{AUR|gst-plugin-libde265}} - gstreamer 用の {{Pkg|libde265}} プラグイン (オープンな h.265 動画コーデックの実装)。 |
||
| + | |||
| + | == Usage == |
||
| + | |||
| + | === Using gst-launch-1.0 === |
||
| + | |||
| + | A helpful tool of GStreamer is the {{man|1|gst-launch-1.0}} command. It is an extremely versatile command line tool to create GStreamer pipelines. It is very similar to and can do many of the things the [[FFmpeg]] command can do. Here are some examples: |
||
| + | |||
| + | Convert an MP4 file to MKV: |
||
| + | |||
| + | $ gst-launch-1.0 filesrc location=source.mp4 ! qtdemux name=demux matroskamux name=mux ! filesink location=dest.mkv demux.audio_0 ! queue ! aacparse ! queue ! mux.audio_0 demux.video_0 ! queue ! h264parse ! queue ! mux.video_0 |
||
| + | |||
| + | === Using gst-discoverer-1.0 === |
||
| + | |||
| + | Another helpful tool is {{man|1|gst-discoverer-1.0}}, which is the GStreamer equivalent of FFmpeg's {{man|1|ffprobe}}. |
||
| + | |||
| + | Get info on a video file: |
||
| + | |||
| + | {{hc|$ gst-discoverer-1.0 file.mp4|2= |
||
| + | Properties: |
||
| + | Duration: 0:02:55.613000000 |
||
| + | Seekable: yes |
||
| + | Live: no |
||
| + | container: Quicktime |
||
| + | audio: MPEG-4 AAC |
||
| + | Stream ID: c910ef2fa357f9f4ad365aebc98cfca88d23fdca99d832645f5113efa43b0cd3/002 |
||
| + | Language: <unknown> |
||
| + | Channels: 2 (front-left, front-right) |
||
| + | Sample rate: 44100 |
||
| + | Depth: 16 |
||
| + | Bitrate: 125588 |
||
| + | Max bitrate: 125588 |
||
| + | video: H.264 (Constrained Baseline Profile) |
||
| + | Stream ID: c910ef2fa357f9f4ad365aebc98cfca88d23fdca99d832645f5113efa43b0cd3/001 |
||
| + | Width: 192 |
||
| + | Height: 144 |
||
| + | Depth: 24 |
||
| + | Frame rate: 15000/1001 |
||
| + | Pixel aspect ratio: 1/1 |
||
| + | Interlaced: false |
||
| + | Bitrate: 107884 |
||
| + | Max bitrate: 107884 |
||
| + | }} |
||
== 統合 == |
== 統合 == |
||
2022年1月11日 (火) 04:03時点における版
GStreamer は GObject の型システムを使って C プログラミング言語で書かれたパイプラインベースのマルチメディアフレームワークです。
プログラマーは GStreamer を使うことで、単純な音声再生や動画再生から録画・録音、ストリーミング、編集まで、様々なメディア処理コンポーネントを作成することができます。パイプライン設計により、動画エディタやストリーミングメディアの配信プログラム、メディアプレイヤーまで幅広いマルチメディアアプリケーションの基礎となります。
クロスプラットフォームになるように設計されているので Linux (x86, PowerPC, ARM), Solaris (Intel, SPARC), macOS, Microsoft Windows, OS/400 上で動作します。GStreamer には Python, C++, Perl, GNU Guile (guile), Ruby などのプログラミング言語用のバインディングが用意されています。GStreamer はフリーソフトウェアであり、GNU Lesser General Public License でライセンスされています。
目次
インストール
GStreamer を役立てるには、プラグインパッケージのインストールが必要になります:
- gst-libav - 多数のデコーダとエンコーダが含まれている libav ベースのプラグイン。
- gst-plugins-bad - 品質テストやドキュメントが必要とされるプラグイン。
- gst-plugins-base - 重要で典型的な基本セット。
- gst-plugins-good - LGPL ライセンスで配布されている高品質のプラグイン。
- gst-plugins-ugly - 配布に問題がある高品質のプラグイン。
- gst-plugin-libde265AUR - gstreamer 用の libde265 プラグイン (オープンな h.265 動画コーデックの実装)。
Usage
Using gst-launch-1.0
A helpful tool of GStreamer is the gst-launch-1.0(1) command. It is an extremely versatile command line tool to create GStreamer pipelines. It is very similar to and can do many of the things the FFmpeg command can do. Here are some examples:
Convert an MP4 file to MKV:
$ gst-launch-1.0 filesrc location=source.mp4 ! qtdemux name=demux matroskamux name=mux ! filesink location=dest.mkv demux.audio_0 ! queue ! aacparse ! queue ! mux.audio_0 demux.video_0 ! queue ! h264parse ! queue ! mux.video_0
Using gst-discoverer-1.0
Another helpful tool is gst-discoverer-1.0(1), which is the GStreamer equivalent of FFmpeg's ffprobe(1).
Get info on a video file:
$ gst-discoverer-1.0 file.mp4
Properties:
Duration: 0:02:55.613000000
Seekable: yes
Live: no
container: Quicktime
audio: MPEG-4 AAC
Stream ID: c910ef2fa357f9f4ad365aebc98cfca88d23fdca99d832645f5113efa43b0cd3/002
Language: <unknown>
Channels: 2 (front-left, front-right)
Sample rate: 44100
Depth: 16
Bitrate: 125588
Max bitrate: 125588
video: H.264 (Constrained Baseline Profile)
Stream ID: c910ef2fa357f9f4ad365aebc98cfca88d23fdca99d832645f5113efa43b0cd3/001
Width: 192
Height: 144
Depth: 24
Frame rate: 15000/1001
Pixel aspect ratio: 1/1
Interlaced: false
Bitrate: 107884
Max bitrate: 107884
統合
PulseAudio
PulseAudio のサポートは gst-plugins-good パッケージによって提供されます。
軽量デスクトップ
音声の出力先のデバイスを変更するなど、GStreamer の設定をしたいときは、gstreamer-propertiesAUR パッケージに入っている gstreamer-properties を使用します。各ユーザーで実行することも、全てのユーザーに適用されるように root で実行することも可能です。ユーザーごとの設定ファイルは $HOME/.gconf/system/gstreamer にあり、全ユーザー共通のファイルは /etc/gconf/gconf.xml.defaults にあります。
KDE / Phonon の統合
KDE#Phonon を見て下さい。
ハードウェアアクセラレーション
ハードウェアビデオアクセラレーションを見てください。
GStreamer は自動的に適切な API を認識・使用します [1]。使用する API にあわせて以下のパッケージをインストールしてください:
- gstreamer-vaapi - VA-API のサポート。
- gst-plugins-bad - VDPAU のサポート。