Video editing - socallinuxexpo/scale-av-web GitHub Wiki

This process is under development for SCALE 14x.

Goal

After SCALE, we check the [socallinuxexpo YouTube channel] (http://youtube.com/socallinuxexpo)

  • There should be a video for each event in the schedule, or a reason why one does not exist
  • Videos should be trimmed to remove dead air and the audio should be of decent quality.
  • Eventually, these videos should be embedded into the SCALE website talk pages
  • Eventually, these videos should be added to a YouTube playlist.
  • We want to unlist and not promote videos that have serious issues with audio, are missing audio, or are incomplete

Problem videos

  • On Saturday and Sunday, room video streams were automatically segmented and uploaded into individual events. We need to manually do this with the Thursday/Friday videos.
  • There were some automatically segmented videos that did not get cut in the right place. These need to be manually extracted from the day-long video and re-uploaded.
  • Some videos have unbelievably bad audio issues. These audio issues should be noted in the Youtube description or the video should be de-listed.
  • We should attempt to fix the audio issue enough that the video is watchable.

Status

The state of all the videos are currently tracked in the following Google documents:

How You Can Help

  • Go through spreadsheet and identify start/end times for videos that need to be extracted or trimmed
  • Skim through the video and note big issues with audio or anything strange--basically, anything we can either fix or need to note in YouTube description so people don't waste their time.
  • Look into fixing the audio issues of the videos with really bad audio.

Restrictions

  • YouTube channel manager access - to trim YouTube videos or upload new videos
  • SCALE CMS login credentials - to embed the videos into the talk pages

For things that don't require credentials you can just download the video files and play around with them. The videos were marked Creative Commons, so you should theoretically be able to download any of the videos. You may need to find a browser extension to make it easier.

Video cutting Notes

This is the ffmpeg command line to use to extract a video from a long video stream, given a start and end time.

ffmpeg -nostdin -i $input_movie -c copy -ss $start -to $end ${output}.mp4"

Example:

ffmpeg -nostdin -i input/BallroomA_Thursday.mp4 -c copy -ss 21:18 -to 1:08:32 future-ubuntu.mp4

Editing Notes Overview

There are probably a lot of options out there.

This suggestion was left in the comments: Online audio noise reduction However, I was not able to get it to work when I uploaded one of my sound files.

Here are a couple of interesting guides to Audacity, from the Audacity manual. One is a general guide to remastering audio. The other features the notch filter and says it can handle loud hums and high pitched whistles: [http://wiki.audacityteam.org/wiki/Improving_and_Remastering_Audio] (http://wiki.audacityteam.org/wiki/Improving_and_Remastering_Audio) [http://manual.audacityteam.org/o/man/notch_filter.html] (http://manual.audacityteam.org/o/man/notch_filter.html)

Lan's method:

Using ffmpeg and Audacity, I hoped to demux the audio and video, use Audacity to fix the audio, then mux the original video and the updated audio to make a new mp4, which I would then upload to Youtube. (Youtube suggests using annotations to redirect people from the old bad video to the new good video.)

Some things I have learned

  • Audacity works on uncompressed audio. Therefore, you will have to use the export feature to save the audio in a format that can be muxed back into the video.

  • Audacity has limited output options and tries to outsource it to lame and ffmpeg. They will link you to the appropriate libraries to download. For our purposes, we prefer aac format or something compatible with m4a. Due to the licensing restrictions on some of the audio formats, ffmpeg can not be distributed with that codec support built-in. You may have to compile your own version of ffmpeg and point Audacity to it.

https://trac.ffmpeg.org/wiki/CompilationGuide/MacOSX

https://trac.ffmpeg.org/wiki/Encode/AAC

  • You have to experiment with the settings when trying to fix the sound. These may reduce the obnoxiousness of the original issue, but introduce a different artifact. These artifacts may be made worse when you export the audio, as you have to reencode it into a potentially lossy format. When you upload it to YouTube, YouTube will do its own reencoding.

  • In Audacity, you must always stop (not just pause) the audio track if you want to apply effects. Otherwise, all the options will be grayed out.

Editing Notes process

  • Here is an example of how to demux the video by creating a pair of files, which consists of video-only m4v and audio-only m4a.

      bin/ffmpeg -i Thursday_BallroomA/ubuntu-redux.mp4 -c:v copy -an ubuntu-redux.m4v
      bin/ffmpeg -i Thursday_BallroomA/ubuntu-redux.mp4 -c:a copy -vn ubuntu-redux.m4a
    
  • Open the m4a file in Audacity, tweak it.

  • Then figure out how to export it and convert it to mp4-compatible audio.(Tried exporting it as flac, then converted it back to m4a.) NOTE: [YouTube recommended upload encoding] (https://support.google.com/youtube/answer/1722171?hl=en)

      bin/ffmpeg -i ubuntu-redux-edited.flac -movflags +faststart -strict -2  ubuntu-redux-edited.m4a
    
  • Mux the original video and updated audio into a new mp4. Unfortunately, the end result has a high-pitched whine in the audio

      bin/ffmpeg -i ubuntu-redux.m4v -i ubuntu-redux-edited.m4a -c copy ubuntu-redux-edited.mp4
    
  • Repeat Audacity tweaks until happy with audio. Lather, rinse, repeat.

Future

We need to look ahead to SCALE 15x to see what we can automate or write tools for, to streamline this process next year. We also need to figure out the various failures that caused missing video, missing slides, and audio issues, to minimize these failures next year.