All files flagged as invalid

Any questions? Need some help?
Post Reply
rassawyer
Posts: 7
Joined: 31 May 2025, 21:17

All files flagged as invalid

Post by rassawyer »

I've been using Filebot on Arch linux for nearly a decade, and it has pretty much always just worked. Unfortunately, that seems to no longer be the case. I have a script that I use to call fn:amc, as pasted here:

Code: Select all

#!/bin/sh -xu

# If run by qbtuser or systemd service, $HOME may not be yours — better to use explicit paths

filebot -script fn:amc \
  --output "/home/rassawyer/Media/Plex" \
  --action duplicate \
  --format "{plex}" \
  --conflict auto \
  -non-strict "/home/qbtuser/Downloads" \
  --log-file "/home/rassawyer/Media/amc.log" \
  --def skipExtract=y \
        subtitles=en \
        clean=y \
        unsorted=y \
        music=y \
        artwork=y \
        excludeList="/home/rassawyer/Media/amc.txt"
Sadly, when I run this now, it says either "ignore extra" or "invalid media file"

Code: Select all

filebot -script fn:amc --output /home/rassawyer/Media/Plex --action duplicate --format '{plex}' --conflict auto -non-strict /home/qbtuser/Downloads --log-file /home/rassawyer/Media/amc.log --def skipExtract=y subtitles=en clean=y unsorted=y music=y artwork=y excludeList=/home/rassawyer/Media/amc.txt
Run script [fn:amc] at [Sat May 31 17:36:24 EDT 2025]
Parameter: skipExtract = y
Parameter: subtitles = en
Parameter: clean = y
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: excludeList = /home/rassawyer/Media/amc.txt
Argument[0]: /home/qbtuser/Downloads
Use excludes: /home/rassawyer/Media/amc.txt (0)
Ignore extra: /home/qbtuser/Downloads/Focus.2015.EXTRAS.1080p.BluRay.H264-RMXTRAS
Ignore extra: /home/qbtuser/Downloads/In.Time.2011.EXTRAS.1080p.BluRay.H264-RMXTRAS
Ignore extra: /home/qbtuser/Downloads/Iron.Man.2.2010.EXTRAS.1080p.BluRay.H264-RMXTRAS
Ignore extra: /home/qbtuser/Downloads/Jack.Reacher.2012.EXTRAS.1080p.BluRay.H264-RMXTRAS
Ignore extra: /home/qbtuser/Downloads/Sherlock.Holmes.2009.EXTRAS.1080p.BluRay.VC1-RMXTRAS
Ignore extra: /home/qbtuser/Downloads/Spectre.2015.EXTRAS.1080p.BluRay.H264-RMXTRAS
Ignore extra: /home/qbtuser/Downloads/Spider-Man.3.2007.EXTRAS.1080p.BluRay.H264-RMXTRAS
Ignore extra: /home/qbtuser/Downloads/Ted.2012.EXTRAS.1080p.BluRay.H264-RMXTRAS
Invalid media file: [Alvin.And.The.Chipmunks.The.Road.Chip.2015.REPACK.1080p.BluRay.H264.AAC-RARBG.mp4 | 1884327242]
Invalid media file: [Doogie.Kamealoha.M.D.S01E03.1080p.WEBRip.x265[eztv.re].mp4 | 459710474]
Ignore extra: /home/qbtuser/Downloads/Ferrari-Race.to.Immortality.2017.Bluray.1080p.DTS-HD.x264-Grym/Ferrari-Race.to.Immortality.Extras-Grym
Invalid media file: [FUBAR.S01E01.1080p.WEB.H264-CAKES.mkv | 2304323285]
Invalid media file: [FUBAR.S01E02.1080p.WEB.H264-CAKES.mkv | 1901154568]
Invalid media file: [FUBAR.S01E03.1080p.WEB.H264-CAKES.mkv | 2293460437]
Invalid media file: [FUBAR.S01E04.1080p.WEB.H264-CAKES.mkv | 2374404429]
Invalid media file: [FUBAR.S01E05.1080p.WEB.H264-CAKES.mkv | 2374343307]
Invalid media file: [FUBAR.S01E06.1080p.WEB.H264-CAKES.mkv | 2492416388]
Invalid media file: [FUBAR.S01E07.1080p.WEB.H264-CAKES.mkv | 2128844134]
Invalid media file: [FUBAR.S01E08.1080p.WEB.H264-CAKES.mkv | 1865069259]
Ignore extra: /home/qbtuser/Downloads/Gladiator.2000.Complete.Extended.Bluray.1080p.DTS-HD.x264-Grym/Gladiator.Extras-Grym
Invalid media file: [House.of.Lies.S02E01.Stochasticity.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2610100339]
Invalid media file: [House.of.Lies.S02E04.Damonschildren.Org.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2152426833]
Invalid media file: [House.of.Lies.S02E05.Sincerity.Is.An.Easy.Disguise.In.This.Business.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2362009707]
Invalid media file: [House.of.Lies.S02E06.Family.Values.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2838771204]
Invalid media file: [House.of.Lies.S02E07.The.Runner.Stumbles.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2393000969]
Invalid media file: [House.of.Lies.S02E08.Wonders.Of.The.World.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2381709126]
Invalid media file: [House.of.Lies.S02E09.Liability.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2485475590]
Invalid media file: [House.of.Lies.S03E02.PowerLess.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2433996610]
Invalid media file: [House.of.Lies.S03E03.Boom.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2174369402]
Invalid media file: [House.of.Lies.S03E04.Associates.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2406160949]
Invalid media file: [House.of.Lies.S03E05.Soldiers.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2341128132]
Invalid media file: [House.of.Lies.S03E07.Pushback.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2078500624]
Invalid media file: [House.of.Lies.S03E08.Brinkmanship.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 1919660782]
Invalid media file: [House.of.Lies.S03E09.Zhang.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2404779822]
Invalid media file: [House.of.Lies.S03E10.Comeuppance.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2048567894]
Invalid media file: [House.of.Lies.S03E11.Together.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2287779511]
Invalid media file: [House.of.Lies.S03E12.Joshua.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2302748930]
Invalid media file: [House.of.Lies.S04E02.Im.A.Motherfucking.Scorpion.Thats.Why.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2766548010]
Invalid media file: [House.of.Lies.S04E04.We.Can.Always.Just.Overwhelm.The.Vagus.Nerve.With.Another.Sensation.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2617109956]
Invalid media file: [House.of.Lies.S04E06.Trust.Me.Im.Getting.Plenty.Of.Erections.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2746666465]
Invalid media file: [House.of.Lies.S04E10.Praise.Money.Hallowed.Be.Thy.Name.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2784659065]
Invalid media file: [House.of.Lies.S05E04.End.State.Vision.1080p.AMZN.WEBRip.DD5.1.x264-NTb.mkv | 2065677925]
mediainfo_1: compute: /home/qbtuser/Downloads/Law.And.Order.SVU.S07E13.1080p.WEB.H264-SKYFiRE/law.and.order.svu.s07e13.1080p.web.h264-skyfire.mkv@1745891907680: net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header: 00000000
mediainfo_1: put: /home/qbtuser/Downloads/Law.And.Order.SVU.S07E13.1080p.WEB.H264-SKYFiRE/law.and.order.svu.s07e13.1080p.web.h264-skyfire.mkv@1745891907680: net.sf.ehcache.CacheException: java.io.StreamCorruptedException: invalid stream header: 00000000
Invalid media file: [No.Ordinary.Family.S01E15.1080p.x265-ZMNT.mkv | 808993381]
Invalid media file: [No.Ordinary.Family.S01E08.1080p.x265-ZMNT.mkv | 848277894]
Invalid media file: [No.Ordinary.Family.S01E14.1080p.x265-ZMNT.mkv | 856488242]
I've tried a bunch of different things. I have verified that mediainfo is installed, and works, I've verified that the files are valid, I'm out of ideas.
User avatar
rednoah
The Source
Posts: 24315
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: All files flagged as invalid

