-
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
get fps, dimensions etc. for vidfile from ffprobe #96
Comments
I'm happy to leave these for now as we don't need them but if you feel like doing your ffprobe magic @Leon-Focker then go ahead. |
Sure, but in what way? We would probably want to avoid a second ffprobe call after get-sound-info... Should get-sound-info also spit out video info (i.e. make it all one function) or should we do a get-video-info function? In case of the latter we might want another update-:around method, right? |
PS: before I get to the ffprobe scripts... what else do you want to know, except fps and dimensions? |
See the vidfile slots + anything else you can extract that's relevant |
Definitely. Can you get it all in one call? I did a lot of work to avoid unnecessary calls to get-sound-info over the weekend and saw a massive increase in computation speed---don't want to ruin that. BTW are you happy with the in that fun with referring to fixed positions? What if the output changes? Wouldn't assoc be better, if you're going to avoid reg-exps (which will probably be robuster and enable fault detection)
That would be the best approach I think. If it's not a vid file then fps etc. will simply be missing from the ffprobe results
Not sure that's necessary yet |
Should be possible, I will try. I agree, that fixed positions aren't the best option. But I don't know how else to do it, since at the moment the returned string is just the relevant numbers without the information of what they are. Maybe that can be changed... |
I think the only alternative would be to use regex - since I'm not sure how else we would discern between entries in a string. |
Whatever you think is best. I was just thinking that the order in which things are returned might change at some point but that may simply not be the case or it might be easy to react to it if that does occur. SPEED is of the essence. |
Okay, so changing "default=noprint_wrappers=1:nokey=1" to "default=noprint_wrappers=1:nokey=0" returns all entries with their name like this:
As you can see, we get multiple r_frame_rate entries because when we want audio and video stream data, we have to read ALL streams. You can only choose to read from one stream or all... So packing audio and video in one function means we can already no longer go by order... Since I wouldn't know how else to parse a list like that, I went with the regex route again. I see no change in speed! I modified get-sound-info (see ebbd7d0) and added the parse-ffprobe-string function. However I haven't updated any other methods yet. NB: You can get all entries with this command:
That way you can also determine their names... |
Thanks Leon. Would you feel in a position to pack those into the vid file slots? |
Sure. My approach would be to check if (equal (type-of sf) 'vidfile) in sndfile/update. Or is there a more elegant way? |
take a look at vidfile.lsp |
Ah, vidfile-p of course :P |
Maybe I should just take over. |
Sure, obviously I'm missing something... |
OK. It might take me some time as I really have to do other things now. But it's not at all urgent anyway. |
No description provided.
The text was updated successfully, but these errors were encountered: