Original g+ post about webm and Icecast
The snippet can be accessed without any authentication.
Authored by
Thomas B. Rücker
Edited
20150312 - For those who want to test WebM live st.json 2.73 KiB
"content": "For those who want to test \u003cb\u003eWebM live streaming with\u003c/b\u003e \u003cspan class\u003d
\"proflinkWrapper\"\u003e\u003cspan class\u003d\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca class\u003d
\"proflink bidi_isolate\" href\u003d\"https://plus.google.com/100957455777699991449\" oid\u003d\"100957455777699991449\"
\u003eIcecast\u003c/a\u003e\u003c/span\u003e:\u003cbr\u003eavconv -f video4linux2 -re -input_format mjpeg -framerate 30
-video_size 640x360 -i /dev/video0 -f WebM -g 5 -content_type video/webm icecast://\u003ca rel\u003d\"nofollow\"
target\u003d\"_blank\" href\u003d\"http://source:password@example.org:8000/test.webm\" class\u003d\"ot-anchor
bidi_isolate\" jslog\u003d\"10929; track:click\" dir\u003d\"ltr\"\u003esource:password@example.org:8000/test.webm\u003c/a\u003e\n
I\u0026#39;ve tested this on latest git. Note that Icecast support in the latest stable avconv release is broken, releases
before that might work.\u003cbr\u003eThere are 4 noteworthy parameters:\u003cbr\u003e-
\u003ci\u003e-video_size 640x360\u003c/i\u003e I\u0026#39;ve had to use quarter of the webcam resolution,
because it looked like the webcam wouldn\u0026#39;t deliver stable output at full resolutions. This will obviously
depend on the hardware/input used.\u003cbr\u003e- \u003ci\u003e-input_format mjpeg\u003c/i\u003e Also depends on the
hardware used, might also be YUYV or h264\u003cbr\u003e- \u003ci\u003e-framerate 30\u003c/i\u003e Doesn\u0026#39;t seem
to do anything(?), but was supposed to match the framerate of the input device\u003cbr\u003e-
\u003ci\u003e-g 5\u003c/i\u003e This one is rather important, as the default won\u0026#39;t work for streaming.
It sets the GOP ratio, so the keyframe interval. You can experiment with this. My quick testing shows that especially
browsers seem to have problems with a stream that doesn\u0026#39;t have a keyframe near the start. Values up to 10 seem
to work reliable. Setting it too low drives the bitrate up and the quality down. YMMV.\u003cbr\u003eI left out audio, as
I was only testing video playback, but adding that in should be trivial.\u003cbr\u003eThanks \u003cspan
class\u003d\"proflinkWrapper\"\u003e\u003cspan class\u003d\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca
class\u003d\"proflink bidi_isolate\" href\u003d\"https://plus.google.com/109138041668327348936\" oid\u003d
\"109138041668327348936\" \u003eLuca Barbato\u003c/a\u003e\u003c/span\u003e and \u003cspan class\u003d\"proflinkWrapper
\"\u003e\u003cspan class\u003d\"proflinkPrefix\"\u003e+\u003c/span\u003e\u003ca class\u003d\"proflink bidi_isolate\"
href\u003d\"https://plus.google.com/113295967145192038175\" oid\u003d\"113295967145192038175\" \u003e
Marvin Scholz\u003c/a\u003e\u003c/span\u003e for your work!",
Please register or sign in to comment