-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shell script version? #1
Comments
Yep, that'd be a good thing to have. I probably should've started with something more cross-platform (python?), but I plan to port it at some point once it's more or less finalized to avoid maintaining two versions. :) |
As a potential solution is it possible to generate command sequences instead of actually running ffmpeg? I think in that case we can run this script using dosbox/wine and get output sequence to execute natively? |
I tried this approach, but ffmpeg discards every command. Script generates this
If I run it I have:
If I replcae it with -y -f I have:
Do you think it's ffmpeg have different argument parsing on Windows/Linux or what? --
|
FFmpeg's argument parsing should be the same as far as I know. In that example, it looks like your commandline generation is stripping out leading tabs (which normally occur after a newline escaped by a caret), so the "-y" and "-f" stick together, and the same goes for the ":flags=lanczos" and the next line's "-filter_complex". |
+1 for this issue. |
@viler-int10h I was poking around, and a Python translation of this script appears to exist already, in this fork, specifically this file. I am not sure if it's complete, although it looks like it is. Maybe @vegardsjo (the author) could chime in. |
On first test the script has some issues, for example not handling file paths with spaces. I am interested in improving this script. Not sure what the best way to do that would be, with PRs to the forked repo, or a PR to this repo, etc. |
I would create the PRs against the fork. |
Hi @makeworld-the-better-one, I actually forgot that I ported this to python 😅. It is mostly complete, the only thing that is missing is cropping. I couldn't figure out what the output of the cropdetect command should be, so I couldn't know how to parse it ... I've also not done extensive testing, so I don't know if it would produce exactly the same results as the batch script (I don't know batch; the script was translated by guesswork). I tend to avoid filenames/paths with spaces so I didn't encounter this problem, however I think it would be easy to fix. Feel free to make PRs to my fork, and, if @viler-int10h wishes, I can make a PR to this repo. |
@vegardsjo Hey, thanks for getting back to me! I'll look into getting the cropping working if I can. Test results would be nice as well. I've noticed there are test cases in this repo, maybe those can be used. I probably should've tested before making my significant alterations, but the good news is that my improvements make the whole process 60% faster! I'm working on improving things further, and will make a PR once that is done. The end goal of this PR is to only end up with a single ffmpeg command at the end, which would be very handy. |
That sounds great! While you're at it, I think it would be useful to do the ffmpeg command creation as a list of strings. You can always |
@viler-int10h & @makeworld-the-better-one, I have fixed the |
Ooof really wish I'd read this thread sooner, I just spent the last 4 hours porting to Bash script. I'll check it works and but, I think I'll just switch to vegardsjo's fork. |
|
So it occurred to me, if I want to see better progress report I can use I'll keep going with the bash script version, as it can use I think I'll be able to finish it tomorrow. I'll post again when I get some test results. |
+1 for the issue. Hows the development going on? |
Do you have by any chance planned to make the batch file available also as a shell script for use on Linux or MacOS?
I'd try converting it myself, but to be honest: I don't understand half of the advanced CMD.EXE magic you're using... 😁
The text was updated successfully, but these errors were encountered: