mkb79
mkb79
> Ok it seems to be related to the post I linked above, > > ```python > subprocess.call(['ffmpeg', '-v', 'quiet', '-stats', '-activation_bytes', '*******', '-i', "'/audiobooks/...(....aax'", '-c', 'copy', "'/audiobooks/...(....m4b'"]) > ```...
> Quick update, your new code works! Good to hear that. The dark side is the reduced security due to the missing `quote` command. But I can life with that....
> Right, is this an inherent problem with the quote command, or do you see a way of handling this? Since Python 3.8 the `subprocess` module accept `pathlib.Path` objects. If...
For security purposes you should use `shell=True` only if you really (and absolutely really) need these. Otherwise there are another possibility of code injection. Edit: You can [here](https://medium.com/@acharya.vikash/avoid-using-shell-true-in-python-subprocess-module-e95fed487f19#:~:text=We%20should%20avoid%20using%20'shell,to%20avoid%20shell%20injection%20vulnerabilities.&text=In%20this%20call%20you%20have,command%20which%20can%20affect%20system) read about...
> And I guess you might not want to force people to use Python >= 3.8, but an obvious counter argument here might be that Python 3.7 recently reached end...
> No idea whether this is done securely though? I‘m think we can go with that security risks. If you don’t use these script with other files from external sources...
> Yeah this is just a part of a script for a crontab I'm running, so it should be pretty safe. Yeah, this should be absolutely safe. > Thank you...
Note: I’ve found [this](https://forum.videohelp.com/threads/403057-Split-M4B-audiobook-to-chapters-without-conversion#post2634997) user comment about splitting a M4B file into chapters using mkvmerge. Maybe this can be an enhancement to the decrypt command in the future?! Note2: I...
@vwkd The code looks good. To be honest, I didn't test it. Can you make sure that ffmpeg can cut the files correctly?
@vwkd To be true, I doesn’t have tested it. But I will do it this week. I was also thinking about either build in the commando or bringing it to...