Skip to main content

Processed Honours Final Presentation Video

I’ve cleaned up and merged the videos of my final research presentation that I recently uncovered The cleaned up version has been put on my ZFS Research Page.

Alternatively you can watch it on YouTube:

Background

This was recorded in November 2014, at the end of my Honours research program. I was awarded First Class Honours for this work.

Earlier that year I had been invited to present my research at BSDCan 2014 in Canada. The BSDCan video was never recorded due to technical problems and I had believed the video of this presentation had been lost too, so I was very happy to find a copy despite the poor quality of the recording.

FFMpeg Transcoding Trivia

To fix up the video I wanted to do three things:

  • Crop the bottom section of the video to reduce file size (but keep me and the overhead slides in frame)

  • Increase volume (as much as possible without significant distortion)

  • Merge the two files into one longer video (without requiring another re-encoding of the audio and video)

All this was done with the following commands.

First, determine the current volume levels to see how much it can be increased without causing clipping:

ffmpeg -i part1.mp4 -af volumedetect -vn -sn -dn -f null /dev/null
ffmpeg -i part2.mp4 -af volumedetect -vn -sn -dn -f null /dev/null
-af volumedetect

This is an audio “filter” which produces no file output, but shows the maximum volume level and how many samples would be distorted at different amounts of volume boost.

-vn -sn -dn -f null /dev/null

This tells ffmpeg to ignore video and any other input and produce no output, since we are just checking the volume at this point.

Next, transcode the video to temporary “transport streams”, performing the cropping and volume boost, while keeping the H264 and AAC codecs for MP4 video:

ffmpeg -i part1.mp4 -vf "crop=1080:1080:0:0" -vcodec h264 -acodec aac -af volume=volume=12dB:precision=fixed temp1.ts
ffmpeg -i part2.mp4 -vf "crop=1080:1080:0:0" -vcodec h264 -acodec aac -af volume=volume=12dB:precision=fixed temp2.ts
-vcodec h264 -acodec aac

Set the audio and video codecs to use (H264 and AAC because we want to merge back into MP4). If not specified, ffmpeg will use the default for the output format (which would be MPEG-2).

-vf "crop=1080:1080:0:0"

This is a ffmpeg video filter which does the crop (to a 1080x1080 square, which contains me and my slides for the duration of the video).

-af volume=volume=12dB:precision=fixed

Boosts the volume by 12dB, using fixed precision calculations.

-c:v copy

This would tell ffmpeg to copy the video stream without re-encoding, if the cropping video filter was not wanted.

-c:a copy

This would tell ffmpeg to copy the audio stream without re-encoding, if the volume audio filter was not wanted.

Finally, losslessly merge the temporary files:

ffmpeg -i "concat:temp1.ts|temp2.ts" -c copy output.mp4
-i "concat:temp1.ts|temp2.ts"

This tells ffmpeg to concatenate the two files. The “concat protocol” form only works on certain inputs (such as MPEG streams). For other formats you have to use a more complicated process to specify the files to be merged.

-c copy

For the merge command, this tells ffmpeg to copy both audio and video without re-encoding.