5.7 KiB
Development Plan: Video Converter
This document outlines the development plan for the Video Converter project, aiming to create a standalone Python tool for converting video files into DaVinci Resolve compatible formats.
Overall Goal
Develop a user-friendly, standalone Python tool to convert video files into formats compatible with Davinci Resolve (Free edition on Linux) to improve editing workflows for content creators.
Completed Features
- Core Conversion Logic: Implemented video conversion using
ffmpegwithdnxhdcodec andpcm_s16leaudio, outputting to.movcontainer. - Quality Profile Picker: Added
--qualityargument (low, medium, high, archive) to controldnxhdprofiles. - Filename Fail-safe: Implemented logic to append
_1,_2, etc., to output filenames if a file with the same name already exists. yt-dlpIntegration: Added--urlargument to download videos from YouTube (and other supported sites) usingyt-dlpbefore conversion.- PyInstaller Bundling: Successfully bundled the application into a standalone executable for Linux.
- Robust Download Path Handling: Ensured
yt-dlpdownloads directly to the user-specified output directory (or current working directory if not specified), resolvingos.path.exists()issues within the PyInstaller environment. - Basic Error Handling & Logging: Suppressed verbose
yt-dlpoutput and redirectedffmpegoutput toffmpeg_output.logfor detailed error inspection.
Current Priorities (Next Steps)
- Implement GUI: Develop a graphical user interface for easier interaction, including file selection, quality profile choice, and URL input. (High Priority)
- Implement Browser Cookies for YouTube Authorization: Revisit and implement
--cookies-from-browserfunctionality foryt-dlpto handle age-restricted or private YouTube videos. (Deferred, now higher priority) - Refine Error Handling/Logging: Implement more user-friendly error messages, potentially displaying the last few lines of the log file directly in the console upon failure, and providing clear instructions to check the full log.
Future Considerations
- Twitch Integration Strategy:
- URL Support: Extend the URL handling to explicitly support Twitch video, single clip, and clip collection URLs.
- Single Video/Clip Downloads: Leverage
yt-dlp's existing capabilities to download single Twitch videos and clips. This should work with the current implementation. - Clip Collection Downloads (Batch Processing): For Twitch clip collection URLs,
yt-dlpwill download all clips in the collection. This will require implementing batch processing capabilities (which is already a future consideration) to handle multiple downloaded files. The application will need to iterate through each downloaded clip and convert it individually.
- Batch Processing: Allow conversion of multiple files or URLs in a single run.
- Configuration File: Implement a configuration file (e.g., YAML, JSON) for persistent settings.
- Progress Bar: Integrate a progress bar for both download and conversion processes.
- Cross-Platform Compatibility: Explore bundling for Windows and macOS. (Lowest priority)
- Advanced
ffmpegOptions: Expose moreffmpegoptions (e.g., bitrate, resolution scaling) for advanced users. - Metadata Preservation: Option to preserve or transfer metadata from the original file.
Known Issues / Limitations
- DaVinci Resolve Free on Linux has limitations with certain audio codecs (e.g., AAC) and 4K output/encoding (requires Studio version).
ffmpeg-fullAUR package is required fordnxhdsupport on Arch-based systems.
Large scale implementations
Since one of the limitations of this project is the requirement of ffmpeg-full for encoding videos for Davinci Resolve use we should investigate the proposition of implementing the necessary ffmpeg-full into the project release file. I do not know, currently if this is viable or even possible. But I think that a fully precompiled program with built in encoders and tools would be more attractive to most users. We should also see if there are other tools that would be considered natural for this project.
Assessment Report: Bundling FFmpeg and Other Tools
1. Bundling ffmpeg-full:
- Viability: Technically viable and possible. PyInstaller (and similar tools) can include external binaries like
ffmpegin the final executable. The Python script would then call this bundled binary. - User Attractiveness: Highly attractive. A self-contained executable eliminates the need for users to manually install
ffmpeg, especially specific versions likeffmpeg-fullwith custom codecs, significantly improving user experience and simplifying setup. - Challenges:
* Cross-Platform Complexity: Requires separate
ffmpegbinaries for each target OS (Linux, Windows, macOS), increasing build complexity. * Licensing: Must comply withffmpeg's LGPLv2.1/GPLv2 licensing terms (e.g., providing source code). * Maintenance: Keeping bundledffmpegupdated for security and features requires re-bundling. * Executable Size: Bundlingffmpegwill increase the overall size of the application executable.
2. Other Natural Tools for Consideration:
ffprobe: (Already implicitly used) Part of theffmpegsuite, essential for media analysis (e.g., video duration). Would be bundled alongsideffmpeg.mediainfo: A powerful command-line tool for detailed media file information. Could be integrated for advanced diagnostics or user-facing metadata display.exiftool: For comprehensive metadata handling. Relevant if "Metadata Preservation" becomes a core feature.