2

I have been thinking of things for our kids to do in school at lunch time and thought of starting a School Radio Channel and then thought - why not make a TV channel that can be viewed over the LAN.

First I thought I could just simply use mjpg streamer but then realised 'what about the audio'.

My plan is to use a Logitech C270 USB Web Cam or Camcorder (I have both a home and professional versions). Like I said I could simply stream the video from the camera over the LAN using mjpg streamer but need an audio solution (or combined).

I have found some info on UV4L but need a little help working out how to do this.

Will this work with a web cam or do I need to use a Pi Camera?

From the UV4L page here do I need number 10:

Real-time HTTP/HTTPS Streaming Server with the native uv4l-server module

Thanks

3 Answers 3

1

A webcam will most likely not work; they are usually made for Windows and the chances that it would be made for Linux are very low. I'd try to use the Pi camera because it was specifically designed for the Pi.

4
  • Seriously? I've been using linux computers for about 4 years dialy now and I've not faced any problem with webcams...
    – Luis Diaz
    Sep 27, 2017 at 8:08
  • I haven't used any webcams with the Pi (or any Linux), but I know that most drivers are based for Windows only and sometimes Macs. I don't think that Raspbian would come pre-installed with webcam drivers; that's why they have specific Pi-webcams.
    – anonymous
    Sep 27, 2017 at 10:52
  • There are a lot of standard drivers for linux, maybe there isn't for that one
    – Luis Diaz
    Sep 27, 2017 at 10:55
  • USB devices including cameras use a public standard today, meaning the drivers are mostly generic -- you don't need one specifically for your camera unless it is to control proprietary features. So most web cams should work, but there are no guarantees unless it says so on the box.
    – goldilocks
    Feb 15, 2020 at 20:10
1

13 may be more useful. After a couple of tweaks to use the UVC driver I found this to work with my USB webcam.

1

You can connect the Rapberry Pi to a GoPro via WiFi and get the live stream URL which would give you audio and video. You could then redirect that stream to something like YouTube Live so that it's accessible online. Note: this would require you to connect to your network via ethernet.

KonradIT's goprowifihack repo is a great starting point to working with the GoPro commands and live streaming.

Streaming to YouTube Live with VLC and FFMPEG is a good starting point for streaming to YouTube Live via the command line interface. You can replace the PATHTOFILE with your GoPro live stream URL.

Here is an example Python script I used in a similar project:

"""
Python script for streaming live video from GoPro Hero 3 to YouTube Live
"""
import subprocess
import urllib2

PATHTOFILE = "http://10.5.5.9:8080/live/amba.m3u8"
STREAMID = "xxxx-xxxx-xxxx-xxxx" # YouTube Live ID
PASSWORD = "xxxxxxxxxx" # GoPro WiFi Password

print "Enable Preview..."
url = "http://10.5.5.9/camera/PV?t=${}&p=%02".format(PASSWORD)
urllib2.urlopen(url, timeout=10)

cmd = "vlc \"%s\" -Idummy --network-caching 4000 --sout " \
      "'#transcode{vcodec=FLV1,acodec=mp3,samplerate=11025,threads=2,fps=25}:std{access=rtmp,mux=ffmpeg{mux=flv}," \
      "dst=rtmp://a.rtmp.youtube.com/live2/%s" % (PATHTOFILE, STREAMID)

subprocess.Popen(cmd, shell=True)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.