Post by rednoah »

:?: What happens if you let the script run? The console output above does not show any particular error. The script will print an error message / error code after the script has finished running. I recommend manually running tests on a small number of files if in doubt.


:?: Is this an actual movie file, or just a file with extras? Because extras are and should be ignored from processing, since you don't want to match extras as if they were actual movie files:

Code: Select all

Ignore extra: /home/qbtuser/Downloads/Focus.2015.EXTRAS.1080p.BluRay.H264-RMXTRAS
NOTE: The amc script categorically ignores files with the keyword EXTRAS in the file name.


:idea: Invalid media file means that mediainfo cannot read the file:

Code: Select all

Invalid media file: [Alvin.And.The.Chipmunks.The.Road.Chip.2015.REPACK.1080p.BluRay.H264.AAC-RARBG.mp4 | 1884327242]
That's not an error, just a warning. Might suggest that the file is corrupt though. Getting that warning for many files is highly unusual. I'd run a file system integrity check just in case.

That said, this particular warning merely means that FileBot won't be able to determine video duration, video codec, audio language, etc, but notably does not prevent FileBot from processing the file as per usual.



EDIT:

:?: What does filebot -script fn:sysinfo say?
:idea: Please read the FAQ and How to Request Help.
rassawyer
Posts: 7
Joined: 31 May 2025, 21:17

