Video Formatting and Embedding

I’m standardizing my videos to keep them as small as possible while maintaining good quality. The goal is to make them easy to download or stream, without compromising readability or viewing experience. I may also include subtitles to make the content easier to understand and follow. As of now I want them to be at least 1080p. At some point I might do 2K videos, only for some videos.

  • 720p (HD) is a video with resolution of 1280 pixels horizontally by 720 pixels vertically (1280×720)
  • 1080p (Full HD or FHD) is a video with resolution of 1920 pixels horizontally by 1080 pixels vertically (1920×1080)
  • 2K (DCI 2K) is a video with resolution of 2048 pixels horizontal and 1080 vertical (2048×1080).

Standard Parameters

Container format : WebM

Video

  • Codec: AV1
  • FPS: 24 or max 30
  • Bitrate: Yet to experiment

Audio

  • Opus 64–96 kbps

Mobile Screencasts

Compress the video

time ffmpeg -i osmand_route_using_gpx.mp4 \
-vf "fps=24" \
-c:v libsvtav1 \
-crf 38 -preset 10 \
-c:a libopus \
osmand_route_using_gpx.webm

Video with 800 pixel height

time ffmpeg -i osmand_route_using_gpx.mp4 \
-vf "fps=24,scale=-2:800" \
-c:v libsvtav1 \
-crf 38 -preset 10 \
-c:a libopus \
osmand_route_using_gpx.webm

Re-scale to 1080p with padding

# Rescale to 1080p landscape with blurred backhround
ffmpeg -i osmand_route_using_gpx.mp4 -filter_complex \
"[0:v]fps=24,scale=1920:1080:force_original_aspect_ratio=increase,\
crop=1920:1080,boxblur=30:5[bg]; \
 [0:v]fps=24,scale=1920:1080:force_original_aspect_ratio=decrease[fg]; \
 [bg][fg]overlay=(W-w)/2:(H-h)/2" \
-c:v libsvtav1 -crf 38 -preset 10 \
-pix_fmt yuv420p \
-c:a libopus -b:a 96k \
OsmAnd_route_using_gpx_1080p_24fps.webm

# Rescale with a specific color background
# I have used color=0x82b965

ffmpeg -i OsmAnd_route_using_gpx.mp4 -filter_complex \
"[0:v]fps=24,scale=1920:1080:force_original_aspect_ratio=decrease[fg]; \
 [fg]pad=1920:1080:(ow-iw)/2:(oh-ih)/2:color=0x82b965,format=yuv420p[v]" \
-map "[v]" -map 0:a? \
-c:v libsvtav1 -crf 38 -preset 12 \
-c:a libopus -b:a 96k \
OsmAnd_route_using_gpx_1080p_24fps_bgcolor_1.webm

Desktop Screencasts

TBD

Travel Videos

TBD

Examples

Mobile Screencast 800px height

Embedded here with width = 800px. Under 10MB for 2 Min video.

Mobile Screencast 720p

Embedded here with width = 100%. Try full screen for better idea. Under 10MB for 2 Min video.

Mobile Screencast 1080p

Embedded here with width = 100%. Try full screen for better idea. Under 15MB for 2 Min video.

Other Test Videos

These are test videos. The ones that interests me are the 10 seconds videos of 1MB and 2MB file size. They are FHD.

10 Seconds – 1 MB – FHD

Embedded here with width = 100%. Try full screen for better idea.

10 Seconds – 2MB – FHD

Embedded here with width = 100%. Try full screen for better idea.