User:Tomskyhaha/VideoWorkflow

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Technical details of the videos

[edit]

Equipment: Xiaomi Mi 8SE Android phone with latest stock firmware

Video
[edit]

Software: Open Camera v1.45.2(from Sourceforge, Camera 2 API enabled)

Hardware-accelerated video encoding chip: Quacomm Snapdragon 710 SoC (capable of recording 1080p@120fps and 4k@30fps)

Software settings:

  • 3840x2160@30fps (occasionally 1080p@120fps)
  • 200Mbps bitrate (~120Mbps effective)
Subititle (Timed text, for location)
[edit]

Subtitles enabled for recording location

Audio
[edit]

Software: Audio Recorder, available on F-Droid)

Software settings:

  • Format: FLAC 16bit
  • Sample rate: 48kHz
  • Record source: Unprocessed
  • Channel: Stereo

A script for splitting WebM videos produced from the above setup

[edit]

I have only learned the script language for an hour for the sole purpose of writting this, have no previous experience of programming whatsoever. Don't blame me if it doesn't work for you. I'm using Lubuntu 18.04.2 LTS, only additional package needed is ffmpeg itself. Could anyone change it into a loop script? Greatly appreciated.

#!/bin/bash
wext=`find . -maxdepth 1 -type f -name "*.webm" -size +4G -printf '%f\n'| head -1`
#Find all WebM files larger than 4GiB on one level, without directory indications (./), grab the first line
woext=`echo "$wext" | cut -f 1 -d '.'`
#remove file extension from "wext variable"
if [[ $(find . -type f -name "*.webm" -size +4G | head -c1 | wc -c) -ne 0 ]];
#determine whether WebM files larger than 4 GiB exists in this folder
then
    ffmpeg -i "$wext" -c copy -map 0 -segment_time 00:04:20 -f segment -reset_timestamps 1 "$woext"_%02d.webm && mv "$wext" "$wext".splitted
#split video into 4:20 minutes' segments; rename processed file
else
    echo 'All Done!'
fi

Subtitles

[edit]

They usually come with coordination subtitles (here they are called "Timed Text") that indicate the location and direction of the record.

Due to the limit of chunked uploading here,(max. 4GiB per file) the videos need to be split before uploading. In this case, the subtitles (labeled as English) locate at the first file, ie. xxxx_xxxxxx000.webm (instance) or for the files processed using the above script, xxx_xxx_00.webm (instance)

Sorry, but...

[edit]

As you can see from here, a lot of the segments are missing (i.e. xxx_00, xxx_01, xxx_02, xxx_03, xxx_04, xxx_05), because of these problems. Theoretically I could retry those uploads, but my time is limited, besides the fact that such operations are tedious. When the first segment is missing for a clip, subtitles are not uploaded.

subtitle translation

[edit]
1
00:00:00,000 --> 00:00:00,728
2019年4月12日 上午11:13:36
42.27249, 123.82925, 70.0m, 206°
年-月-日 上午/下午
yyyy-mm-dd a.m./p.m.

I wish ...

[edit]

Hopefully someone in the future will be interested in extracting frames with location from my videos, to make the recordings available on Geotagging enabled maps, eg. Openstreetmaps etc.