-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update #2 to julia v1 #3
Conversation
Thanks! |
I'm trying to add some key word arguments so that we'd be able to control things like start time, duration, frame rate, and dimensions (width x height). These are controlled with the ffmpeg flags: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command line flags are missing. You should pass "-r $r" etc. Also, -r will have no effect when opening a video for reading, and it is already present when writing. As for the dimensions, those will be given by the first image written and do not have to be passed explicitly.
Yea, I caught that shortly after pushing... |
I see. Maybe it would make sense to have |
Hmf.. Having a hard time with interpolating pairs from NamedTuples into a command without it turning into strings: nt = (ss = 1, t = 2, r = 25, s = "100x200")
opt = [`-$k $v ` for (k,v) in pairs(nt)]
cmd = `ffmpeg -i file.mp4 $opt` results in Any suggestions for this pretty basic hurdle...? |
How about:
|
OK, this package kind of works for me now. Any plans on merging this, or should I add some more stuff (like the equivalent settings to the writing function)? |
I'm a bit short on time right now, but I'll try to merge this next week. I'd still like to have the ffmpeg flags as two separate arguments ( |
I'll look into it more carefully, but I think that's how it is now (you might have missed my last push). In any case, I thought that |
"w" and "r" control whether the Julia process is reading or writing. The ffmpeg process is always doing both. (Either reading from file and writing to Julia, or reading from julia and writing to file.) What I'm saying is the |
Now I get you. Sorry, my bad. I mixed the IO of the julia Cmd with ffmpeg's in video and out video. Cool. I might have time in the next couple of days. Thanks for the explanation! |
@perrutquist, You already have a few key word arguments pre-defined in your
? |
Sorry for being so dense here, but do you mean that if a user wants to specify some input option on top of say specifying the output rate, they'll be able to do that with: openvideo(filename, :r, r = 24, input_options = (ss = 1,)) ? |
I think we could get rid of the "r" and similar keyword arguments, and make input/output options positional arguments, so one would write:
Maybe there needs to be a third category for arguments that don't apply to either stream, like Maybe we later we add an interface with kwargs that get automatically sorted into those two named tuples if they en ind
|
Great idea. I'll try that out tomorrow. |
OK, so I found out that the easiest thing is to just build in this |
Also, side comment, don't you want to add ffmpeg as a build or a requirement? Either through the CI (I think I know how to do that) or bindeps, (I don't know how to do that...)? |
Yes, it would definitely be good to include ffmpeg. I have no idea how to do this, which is the main reason why this is not yet a registered package. (I wrote this once because I needed to make a movie out of a series of plots, and after I was done with that I didn't have the time to make a proper package.) |
I've now added all the
I don't think that would work. I think
Finally, I don't think there is anything your package does that (a functioning) So to sum it up, if the badges go green then the only thing left to do is to tell the user that a prerequisite for this package is |
Ok, I'm done I think. It currently errors on windows (the part with reading off a file and writing that into a second one), not sure why. I also tagged a release on my fork. |
Merged. Thanks! |
Sure, I'll re-read up on publishing in v1.. Thanks! |
done! |
added some required packages for the tests, tests now pass in julia 1.