回答編集履歴

1

コメントに対する返答

2019/09/06 12:33

投稿

katsuko
katsuko

スコア3469

test CHANGED
@@ -11,3 +11,41 @@
11
11
  上記のリファレンスのとおり、`filesrc`プラグインに`auto-start`というプロパティは存在しませんので、指定する必要はありません。
12
12
 
13
13
  (あと、「`average-bitrate`」と「`iframe-period`」もですかね)
14
+
15
+
16
+
17
+ ---
18
+
19
+ 最初に言い訳しておきますが(笑)、自分はgstreamerで音楽プレイヤーを作っただけなんで、動画やストリーミングサーバの知識はありませんので、あしからず。
20
+
21
+
22
+
23
+ * [GStreamer Reference - rtmpsink](https://gstreamer.freedesktop.org/documentation/rtmp/rtmpsink.html?gi-language=c)
24
+
25
+
26
+
27
+ リファレンスマニュアルに、サンプルがあります。
28
+
29
+
30
+
31
+ ```
32
+
33
+ gst-launch-1.0 -v videotestsrc ! ffenc_flv ! flvmux ! rtmpsink location='rtmp://localhost/path/to/stream live=1'
34
+
35
+ ```
36
+
37
+
38
+
39
+ ソースがテスト用のものになっています。まずはこれを動かしてみてはいかがでしょう。
40
+
41
+
42
+
43
+ 上記が動いたら、`videotestsrc`を`filesrc`に変えるだけ…、ですが、ググってみると何となくデコードも必要な感じがするので、後ろに`decodebin`を追加してみてください。
44
+
45
+
46
+
47
+ ```
48
+
49
+ gst-launch-1.0 -v filesrc location=video/STREAM.mp4 ! decodebin ! ffenc_flv ! flvmux ! rtmpsink location='rtmp://localhost/path/to/stream live=1'
50
+
51
+ ```