a30791a0360595cb35d506acd19df864282727c0
Video Encoding App
Overview
This app takes a video file and an IMDb ID as input, generates a shell script to encode the video streams to AV1 and audio streams to Opus format, converts anamorphic video to SAR 1:1, and adds metadata from OMDB while stripping all other metadata.
Input Requirements
- Video File: A valid video file in a supported format.
- IMDb ID: A valid IMDb ID to fetch metadata from OMDB.
Optional CLI Arguments
-ns/--nosubtitles: Disables subtitle processing.-p/--preset: Sets the encoding preset for the video. Default is2.-c/--crf: Sets the CRF value for the video. Default is30.-o/--original-media-type: Sets the ORIGINAL_MEDIA_TYPE metadata. Default isDVD.
Output Details
The app generates a shell script that performs the following tasks:
- Encodes the video to AV1 format.
- Encodes the audio to Opus format.
- Converts anamorphic video to SAR 1:1.
- Adds metadata from OMDB using the provided IMDb ID.
- Strips all other metadata from the video.
Metadata Handling
- Added Metadata: Metadata fetched from OMDB using the IMDb ID.
- Stripped Metadata: All other metadata is removed from the video.
Anamorphic Video Conversion
Anamorphic videos are converted to SAR (Sample Aspect Ratio) 1:1 to ensure proper display on all devices.
Example Usage
./encode_video.sh input_video.mp4 -i tt1234567
Languages
Python
80.2%
Jinja
19.8%