CasparCG / media-scanner

A service used with CasparCG Server software for scanning media located on the server. Queried with query and thumbnail commands through CasparCG Server using AMCP.
https://casparcg.com
GNU Lesser General Public License v3.0
31 stars 33 forks source link

desktop.ini files get detected as audio-files #83

Open z1glr opened 3 months ago

z1glr commented 3 months ago

I've got my media-files in Google Drive and synced with its client which creates desktop.ini files in each directory.

CasparCG detects those as audio-files:

"VIDEOS/DESKTOP" AUDIO 244 20240416144820 41 1/1000

This happens both with the media-scanner included with casparcg_v2.3.3_LTS and the current v1.3.4 version.

amwtech commented 1 month ago

Both CasparCG scanner and CasparCG server assume that all files in the media folder and sub-folders are media files. Scanner uses ffprobe to evaluate the file. There are three recognised media types - MOVIE, STILL, AUDIO based on the data returned by ffprobe (see src/ffmpeg.ts), and the file type defaults to AUDIO if no movie or still attribution is matched.

This media type allocation was implemented in the earliest versions of CasparCG and has remained consistent with subsequent releases. The method of testing the file content ensures that files named media01.mov and media02 can both be allocated to the correct type group and loaded into a channel using the correct producer.