Re: All files flagged as invalid

Post by rassawyer »

Code: Select all

FileBot 5.1.7 (r10514)
JNA Native: 7.0.0
MediaInfo: 25.04
Tools: fpcalc/1.5.1 7z/24.09 unrar/7.11
Extended Attributes: OK
Unicode Filesystem: OK
GVFS: PlatformGVFS [/run/user/1000/gvfs]
Script Bundle: 2025-05-24 (r1007)
Groovy: 4.0.21
JRE: OpenJDK Runtime Environment 21.0.7
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 16 Core / 16 GB Max Memory / 66 MB Used Memory
OS: Linux (amd64)
HW: Linux truegeek 6.14.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 29 May 2025 21:42:15 +0000 x86_64 GNU/Linux
CPU/MEM: : AMD Ryzen 7 1700X Eight-Core Processor / MemTotal: 67 GB / MemFree: 630 MB / MemAvailable: 54 GB
STORAGE: ext4 [/] @ 374 GB | ext4 [/home/rassawyer] @ 918 GB | btrfs [/home/rassawyer/Media/Plex] @ 15 TB
UID/GID: uid=1000(rassawyer) gid=1000(rassawyer) groups=1000(rassawyer),962(docker),972(deluge),986(uucp),1001(sudo)
DATA: /home/rassawyer/.config/filebot
Package: AUR
License: FileBot License PX14066727 (Valid-Until: 2070-04-21)
Done ヾ(@⌒ー⌒@)ノ

Also, it looks like it is actually processing the files, they are just all going to "Unsorted", instead of into my Media library.

EDIT: It looks like adding

Code: Select all

--def movie=y series=y
may at least substantially improved the Unsorted issue. I will try to remember to post an update after this run is done.
User avatar
rednoah
The Source
Posts: 24315
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: All files flagged as invalid

Post by rednoah »

rassawyer wrote: 16 Jun 2025, 00:08 It looks like adding

Code: Select all

--def movie=y series=y
may at least substantially improved the Unsorted issue.
:!: The amc script has no such options and so setting them has no effect. If you get different results for the same files, then whatever change in behaviour you have observed, it notably was not caused by adding --def movie=y series=y to the command-line:

Console Output: Select all

Invalid usage: --def movie is not used and has no effect
Invalid usage: --def series is not used and has no effect
:idea: Please read the FAQ and How to Request Help.
rassawyer
Posts: 7
Joined: 31 May 2025, 21:17

Re: All files flagged as invalid

Post by rassawyer »

Yeah, I was overly optimistic. It made no difference. My Unsorted directory continues to balloon.

That's what I get for trusting anything ChatGPT had to say on the subject... :roll:
User avatar
rednoah
The Source
Posts: 24315
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: All files flagged as invalid

Post by rednoah »

Please set up a test folder with a single file that should work but doesn't and do a run, then paste the console output here so I can do the same and compare output. That way we can systematically figure out the issue at hand step by step.
:idea: Please read the FAQ and How to Request Help.
rassawyer
Posts: 7
Joined: 31 May 2025, 21:17

Re: All files flagged as invalid

Post by rassawyer »

I am an idiot, and am duly chastised.

It was a permissions issue. The user that the filebot/AMC was running under did not have permission to create directories in the target location, so it was trying, and failing to create the directory, then because the directory did not exist, it couldn't move/link the file to the directory, so that failed, and it threw it in Unsorted.

