Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Saturday, January 19, 2013

A foray into video recording and editing

I'm fully aware it's been a very long while since I discussed anything technical on this site, and that makes me feel a little sad as that was the original point.  I had been somewhat hindered by the fact that there was very little I was doing outside of work that seemed interesting, and a lot of what I was doing in work was too difficult to make generic enough to not get me in trouble.  However, since I had started doing YouTube Let's Play videos (as mentioned previously) I've got something that's pretty interesting and somewhat technical, so here we are.

Let's Drink to Gaming is a Let's Play show with themed cocktails.  I wanted this to be a little more interesting than just playing a game and narrating what's going on, so I decided that I would play with a rotating cast of guest hosts over the internet.  This leads to a somewhat interesting challenge of broadcasting the game video to the other person while simultaneously recording it.  It also raised the question of how to record multiple audio sources, and broadcast multiple sources.  I needed to hear and record their voice, they needed to hear me and the game.

I did some wandering around Google and tried: XSplit, FFSplit, Fraps, Taksi, Bandicam, and I think "GameCam"?  Eventually I settled on Dxtory.  It's paid software but it has a lot of features that were really important in my situation that only really XSplit also mirrored, and since XSplit uses a subscription pay model Dxtory is technically cheaper.  The most important features Dxtory has are:
  • The ability to record an arbitrary number of audio streams.
  • The ability to stream the video it's recording to several DirectShow contexts.
Almost every other program only recorded 2 audio streams, if that.  They're really well setup for traditional commentary recording where you want the game and a microphone, but I was obviously biting off a bit more.  Since starting I've recorded up to 4 tracks at once: Game audio, my friend Tim and his fiancĂ©e over Teamspeak, myself on a headset mic, and my girlfriend on another local mic.  Being able to isolate all these lets me mix everything independently while I'm editing the final video so I can do some EQ and noise removal, basically make a run through and try to clean up the audio as much as possible.

Streaming via DirectShow is the way most webcams work, so since Dxtory can do that, I have a lot of options for video conferencing or streaming software.  I tried Skype first since it's super-easy, but the video quality is awful.  Skype uses 640x480 streams.  We've been trying to get RTSP with VLC working for some time can't quite get it over the internet.  I have a sneaking suspicion Verizon may be blocking RTSP.  I had also briefly toyed with the idea of using a game streaming site like Twitch and maybe making the channel private, if that's possible, but the lag on my stream was unbelievable.  I just recently found out this was because one of the utilities which came with my motherboard, a bandwidth prioritization utility, was devoting almost all my network resources to a Synergy server.  So maybe this is an option again.  I should also revisit the VLC tests in case bandwidth was an issue.

Audio mixing for the live feed was still unanswered.  This market is unfortunately less varied and most of it is paid software.  I tried without success using PulseAudio for windows, Jack for windows.  Eventually I bought Virtual Audio Cable.  VAC lets you create virtual audio devices on your PC and also arbitrarily route real and virtual devices.  This has been really important when we've played non-co-op games and had my girlfriend in the room with me.  I can use VAC to combine both of our microphones, and the game audio into a single device and make Teamspeak use that as its microphone while not affecting my ability to record all 3 of those sources alone.

So once I recorded everything I end up with a few gigs of x264 encoded AVI files with separate audio streams.  All the post-production work is done in Linux.  The software for windows I bought to record and stream was pretty cheap, and they were the only programs I saw with the featuresets I wanted.  Video editing software, however, is really freaking expensive.  I tried some free programs for windows, but they were all terrible.  Nothing could even match the feature set of of Adobe Premier Elements or Windows Movie Maker.  So I went to Linux where there were at least a few programs for me to choose from: Cinelerra, KDEnlive, and OpenShot.

I made my first video in Cinelerra but it was clunky, old looking, unstable, and couldn't export quickly or easily.  I wound up rendering the audio separately, and the video into a ludicrously large MOV, 80 gigs or something, then muxing the two together and reencoding on the command line.  Since then I've been using KDEnlive and it is much much better.  It still crashes and it has some clunkiness around certain tasks or filters.  I'd love some project templates and previewing animated title cards has some problems.  Also, it had this super-strange audio glitch that made creating the clip show utter madness.  I may try OpenShot soon, since it looks really good but I have nothing on it now.

I have a shell script that invokes ffmpeg to extract all the audio streams from the video file so I can work with them in Audacity.  Audacity seems like the go-to cross platform audio program, so I use that to import all the tracks, then run noise removal and run a pre-amp on anyone who seems too quiet.  Then I basically listen to the entire project covering up bits of keyboard noise or other unwanted sounds and if anyone talked over anyone else, bring out whoever said something better.

Anyway, that's the basic setup:
VAC to setup the audio so everyone can hear what they need.
Dxtory to record all the audio to independent data streams and output video in a usable format.
Google Hangouts to stream video to the remote commentators.
Audacity to clean and mix the audio into a single track.
KDEnlive to put everything together into the final video.

Yeah, this is long winded, but at least I'm talking about software again.  Maybe I'll post the bash script next time I boot linux to do some work.

Wednesday, September 10, 2008

More Cisco Linux VPN problems

I have noticed another issue with Cisco's VPN for linux, this time in the form of a module that inserts fine but won't connect. /etc/init.d/vpnclient_init status reports a good module but the interface can't be found.
When I saw this my first inkling was to see if I could change the name of the interface it's looking for in the initscript, this made status report good but the client still won't connect to anything.
This is because Cisco, in their infinite "wisdom" decided to hard code the name of the interface into the driver itself.

Your best bet is to figure out what udev rule is forcing the rename...it's probably in the file /etc/udev/rules.d/70-persistent-net.rules

Only other option is to rewrite parts of vpn_ioctl_linux.h to change the device name the driver tries to use to the one it's getting anyway, or change the MAC address and hope /etc/udev/rules.d/75-persistent-net-generator doesn't mess with your device when you reload the module.

Matter of fact, it'd be a cool patch to change those on the fly.

Hmm,

--PXA

Tuesday, September 9, 2008

Mini-update: KDE4

I just rebuilt KDE 4.1++ from SVN sources, and frankly, it makes me want to kill small puppies.
This is the list I have compiled after approximately 15 minutes of use.
  1. I tried to use the auto-hide, KDE4 does not like this. To trigger the taskbar's visibility you need to get all the way to the screen side where the panel lives, then back off several pixels. And hope. The panel would sometimes not respond or become visible then immediately fade. But the edge of the screen itself does not respond to input at all.
  2. For me, KDE starts without window decorators, if I try to enable them the panel gains a title bar which doesn't seem to accept input. This causes some problems when trying to open the panel settings. The panel settings are cool when they open since they attach to the panel. But when this titlebar is open you need to quickly cross it to get to the configuration panel, a lot of the time you will lose both panels.
  3. Desktop Folder is the crappiest thing I've seen in a long time, I would LOVE to turn this off and get a real desktop. I can't.
  4. The focus is very strange, to bring a window to front you need to click on its TITLEBAR, not anywhere in the window... I'm hoping that's a settable option but I couldn't battle the interface enough to get to the control panel so no idea here. If this is default, it's just a stupid idea.
Maybe I'll try more later, maybe I'll delete it again and wait for KDE 4.2. Anyone have any GOOD things to say about KDE4?

--PXA