upstage-video-hack-annex

VLC (for Linux users)

VLC offers the possibility to stream on Linux using video4linux (can access different kinds of hardware like webcams but also TV tuners etc.) and FFmpeg for transcoding (transcoding to FLV and sending RTMP to a stream server).

The file STREAMING.txt contains some links to in-depth information about streaming parameters for use with VLC.

Sample script 

For easy setup please use the avstream_vlc_linux_example.sh script (download here by right clicking and saving as file).

Modify settings

Adjust to your hardware:

  • VIDEO_CAPTURE_DEVICE:

    e.g. /dev/video0 for your internal webcam, or /dev/video1 and so on for further external hardware

  • AUDIO_CAPTURE_DEVICE_SLAVE:

    use alsa://hw:0,0 for your internal microphone or alsa://hw:1,0 and so on for external microphones
  • set the stream url STREAM_PUBLISH_URL, for example if your stream name is stream1:
rtmp://red5.example.com/oflaDemo/stream1
Additionally you may want to adjust all settings starting with STREAM_…, all other settings probably won't need to be touched. The standard configuration is to stream with VP6 and MP3 codecs, 320 x 240 pixels at 30 fps and a total bandwidth of 196 kBit/s.

Start streaming

Please ensure the script is executable and can be run:

  • using the terminal: execute chmod 755 ./avstream_vlc_linux_example.sh
  • using a graphical windowmanager: right-click the file and select Properties, then search for the settings to allow execution of the script by the user

If your script is executable you can run it:

  • in the terminal: execute ./avstream_vlc_linux_example.sh
  • using a graphical windowmanager: double-click the script and select execute in terminal

Note: In case you want to see a live preview of the streamed video you can uncomment the line in the section “watch stream?” of the script. You will need the software rtmpdump and mplayer to watch the stream.