1.5 KiB
VidEnc
This is a command-line application that analyzes video files using ffprobe to extract stream information (video, audio, subtitles). It then uses the OMDb API to fetch additional movie details such as title and release date, given an IMDB ID.
Workflow
-
Input: The application takes a video file path as input, along with an optional IMDB ID and a flag to disable subtitle processing.
-
FFprobe Analysis: It runs
ffprobeon the input video file to extract stream information in JSON format. -
Stream Parsing: The JSON output is parsed to identify video, audio, and subtitle streams.
-
OMDb API Lookup (Optional): If an IMDB ID is provided, the application queries the OMDb API to retrieve movie title and release date.
-
Output: Finally, it prints a command string based on the extracted information. This command string is likely intended for further video processing or encoding.
- Every audio stream that is side loaded, must be converted to 5.1 channel layout with
channelmap=channel_layout=5.1
Usage
python src/app.py <video_file> [-i <imdb_id>] [-ns]
<video_file>: Path to the video file.-i <imdb_id>: (Optional) IMDB ID of the movie.-ns: (Optional) Flag to disable subtitle processing.
Example
python src/app.py my_movie.mp4 -i tt1234567
This would analyze my_movie.mp4, fetch details from OMDb using IMDB ID tt1234567, and print a command string.
Unit Tests
There are no unit tests included in this project.