avm: Loseless 4k60fps video editing

trolleway
2 min readApr 23, 2021

--

I did not find Android loseless video editing software, so i created a bash scripts for termux.

In 2021 only acceptable video format is 2160p60. Big problem in video editing for my hardware stack becoming encoding video. It takes too long, most software has own strange presets with unknown bitrate, with created many years ago for 1080p30. Meanwhile, ffmpeg allow merging and cut video files without re-encoding, but i did not find GUI for this operation. There is totally different calls for h264, h265 and others codecs.

So i created a simple bash scripts with fmpeg calls for platform-independed use. My target platform is Termux in Android, so i can buy a modern smartphone with 2160p60 and zoom, compile and upload videos in shooting day, withouth need for transfer to PC.

Also this scripts works on Ubuntu and Windows using docker.

Install

git clone https://github.com/trolleway/avm.git
see deploy.md

instruction for dummers not implemented now, too long.

Start interactive Docker container on windows with ffmpeg

Powershell
docker run -it --entrypoint='bash' -v ${PWD}:/tmp/workdir jrottenberg/ffmpeg
ffprobe video.MP4

Merge h264 or h265 videos withouth re-encoding

./avm/merge.sh /path/to/mp4

Merge all MP4 files in directory using ffmpeg tool. There is no fool-proof checks, just call ffmpeg.

Preview video

./avm/enc-preview.sh /path/to/file.MP4

Encode video to mp4 with fastest and lowest compression. Useful for preview 4k video on PC

Encode video for twitter and instagram

./avm/enc.sh /path/to/file.MP4

Generate 1080p60 video for twitter and square video for instagram in one call. Twitter video uploading is still not handle some of videos, futurer debugging needed. May be bitrate limit?

Upload video to Wikimedia Commons

./avm/enc-wikimedia.sh /path/to/file.MP4

Backup and spare video hosting: Wikimedia Commons. It generally allow transport videos, but standart video uploader — video2commons does stuck in 2015, and 2160p60 videos cannot be uploaded due big file size. There is possible upload video with Upload Wizzard, but only in rare VP9 codec. Encoding speed on all my devices is too much low at this moment

--

--