Plex Media Scanner via Command Line - no output

Server Version#: Version 1.19.1.2645

Hello,
I’m using Plex Media Server on the latest update of Windows 10.
When I try to scan via the command line I never have an output even if I specify verbose+progress flags.
This is a sample of the command that I use:
“Plex Media Scanner.exe” -v -p -s -r -c 1 -d X:\

Did you ever get this figured out? I’ve found the same thing … I’ve tried all different combinations of -p -v --progress and --verbose. No output, no matter what.

command that i use…

Plex Media Scanner.exe --verbose --scan --refresh --section %section% --directory %*

section is the library section number

directory is the file path of the file you want to scan…

@nydave69 that’s similar to what I use (except I use the abbreviations). When you do this, does it give you any kind of feedback in the terminal as it is running through the command? When I do it, I get nothing at all. The prompt just reappears after the job is complete.

@Departed69 exactly what’s still happening with me with latest version (1.19.4.2935).
I don’t know if it’s something expected or not.

It doesn’t return any results in the command window…
You will see it as it adds the selection to Plex and the metadata.

I have it setup so I can right click on a file and it spawns the process to update it.

Ok so you’re saying it doesn’t return anything in the command window … if so what’s the point of using the --progress or --verbose flags? Are you only seeing the results when the new items appear in the Plex app?

Yes

I think those are used with the error logging when Plex creates the process as part of the handshake between the two.

I use the command line to add a new or updated video since it takes so long for my files to get scanned.

Ok, I understand. It seem to me that the --progress and --verbose flags should be returning something in the command window. It’s a shame it doesn’t do that.

I’m using it the same way … recently my users have been complaining about being kicked off, or disconnected or receiving errors, and I figured through trial and error that this is happening when a scan is happening. So instead of doing a full scan via the GUI, I decided to start using this CLI command so I could control which directories are being scanned.

Yep, i don’t understand what’s the purpose of verbose and progress if they’re working only on logs.
According to Plex documentation, these are the commands and their explanations:

  -v, --verbose        Show more output.
  -p, --progress       Show special progress output

What’s “more output”? And where? And what is the “special progress output”?
Maybe someone from Plex team could help us?

What would you like it to return?

The progress of the scan, as the docs state.

Since it’s a spawned process normally I would guess it returns null or zero if it completes successfully, that’s why the command windows closes, or an error code it it doesn’t…

Once the new scanner is completed, I’m not sure this process will still even work.

I certainly hope they do retain command line support, as I’ve only just recently started using it to force a deep scan on newly added content.

Not sure what that means…

I use it to scan content when I change something and I need that one file scanned.
The new scanner is so much faster I’ll just wait for it to rescan once it is released.

No need to use the command line.

Oh
I just got an output from the scanner…

sqlite3: database locked waiting 200ms for database to become available.

so it does output and in --verbose no less

Sorry, it’s actually termed as “Deep Analysis”.

When you add content, the standard Scans and Analysis methods will simply add the content to the library, however bitrate and bandwidth estimates are usually wrong, applying a 2.5x headroom.

Once Deep Analysis occurs on the item, a more accurate account of the bitrate and bandwidth requirements are established. Pretty important for shared content.

Hope that explains it :smiley:

Video analysis isn’t done by the scanner…

I think it is. It goes like this…

I add a movie that has 6.5 Mbps x265 video track and a 4.5 Mbps TrueHD audio track. In theory this should amount to “roughly” 10 - 12 Mbps of bandwidth required.

I play the movie in PMP and check the status in Tautulli, or the Dashboard, and it using around 25 + Mbps.

I stop playing the movie and run this command…

“C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --analyze-deeply --item 52752 --log-file-suffix " Manual Deep Analysis"

And now when I play the movie, it states the correct bandwidth requirement of 11 - 12 Mbps.

It seems like it should show some sort of feedback regarding what the scanner is doing. At the very least, a running tab of what directory or file it is currently scanning. Especially with the --verbose tag. Maybe the --progress tag could show errors only, but I would expect --verbose to show a running tab…

1 Like