Overcoming Mobile Video Limitations with ffmpeg

I record most of my videos on my phone in my lab. Alas, mobile phones have their limitations.

In my most recent video about the A-Level Physics required practical; investigating stationary waves. It’s a long video, nearly two hours long, so I don’t think it’ll be a popular one, but it’s packed with details.

Not only did I run out of storage space, my phone kept overheating too. Whenever it overheated, it I would get a message warning me that recording quality would be impaired. Well, I ignored the warnings. That was a mistake. To get over the storage space issue, I recorded as much as I could that morning, then dumped the files on my PC that night, freeing up space for the next day’s recording.

I’ve found it far quicker to use ffmpeg directly from the command line to stitch together videos, rather than using video editing software with a graphical user interface. I had to record the video over two days, dumping the video files on my laptop HDD after the first day to make room for the second. I used ffmpeg to stitch the videos together and then uploaded it to YouTube, with the intention of using YouTube’s built in editing tool to chop out any unnecessary bits. After uploading it, I barely had any HDD space left (less than 1GB) and I was also working on a video about centrifugal (yes, centrifugal) force, so I had to delete the local copy of the video files. The only copy was now on YouTube itself.

That’s when I realised my mistake. While looking for bits to chop in the YouTube editor, I found two five-minute chunks where there was audio but no video. The video files were huge because I’d recorded in 4K 60fps, but this has caused the camera to overheat and malfunction.

Not a problem, I thought. I’d just download the video file back off YouTube, chop it up with ffmpeg, re-record the faulty bits, concatenate them again and re-upload it, right?

Wrong. Despite uploading a 4K video file, YouTube would only let me download it at 1080p 60fps again. Try as I might, I couldn’t get the 4K video back. Oddly, the YouTube app on my phone gave me the option of watching the video in 4K, but not YouTube in my browser. To download the video file, I tried YouTube’s built in creator tool and various third party programs too, but nothing would get me that 4K file back.

So I had the big 1080p 60fps file, I chopped it fine with ffmpeg. Then I re-recorded the other bits. When I tried to concatenate it all, I had issues. The video (and audio) formats were different, and ffmpeg couldn’t handle it. I won’t go into details, but I spent a couple of days fiddling to get the videos to concatenate. In the end, I had to convert all the parts to a different format and then concatenate that.

The video is live now, albeit at 1080p 60fps. I’ve kept the video files in case I’m able to download at 4K in the future and run the same ffmpeg commands, but I’m not hopeful. So here’s what I learned:

  • Do not delete local files.
  • Use the ffmpeg tools to clip the videos before concatenating, to check they are okay.
  • If the phone overheats, stop recording and wait for it to cool. Don’t push through.
  • Don’t delete local files (did I mention that?)

Reminder: Weekly Live Tuition Sessions!

SUNDAY 11th January

GCSE Physics9:30am – 10:20amInfrared radiation
A-Level Physics10:30am – 11:20amMeasurement of specific charge
GCSE Astronomy11:30am – 12:20pmExploring the moon

If you wish to enrol on the tuition sessions and haven’t yet, then click enrol below

Leave a comment

Discover more from Physics with Keith

Subscribe now to keep reading and get access to the full archive.

Continue reading