Video Editing

After tinkering with making pre-recorded lectures, I just have to record the various tricks I have to avoid having to figure them out again.


Software: OBS, QuickTime, Goodnotes


I accidentally discovered a new way to trigger Goodnotes's presentation mode. In OBS, add a video capture device to capture iPad directly. Open Goodnotes on iPad. In OBS, first change the video capture device's resolution to anything that is not currently selected and then change back. Then Goodnotes is in Presentation mode.

Old way:

Use OBS. I make a scene containing Webcam and QuickTime. QuickTime captures what is shown on my iPad. I use Goodnotes to show slides and I write on slides as I go.

There is a way to force Goodnotes to go into Presentation Mode, so that you don't show its interface. Another advantage is that your notification will not show up either, as I heard. The trick is the as follows. []

My method is only slightly different as I let OBS capture QuickTime rather than iPad directly.

  • Connect iPad to Mac with cable.
  • Open QuickTime and select "New Movie Recording" without actually starting the recording. Instead, press arrow next to the recording button, select iPad as "camera".
  • Open OBS. The scene will appear. Goodnotes is not in presentation mode.
  • Magic moment: Unplug and replug the cable. Goodnotes is in presentation mode now.
  • Since QuickTime gives me two black blocks of padding at the top and bottom, in OBS, I set up 270px cropping at top and bottom in the Edit Transform dialogue.

After recording, exit OBS, stop QuickTime and unplug cable. Just clean up properly. If you don't clean up properly, next time QuickTime may show a blank screen for your iPad capture and you will have to restart iPad to fix the issue.


Software: Blender

First I tried to use iMovie to add a line of text. I couldn't find a way to place it where I wanted. I also needed to remux from mkv to mp4 or it can't be imported. Thus I switched to Blender. It is a 3D modelling software and in particular you can produce 3D animation which is a video and thus unsurprisingly you can edit video clips in with Blender.

Use the Video Editing tab and there is no need to go anywhere else. I am relatively familiar with Blender. For example, I know, to add object, you press shift-A. Add your video clips in.

Use the sequencer. By default in the Dimension panel, Frame End is 250 which will chop off a large chunk of my video. I don't know any good way to set that; I just use F3 to search for the command "Set Frame Range to Strips".

Use the circle ends of the horizontal bar in the sequencer to zoom in and out in the sequencer. In Overlay, the small button in the upper left corner of the Sequencer that shows two overlapping circles, I set Waveforms On. In this way, I can see the waveform of the audio channel and I find it easier to locate where I want to add text.

Add text as you add any object in Blender. You can set its location and duration and fade it in and out.

Merging clips

Software: Blender, FFmpeg

I can do this in Blender by adding in multiple files and place them in the Sequencer. If no editing is needed, I can use ffmpeg directly. []

  • make a file mylist.txt
# this is a comment
file '/path/to/file1.mkv'
file '/path/to/file2.mkv'
file '/path/to/file3.mkv'

Note that these can be either relative or absolute paths.

  • apply ffmpeg
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mkv

Exporting from Blender

Software: Blender

Use the Output Properties in the side bar of Blender. As this is not exporting a video of 3D animation, I will just output FFmpeg Video. I set video codec to H.264 and output quality to Medium Quality and set audio Codec to MP3. (Actually I just want a fast way to get the video out and then I will apply x.265 to it to make it much smaller. I don't know which one is the fastest.) And then I just hit Render Animation. Then it is waiting time.

Making video file size smaller

Software: FFmpeg

After taking a break, you notice that your file size is huge. According to the info from stackexchange, x.265 codec is currently the best. It is said -crf 24 to 30 are all reasonable and that lower number gives higher quality. You apply

ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4

And you are left with a video about 1/6 of the previous size.