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

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.

  • 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 '17 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 '17 at 10:52
  • There are a lot of standard drivers for linux, maybe there isn't for that one – Luis Diaz Sep 27 '17 at 10:55
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, privacy policy and cookie policy

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