No description
- Python 100%
| README.md | ||
| transcode_ts.py | ||
How to Use
Save this script as transcode_ts.py
Run it from the command line with:
1
python transcode_ts.py [directory_to_scan]
Optional Arguments
-o or --output-dir: Specify where to put output MP4 files
-r or --recursive: Search for .ts files in subdirectories as well
-f or --force: Overwrite existing MP4 files
-v or --verbose: Show detailed processing information
(The tqdm progress bar is optional but requires installing the tqdm package: pip install tqdm)
Customization Options
You can modify these FFmpeg parameters to suit your needs:
Change -crf 23 to adjust video quality (lower=better quality, higher=faster/smaller)
Change -preset medium to fast for quicker encoding or slow for smaller files
Adjust audio bitrate with -b:a (e.g., -b:a 128k for lower quality)
Batch Processing
The script will process all found .ts files in sequence. If you're processing many files, it might take a long time depending on your hardware.
Would you like me to modify any part of this script to better suit your needs?