I changed the permissions on the directory to allow the media group execute access, and now it is working perfectly.

Thank you for your patience, and continued support.
User avatar
rednoah
The Source
Posts: 24315
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: All files flagged as invalid

Post by rednoah »

rassawyer wrote: 03 Aug 2025, 15:40 It was a permissions issue. The user that the filebot/AMC was running under did not have permission to create directories in the target location, so it was trying, and failing to create the directory, then because the directory did not exist, it couldn't move/link the file to the directory, so that failed, and it threw it in Unsorted.
:?: Did the console output not print a few warnings to that account? If there was no warnings, then we can see about adding some. If there was warnings that didn't lead to an immediate abort and were thus in the middle of the console output, well, that might have to look at and think about.

:?: Do you still have the logs from such a run?
:idea: Please read the FAQ and How to Request Help.
rassawyer
Posts: 7
Joined: 31 May 2025, 21:17

Re: All files flagged as invalid

Post by rassawyer »

Sorry for the delay, I've been very busy lately, and though I was pretty sure I still had some logs, I did not, until now, have time to verify that. Here is a sample of the log entries when it fails due to permissions issues, which results in it putting everything into Unsorted. If you want the entire log file, I can provide it, but it is very very long.

Console Output: Select all

[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/House MD Season 1, 2, 3, 4, 5, 6, 7 & 8 + Extras DVDRip TSV/Season 7/House MD Season 7 Episode 19 - Last Temptation.avi] to [/home/rassawyer/Media/Plex/TV Shows/House/Season 07/House - S07E19 - Last Temptation.avi] failed due to I/O error [Operation not permitted: House - S07E19 - Last Temptation.avi -> House MD Season 7 Episode 19 - Last Temptation.avi]
[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/House MD Season 1, 2, 3, 4, 5, 6, 7 & 8 + Extras DVDRip TSV/Season 7/House MD Season 7 Episode 20 - Changes.avi] to [/home/rassawyer/Media/Plex/TV Shows/House/Season 07/House - S07E20 - Changes.avi] failed due to I/O error [Operation not permitted: House - S07E20 - Changes.avi -> House MD Season 7 Episode 20 - Changes.avi]
[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/House MD Season 1, 2, 3, 4, 5, 6, 7 & 8 + Extras DVDRip TSV/Season 7/House MD Season 7 Episode 21 - The Fix.avi] to [/home/rassawyer/Media/Plex/TV Shows/House/Season 07/House - S07E21 - The Fix.avi] failed due to I/O error [Operation not permitted: House - S07E21 - The Fix.avi -> House MD Season 7 Episode 21 - The Fix.avi]
[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/House MD Season 1, 2, 3, 4, 5, 6, 7 & 8 + Extras DVDRip TSV/Season 7/House MD Season 7 Episode 22 - After Hours.avi] to [/home/rassawyer/Media/Plex/TV Shows/House/Season 07/House - S07E22 - After Hours.avi] failed due to I/O error [Operation not permitted: House - S07E22 - After Hours.avi -> House MD Season 7 Episode 22 - After Hours.avi]
[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/House MD Season 1, 2, 3, 4, 5, 6, 7 & 8 + Extras DVDRip TSV/Season 7/House MD Season 7 Episode 23 - Moving On.avi] to [/home/rassawyer/Media/Plex/TV Shows/House/Season 07/House - S07E23 - Moving On.avi] failed due to I/O error [Operation not permitted: House - S07E23 - Moving On.avi -> House MD Season 7 Episode 23 - Moving On.avi]
[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/Sherlock S04 1080p WEB-DL DD 5 1 x265-L0ST/Sherlock.S04E01.The.Six.Thatchers.1080p.WEB-DL.DD+.5.1.x265-L0ST.mkv] to [/home/rassawyer/Media/Plex/TV Shows/Sherlock/Season 04/Sherlock - S04E01 - The Six Thatchers.mkv] failed due to I/O error [Operation not permitted: Sherlock - S04E01 - The Six Thatchers.mkv -> Sherlock.S04E01.The.Six.Thatchers.1080p.WEB-DL.DD+.5.1.x265-L0ST.mkv]
[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/Sherlock S04 1080p WEB-DL DD 5 1 x265-L0ST/Sherlock.S04E02.The.Lying.Detective.1080p.WEB-DL.DD+.5.1.x265-L0ST.mkv] to [/home/rassawyer/Media/Plex/TV Shows/Sherlock/Season 04/Sherlock - S04E02 - The Lying Detective.mkv] failed due to I/O error [Operation not permitted: Sherlock - S04E02 - The Lying Detective.mkv -> Sherlock.S04E02.The.Lying.Detective.1080p.WEB-DL.DD+.5.1.x265-L0ST.mkv]
[HARDLINK] from [/home/qbtuser/Downloads/Completed/tv-sonarr/Sherlock S04 1080p WEB-DL DD 5 1 x265-L0ST/Sherlock.S04E03.The.Final.Problem.1080p.WEB-DL.DD+.5.1.x265-L0ST.mkv] to [/home/rassawyer/Media/Plex/TV Shows/Sherlock/Season 04/Sherlock - S04E03 - The Final Problem.mkv] failed due to I/O error [Operation not permitted: Sherlock - S04E03 - The Final Problem.mkv -> Sherlock.S04E03.The.Final.Problem.1080p.WEB-DL.DD+.5.1.x265-L0ST.mkv]
User avatar
rednoah
The Source
Posts: 24315
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: All files flagged as invalid

