Showing posts with label lanmic. Show all posts
Showing posts with label lanmic. Show all posts

09 July 2020

658. Teaching during the pandemic, part 1: How to use a mobile phone as a wireless lavalier microphone

This pandemic isn't going anywhere soon. We'll be using online/remote teaching or hybrid teaching models for at least the next two semesters up here, and it's time to figure out how to do it in a way that works for the students, as well as us lecturers, in spite of not actually getting any more time to prepare our classes than we would during a normal year.

This post is linux-centric, but the solution should be applicable to OSX and Win as well.

Using a mobile phone as a wireless lavalier microphone
While I've made proper videos in the past, I haven't tried recording 'live' lectures before. We've been asked to resume on-campus lectures this fall, but have also been told to make sure that we record everyhting so that students don't show up to class in spite of being sick.

I've moved away from using powerpoints to using the whiteboard for my lectures (I've surveyd my students -- 95% in class after class prefer chalk-and-talk).

Simply using a camera with a static microphone to record won't cut it -- it won't capture the sound properly, in particular not when you're up at the whiteboard. Also, audio-quality matters -- if you have to choose between good audio and good video, pick audio.

What do you need?
You need
* an android phone (similar solutions should be available for iOS)
* for the phone and your recording device (e.g. laptop or computer) to be online and able to connect to each-other (e.g. a LAN). You can use the laptop as a hotspot.
* the program LANMic installed on your phone
* OBS Studio to receive the stream from LANMic. There are other programs -- as long as they can receive rtsp streams, they are OK.


How-to

1. Install LANmic on your phone. Connect a lavalier/lapel mic to your phone. Install OBS Studio on your computer.

2. Both devices (phone and computer) need to be able to communicate with each other over the LAN.

If you have EduRoam, this might not be the case. In that case, use your computer to set up a wifi hotspot. See the end of this post for how to do that.

3. Start LANmic on your phone, select rtsp and start streaming. Note the address of your phone (here: rtsp://192.168.2.13:8080)
It'll look like this because nothing's connect to it:


4. Start OBS Studio and add your sources.

I've just made a quick example here. To add the phone, add Media Source, uncheck local file, and enter the address from the previous step.




If all goes well you'll see the meter for the moble mic moving.


Your phone will now look like this:


This isn't a perfect solution, but it works. Importantly, it will allow you to record everything on the fly/and or stream it and/or stream via zoom (have a look at https://obsproject.com/forum/resources/obs-virtualcam.539/).

In the next few posts I'll be exploring other solutions


Here's how to set up a wifi hotspot on debian:

Open Network:









Set up hotspot:




Then connect your phone to the new network. Note that this means that you won't have any network connectivity, unless you're also using a LAN cable.