09 July 2020

660. Teaching in the pandemic, part 3: What I'll be doing to capture live lectures. Audio.

I've looked at a few different solutions, but I've basically settled on recording video and audio separately. The downside of this is that I won't stream. The advantage is that I can do post-processing to add clearer pictures of slides etc.

The video part is pretty straight forward. See e.g. http://verahill.blogspot.com/2020/07/659-teaching-during-pandemic-part-2.html

When it comes to audio I've explored a range of solutions:

* Bluetooth headset -- this would've allowed me to stream, but the sound quality is just too poor with bluetooth (I tried Blueparrot B350-XT). For an example of how bad it can be, check out this corporate(!) video:
Advantage: wireless, can stream, only covers one ear
Disadvantage: Sound quality

* 2.4 GHz Wireless headset -- I tested Logitech G930. The sound quality is OK, but it covers both ears, and makes it hard/ uncomfortable to deal with a live audience.
Advantage: sound quality, wireless, can stream
Disadvantage: shuts out the live audience

* 'Normal' microphones -- I have a number of microphones, including Blue Yeti. Many of them are wired (USB), and none of them will work in capturing a moving (i.e. mobile) lecturer.
Advantage: superior audio -- when very close, streaming
Disadvantage: poor audio unless you're right in front of the mic

* Mobile phone lavalier mic -- See here for how to do that: http://verahill.blogspot.com/2020/07/658-teaching-during-pandemic-part-1-how.html.
Advantage: great sound, mobile, can potentially stream
Disadvantage: drains phone battery, can be tricky to set up LAN, if using receiving device (laptop) as hotspot you may not be able to connect to the internet (i.e. can't stream)

My chosen solution:
* Using a portable audio recorder (e.g. dictaphone) --  I've got a Zoom H1n, and a lavalier microphone. I love this microphone. It's lightweight, portable, not too expensive, and the internal XY microphone is great (to my ears). The amplifier for external mics is a bit weak, but it works for my purposes, especially if you post-process in Audacity. But that leaves you having to sync your video and your audio in post. I've already showed you how easy it is to do that here: http://verahill.blogspot.com/2020/07/659-teaching-during-pandemic-part-2.html

Note that you need to invest in a decent lavalier microphone as well. Also note that most these days seem to come with a 3.5 mm TRRS connector (good for mobile phones), and the Zoom needs 3.5 mm TRS (the old standard). Many of the cheap/affordable lavalier mics that you find on e.g. Amazon come with TRS/TRRS adapters, so it's not much of an issue.

Advantage: potentially great sound, great battery life
Disadvantage: you can't stream live, needs a lavalier microphone

So there we are -- I'll set up a single webcam to record video directly to my laptop. I'll capture the sound using it as well, but mostly to help me sync the audio later. I'll record my voice using a dictaphone and a lavalier microphone, post-process the sound in Audacity, then import video and audio in KDENLive, where I'll sync everything. I can then add pictures of my slides as well, and don't have to worry about the image quality during recording.

659. Teaching during the pandemic, part 2: Recording with two cameras (on linux)

This is a very short post. What if you need to set up two (web)cameras that capture from e.g. different whiteboards?

I had a look at OBS studio, and it's not stable for me. Sometimes I get a cam image, and sometimes I don't. I also had issues with getting two cameras to work. I also looked at webcamoid and cheese. The frame rates were too bad.

What does work for me is guvcview. This is available in the debian repos.

I'll also show you how to sync the sound using KDENLive

1. Install guvcview
sudo apt-get install guvcview

2. Start guvcview.
Then go to video controls.

Select a new Device, then select New

Now you've got both feeds showing:
Then you can simply record:

I won't go into how to switch back and forth between angles in KDENLive. I'll just show you how to sync the videos using the audio:

Import both clips into KDENLive and put them in separate channels. Right-click on one of the tracks, and make it the audio reference:

Align the other clip:
They are now aligned:

Note that you could have done this with a pure audio track as well (we'll get to that in the next post).

You can then start cutting away bits you don't want using the x/scissors:

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.