samule-i / x265-videoconverter Goto Github PK
View Code? Open in Web Editor NEWA python3 script to track and convert media to HEVC format
License: GNU General Public License v3.0
A python3 script to track and convert media to HEVC format
License: GNU General Public License v3.0
First of all. thanks for sharing the code, awesome idea.
when i run
python3 main.py -s
the program returns
FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe -v quiet -print_format json -show_format -show_streams "/mnt/storage/movies/Madagascar 3 Europe\'s Most Wanted (2012)/Madagascar 3 Europe\'s Most Wanted (2012) Bluray-1080p.mkv"': 'ffprobe -v quiet -print_format json -show_format -show_streams "/mnt/storage/movies/Madagascar 3 Europe\'s Most Wanted (2012)/Madagascar 3 Europe\'s Most Wanted (2012) Bluray-1080p.mkv"'
when i probe the file manually with ffprobe it works, but it seems like the script has some trouble with escaping quotation marks or spaces.
I hope you can help me :)
$ mkvconvert -n 12 --crf 22
loading library
2021-10-19 10:03:42 library.logger.returnLibraryEntries +344: WARNING [1134262] reached end of database
/mnt/slacknas/TV/TV/TV SHOW/Season 5/TV SHOW - S05E02 - TV SHOW - [Bluray-720p] - [x264].mkv
Traceback (most recent call last):
File "/home/mikedawg/bin/mkvconvert", line 249, in
main()
File "/home/mikedawg/bin/mkvconvert", line 221, in main
encodeResult = encoder.encode(args)
File "/home/mikedawg/bin/library/videoEncoder.py", line 276, in encode
self.command = self._commandString()
File "/home/mikedawg/bin/library/videoEncoder.py", line 96, in _commandString
self._mapSubtitleStreams()
File "/home/mikedawg/bin/library/videoEncoder.py", line 173, in _mapSubtitleStreams
self.subtitleFile = mediaTracker.VideoInformation(subtitle)
TypeError: init() missing 1 required positional argument: 'args'
FWIW, I setup the directory structure for x265-videoconverter:
cp main.py /home/mikedawg/bin/mkvconvert
mkdir -p /home/mikedawg/bin/library
cp library/* /home/mikedawg/bin/library/
Not sure if this has to do with the problem, but I'm thinking not.
Not clear from the documentation what are the dependencies, libraries needed, etc.
Got an error during scan. Please let me know if there's anything you want me to help with.
Running Python v3.9.13 on Mac OS 12.4
2022-07-12 10:34:24 library.logger.simpleEntry +78: ERROR [58883] No video streams
Traceback (most recent call last):
File "/Users/scripts/x265-videoconverter/./main.py", line 249, in <module>
main()
File "/Users/scripts/x265-videoconverter/./main.py", line 155, in main
library.scan(fp, args)
File "/Users/scripts/x265-videoconverter/library/mediaTracker.py", line 224, in scan
self.log.info(f'{self.entry["width"]}x{self.entry["height"]} @ {self.entry["bit_rate"]}kbps -- Adding to tracked list')
TypeError: 'bool' object is not subscriptable
This error occurs when attempting to scan a corrupted video file. I'd recommend trying to catch the error and log as potential corrupted media when encountered.
Is there a way to pass parameters to ffmpeg for hardware dec/env such as: -b:v 700K -c:v hevc_nvenc
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.