Solved Python: Video File Length
#1
Hi,

I'm hoping some-one can assist or comment.

I would like to be able to get information from a video file (Like the duration of the video file) from a python script add-on.

These video files have not been read into any scraper (So are not in the database), but I would like to be able to retrieve the duration of the video file.

Is there any way to do this in a Python script that anyone knows of?

Thanks

Rob
Reply
#2
(2013-11-05, 09:55)rob_webset Wrote: Hi,

I'm hoping some-one can assist or comment.

I would like to be able to get information from a video file (Like the duration of the video file) from a python script add-on.

These video files have not been read into any scraper (So are not in the database), but I would like to be able to retrieve the duration of the video file.

Is there any way to do this in a Python script that anyone knows of?

Thanks

Rob

Take a look at the parser in my git

https://github.com/Lunatixz/script.pseud...ib/parsers
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#3
Hi Lunatixz,

Thanks for the information, looks very interesting!!!

Would you be interested/willing in creating a "module" for it and posting the Video info parsing code to the official addon repository?

http://wiki.xbmc.org/index.php?title=Cat...es/modules

That way I wouldn't need to take a copy of the code and can just make use of the excellent work you have already made available!

Thanks

Rob
Reply
#4
(2014-01-19, 20:34)rob_webset Wrote: Hi Lunatixz,

Thanks for the information, looks very interesting!!!

Would you be interested/willing in creating a "module" for it and posting the Video info parsing code to the official addon repository?

http://wiki.xbmc.org/index.php?title=Cat...es/modules

That way I wouldn't need to take a copy of the code and can just make use of the excellent work you have already made available!

Thanks

Rob

Do you think there is a demand for it? I think most Devs get video file info from xbmc's library.
I know in your case its different, since you are working with non scraped media (Extras and such). If you need any help just PM me...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#5
(2014-01-20, 02:59)Lunatixz Wrote: Do you think there is a demand for it?

Well, me at the very least Wink Thought that it just may be the best way to avoid duplication and me just stealing a copy of your code Confused

I could then imagine more and more enhancements being added to it in order to supply other Video Information. Ideally I'd like something that could get loads of video info (Screen shots, quality etc) - although I guess the current code is limited to what it can read out of the file header? However, at the moment I'll take anything I can get my hands on - so your code is great!

I'd be happy to split it out to a new module if you'd like (but don't want to just steal the code that I know very little about!)

Thoughts? - I'll follow your lead on this one.

(2014-01-20, 02:59)Lunatixz Wrote: If you need any help just PM me...

Thanks for the support - will hopefully get to this soon.

Rob
Reply
#6
Thanks again for your help with this.

I have now copied it over an made use of the code you pointed me at.

http://forum.xbmc.org/showthread.php?tid...pid1607318

Thanks

Rob
Reply

Logout Mark Read Team Forum Stats Members Help
Python: Video File Length0