Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get list of all files that are not DTS

Featured Replies

I have a mixture of DVD movies and Blu-Ray movies on my server, I think I have most of them sorted but to save from checking every movie does anyone have a script they use to list all media files in a directory with the file name, extension and video/audio codecs?

 

I initially searched for anything that wasn't mkv and went through those, but I've ran across a few MKV's that I ripped a long time ago (when I only had ONE storage drive!) that in order to save space I ripped with lower quality audio losing 5.1 to stereo.

You can do what you want with FileBot.

 

filebot -mediainfo path/to/files --format "{fn} {resolution} {vc} {ac}"

 

I put together a little PowerShell script that queries a share for all the movies, then runs FileBot against each one, and then exports it all out to a CSV.  Im sure there are easier ways to do this, but I'm very familiar with PowerShell.

 

$Now = Get-Date -Format yyyy-MM-dd
$MovieShare = "\\nas\BluRay"
$CSV = "$MovieShare\Movies.$Now.csv"
$Movies = @(Get-ChildItem $MovieShare -Directory | Sort-Object)
$MovieInfo = @()

foreach ($movie in $Movies)
{
Write-Host "Fetching"$movie.fullname"..." -ForegroundColor Magenta
#Finds the largest file
$file = $null
$file = Get-ChildItem $movie.fullname -file | sort length | select -last 1

$FilePath = $file.fullname
$filebot = "C:\Progra~1\FileBot\filebot.exe -mediainfo `"$FilePath`" --format `"{source},{resolution},{vc},{ac}`""

$Return = Invoke-Expression $filebot
$Source = ($Return.split(","))[0]
$Resolution = ($Return.split(","))[1]
$VC = ($Return.split(","))[2]
$AC = ($Return.split(","))[3]
$file | Add-Member -MemberType NoteProperty -Name Source -Value $Source
$file | Add-Member -MemberType NoteProperty -Name Resolution -Value $Resolution
$file | Add-Member -MemberType NoteProperty -Name VC -Value $VC
$file | Add-Member -MemberType NoteProperty -Name AC -Value $AC

$MovieInfo += $file
}

$MovieInfo | select Name,Directory,Source,Resolution,VC,AC | Sort-Object | Export-Csv $CSV -NoTypeInformation

 

muOOcSn.png

  • Author

Thanks, looks like thats exactly what I need!

  • Author

Getting an error that the parameter -Directory cannot be found?

 

Ok, changed that to recurse which seemed to work. Now getting the attached errors.

error.PNG.933e602d03e611665448f5836116b401.PNG

I didnt even think about this... what version of PowerShell are you running?  The '-Directory' parameter is only in PS 3.0+.  I'm running 4.0.

  • Author

Not sure, lol. I'll check tonight when I get home. I did end up getting it to run but it ran for hours and it never finished fetching the files, I think I got it stuck in an endless loop.

 

 

Edit: just dialed in and checked. I'm on 2.0, I'll update and try again tonight.

Try changing:

 

$Movies = @(Get-ChildItem $MovieShare -Directory | Sort-Object)

to:

$Movies = @(Get-ChildItem $MovieShare | ? { $_.PSIsContainer } | Sort-Object)

 

and

 

$file = Get-ChildItem $movie.fullname -file | sort length | select -last 1

to:

$file = Get-ChildItem $movie.fullname | ? { !$_.PSIsContainer } | sort length | select -last 1

 

 

  • Author

Updating to PS 4.0 now, if that doesn't work I'll make the changes and see where that leaves me.

 

Thanks for the help, I've got zero powershell experience so your saving me a lot of googling, lol. I know I could script something on the linux side but I don't want to mess with installing the needed packages to get that info. Mainly all of the dependencies for ffmpeg!

  • Author

Worked great! Thanks a lot!

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.