Media codec Info on Kodi Database (Movies)
#1
Media codec Information, resolution...

Is it too complicated to include de codec information/width x height of a media file in the Kodi Database?

I wanted an easy way to find all the x265 media files for example... Library consists of local, sftp, onedrive, etc locations....


Thanks!
Reply
#2
oops...

3.21 streamdetails
This table contains information regarding codecs used, aspect ratios etc
https://kodi.wiki/view/Databases/MyVideos
Reply
#3
(2020-08-18, 18:30)pcasalinho Wrote: 3.21 streamdetails

AFAIK, this table is only filled when the video is first played. It's not done when the video is scraped.
Reply
#4
(2020-08-18, 18:50)Klojum Wrote: AFAIK, this table is only filled when the video is first played. It's not done when the video is scraped.
Nope. The exact opposite. The table is filled when the file is first scanned/scraped. Never on first play.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
(2020-08-18, 18:18)pcasalinho Wrote: I wanted an easy way to find all the x265 media files for example... Library consists of local, sftp, onedrive, etc locations....
Use a smart playlist and use "Video Codec" rule. But your video codec needs to match what is in the database. Kodi does not use x265, you will need to enter hevc.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#6
(2020-08-18, 22:15)Karellen Wrote: Nope. The exact opposite. The table is filled when the file is first scanned/scraped. Never on first play.

Well, I fiddle with my own PHP scripts as far as the Kodi database goes.
Stream details of a video are only available when the video is being displayed in the movie or tv episode listings, or displayed in one of the Recently Added lists. Scraping alone is not enough.
Playing a video might update the media codec details.
Reply
#7
(2020-08-19, 00:58)Klojum Wrote: Stream details of a video are only available when the video is being displayed in the movie or tv episode listings, or displayed in one of the Recently Added lists. Scraping alone is not enough.
Came here looking to see if there was a way to force this for all files, as I've noticed the same.

Codec and resolution (for TV shows, at least) only populate when I view the episodes via the "Season #" tab or (to scan an entire series at once) the "All Seasons" tab —  not only can I see it populating, I can here Kodi reading from my NAS while it scans the files.

I've got 361 series newly scraped to go through.  Any way to automate this process?  Or do I need to open all 361 series and view the "All Seasons" tab of each (noting shows with only one season will require one fewer step). 

Might this scan also happen when I export the library to local .nfos?  Just tested, and answer is "nope".
I didn't think to test before I scraped some 12,000 or so episodes. It took a while, so I'm hoping an answer here might save me some time.  Big Grin

To be clear, I'm looking to add the data from the <fileinfo> tag — which only seems to be populated if I view each series individually.  It's omitted from saved .nfo files if I leave out that step.

    <fileinfo>
        <streamdetails>
            <video>
                <codec>hevc</codec>
                <aspect>2.388060</aspect>
                <width>3840</width>
                <height>1608</height>
                <durationinseconds>3554</durationinseconds>
                <stereomode></stereomode>
            </video>
            <audio>
                <codec>eac3</codec>
                <language>eng</language>
                <channels>6</channels>
            </audio>
            <subtitle>
                <language>eng</language>
            </subtitle>
            <subtitle>
                <language>eng</language>
            </subtitle>
        </streamdetails>
    </fileinfo>
Reply
#8
@flskydiver Did you find a way to force getting streamdetails for all files?
Reply
#9
Yes!!

Remembering which element was key is another matter.... :-||

It might have been simply updating the Scraper I used as the author of the "TMDb TV Show scraper (Python)" updated the scraper to accommodate another request I had regarding the write-out of cast members in the .nfo files... which was super awesome. or it might have been fixed for me simply by updating from Matrix to Nexus (specifically, I'm using Kodi 20.0 Alpha 2).

I have the setting "Settings/Media/Videos/Extract video information from files" toggle checked.
Reply

Logout Mark Read Team Forum Stats Members Help
Media codec Info on Kodi Database (Movies)0