How the YAPC::NA videos got on Youtube

In my previous post oalders (of Metacpan) asked me about how working on Windows influenced the process and in answering him i got a bit more wordy, so here's another post:

Video is a bit easier on Windows because, even if many of those are very amateur, it has a wider spread of tools available. However, that said, i still needed a bunch of linux tools (that i could luckily run on windows).

First issue was to free the stream from the Silverlight player. As mentioned in the previous blog post, lots of people helped with that.

Next was getting it dumped to the hard disk into a file i could actually play back afterwards. Windows Media Player couldn't, Mplayer crashed and only VLC finally worked. The command lines i saw didn't help a lot, but it led the way because it did produce some kind of file. By fiddling with the GUI i could get it to dump a usable file. And after converting the gui settings back into command line instructions (after cursing VLC's terrible documentation) i was able to perform the dumping with scripts. The command line instructions ended up being:

qw[ --sout-keep --sout "#transcode{vcodec=div3,acodec=mp3,vb=6000,ab=320,deinterlace}:duplicate{dst=display,dst=std{mux=asf,access=file,dst=$dump_file.asf}" ]


The "keep" option is important. When the stream was cut off at the venue, i.e. by shutting off a camera, VLC would try to reconnect to the stream and in the process overwrite the data it had dumped with an empty ASF header file. The keep "keep" option prevented that from happening (but not before a lot of data was lost). Another issue here was: While streaming and dumping the volume controls of VLC did literally nothing. Windows 7 helped here by providing me with volume sliders per process.

Next was converting the raw ASF stream into something that could be distributed. No tool i had could actually read it. At first i tried ASFTools, but that only resulted in a very desynched stream. This is caused by the fact that ASF has non-constant FPS. This doesn't mean it changes sometimes, but literally all the time. Hobbs helped me later with the conversion and said the file was apparently at 1000 FPS. So ASFTools was useless for the conversion, but it helped me with one thing: The asf files were unseekable, so short of watching the entire thing i could not tell what was actually dumped. ASFTools was able to fix that without recompression.

Hobbs contribution here was also immeasurable. I was entirely stumped with the conversion. None of my tools could make sense of the ASF files, even though they could play them. He worked out and provided me with parameters for mencoder to reencode them into AVI format, which ended up, after some fine-tuning, to be this:

mencoder -quiet -oac mp3lame -lameopts q=1 -ovc lavc -lavcopts vcodec=mpeg4:vqscale=3 -ffourcc DIVX -ofps 30 -o %1.avi %1


After that the lion's share of mental work was done and what remained was mostly menial work: Cutting the files into pieces and uploading them. Here's another part where Windows was really useful. VirtualDub is a free, open-source and lightweight tool for video processing. It also makes it extremely easy to cut videos without reencoding them by making it easy to navigate between keyframes, select regions and dump them straight to fily with Direct Stream mode. This took considerable time because i needed to go through all the dumps, find appropiate start and end points for the talks and figure out exactly what talk it was and what its title should be.

Last came the uploading to Youtube. I had luckily recently upgrade my internet connection, so i could upload at ~300kbyte/sec. However this also meant that i had uploaded four 50-minute videos before Youtube told me that it rejected the files for being too long. However, this restriction only required a validation of my cell phone number, which only took a minute all in all. I did need to reupload those videos again though. After that i dumped them all into a playlist (which i had to nuke at some point, because Youtube will happily add videos to playlists multiple times) and sorted them in some kind of chronological order.

And now you can watch them. :)

One last note: After i had uploaded many of the videos to youtube already, JT sent me an email to ask me to discuss a small matter relating to the videos and also mentioned that while i had not obtained permission, he would allow me to leave them up. I was a bit unhappy about it, but in retrospect he was correct. I did not think of it at the time because i was too busy figuring out the technical details, but i should have asked. However, please don't take this as discouragement in case you ever think of doing this for another con. Con organizers will love you to death if you offer to do this for them. Just make sure you let them know in advance and ask permission, because sometimes they have to deal with legal issues involving third parties.

8 Comments

Thany you for doing this and leaving the valuable information here.

One small suggestion: What about inserting the name of the speaker, the date of the recording and the yapc::na2012 logo at the beginning of the films?

Thanks for going into such detail about this. I had briefly wondered if there were any legal issues with posting the videos, but my assumption was that people would generally just be grateful for access to the stuff. Glad to hear you can leave them up.

I also didn't realize you could upload longer videos to youtube by validating with a phone number. That's helpful info as well.

Would you mind adding the speakers’ names to the YouTube titles? That would be very helpful. (Excepting maybe the surprise guest speaker.)

Great to see all those videos converted, the more so I don't have to do it myself. :)

My workflow was a bit different. I dumped streams with

mplayer <url> -user-agent 'NSPlayer/7.10.0.3059' -dumpstream -dumpfile <file>.wmv

and then converted with ffmpeg. My scripts – currently for "On demand" streams – are on github: https://github.com/jest/YAPC-NA-2012-get-video

Any luck getting the rest of the YAPC videos up? Would love to check out the DBIx::Class intro talk among others.

Ah whoops just checked http://www.youtube.com/user/yapcna/videos , seems to have all or most of them as of today :)

Leave a comment

About Mithaldu

user-pic Not writing much, but often found pawing at CPAN with other #perl-cats