Post by rednoah »

A.

Code: Select all

[HARDLINK] from [/home/qbtuser/X.avi] to [/home/rassawyer/Y.avi] failed due to I/O error [Operation not permitted]
:idea: You are moving files from one user home (presumably the $HOME of the current $USER) into the user home of another user. That sounds like something that would / should fail by default with a permissions error.

:?: What user / group are you running as? What are the owner / group / permissions of the target folder? You can use ls -l /path/to/folder to find out.



B.

Code: Select all

STORAGE: ext4 [/] @ 374 GB | ext4 [/home/rassawyer] @ 918 GB | btrfs [/home/rassawyer/Media/Plex] @ 15 TB
:idea: Depending on your setup, each user home may be a separate mount point / file system, making hardlinks conceptually impossible. Please read What is a hardlink? for details.

:?: Are both source file path and target file path on the same file system? You can use stat /path/to/folder to find out. That said, /home/rassawyer/Media/Plex does seem to be explicitly listed as a separate file system according to your previous post.





:idea: My educated guess is that it fails at (A) due to permissions. If you were to fix permissions, it would then fail at (B) cross-device link. The latter can be fixed by using --action duplicate (which will default to --action copy if hardlinks are not possible).
:idea: Please read the FAQ and How to Request Help.
rassawyer
Posts: 7
Joined: 31 May 2025, 21:17

Re: All files flagged as invalid

Post by rassawyer »

My setup is perhaps unduly complicated. I do have it working; I was mostly providing the logs A) because you asked, and B) in case it helps anyone else or it would make sense to more clearly/specifically throw an error when encountering this type of setup.

I have 3 10Tb HDDs with BTRFS across all 3, mounted at /home/rassawyer/Media. /home/qbtuser/Downloads is symlinked to Media/Downloads. Thus, qbt downloads all files to the Media directory. The filebot runs as my user, rassawyer, which is why I was getting those operation not permitted errors, however, I added a media group, and put together a script to change the file permissions on stuff to allow my user, and qbtuser, and plex user to all have rw access to everything under Media. There is probably a better way to do this, but it works, as long as I don't forget to run the script to update the permission before I run the amc script.
rassawyer
Posts: 7
Joined: 31 May 2025, 21:17

Re: All files flagged as invalid

Post by rassawyer »

additional info: /home/qbtuser/Downloads used to be a separate disk, on it's own mountpoint, and I was using -- action duplicate, but i ran into two issues; first, I was downloading everything to one location, then copying it to another, which was doing a lot more file operations than necessary, and second, and much more importantly, I only had a much smaller disk for downloads, and if I wanted to keep seeding files for any length of time, that quickly became to small. Thus the BTRFS and symlinked mount came to be, to allow me to seed from the the final destination of the files, and to greatly increase the available download space.
User avatar
rednoah
The Source
Posts: 24315
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: All files flagged as invalid

Post by rednoah »

I see. Thanks for the logs then. I'll see if we can add additional permissions / owner information to those log lines in future revisions to make these kinds of issues more easy to figure out.
:idea: Please read the FAQ and How to Request Help.
Post Reply