Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unsupported file" error when opening a read only file... #1822

Open
5 tasks done
wielandjeff opened this issue Dec 21, 2023 · 7 comments
Open
5 tasks done

"Unsupported file" error when opening a read only file... #1822

wielandjeff opened this issue Dec 21, 2023 · 7 comments

Comments

@wielandjeff
Copy link

wielandjeff commented Dec 21, 2023

I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first

Operating System

Windows 10

Steps to reproduce

I have dozens of read only mp4's on my network share (Unraid server). They all play fine, no errors/corruption. However, when I drag any of them to LosslessCut (3.58.0.0) I get a "Unsupported file" error and the following console output...

"
index-3ee52d33.js:298 userOpenFiles
index-3ee52d33.js:298 //Movies\test.mp4
index-3ee52d33.js:298 State reset
index-3ee52d33.js:299 userOpenFiles Error: Unsupported file: Command failed with exit code 1: C:\Apps\LosslessCut-win-x64\resources\ffprobe.exe -of json -show_chapters -show_format -show_entries stream -i //Movies\test.mp4 -hide_banner
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001bf20287dc0] moov atom not found
//Movies\test.mp4: Invalid data found when processing input
"

If I copy the exact same file to my local drive (no longer read only), LosslessCut can open/edit it just fine.

I'm slowly researching the "moov atom", but like I said, the videos all play fine, so the files themselves are not broken/corrupt.

Expected behavior

LosslessCut should open the file, read only or not.

Actual behavior

LosslessCut can't open files on a read only network share.

Share log

"
index-3ee52d33.js:298 userOpenFiles
index-3ee52d33.js:298 //Movies\test.mp4
index-3ee52d33.js:298 State reset
index-3ee52d33.js:299 userOpenFiles Error: Unsupported file: Command failed with exit code 1: C:\Apps\LosslessCut-win-x64\resources\ffprobe.exe -of json -show_chapters -show_format -show_entries stream -i //Movies\test.mp4 -hide_banner
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001bf20287dc0] moov atom not found
//Movies\test.mp4: Invalid data found when processing input
"

@mifi
Copy link
Owner

mifi commented Dec 22, 2023

hmm, seems something might be wrong with the path. it tries to open \Movies\test.mp4. AFAIK on windows a path cannot start with a single slash and it needs to include the drive. what's the actual path to the file? does the same happen if you do file->open?

@wielandjeff
Copy link
Author

wielandjeff commented Dec 22, 2023

*the network path got formatted when posting above, it is indeed actually double backslash (network location) "//Movies\test.mp4". "Movies" being the network share name.

*dang not sure how to get double backslash to show up here in the comments...

TL;DR the path is correct, I don't think that's the problem. And yes I get the exact same error when going file->open as I do when drag dropping.

@mifi
Copy link
Owner

mifi commented Dec 22, 2023

hmm that's odd. does the same happen if you mount the share as a drive, e.g. K:\ (net use k: \\Movies)?

I wonder if we need to use file:\\ as seen here. any chance you could see if this works from the command line?

C:\Apps\LosslessCut-win-x64\resources\ffprobe.exe -of json -show_chapters -show_format -show_entries stream -i file:\\Movies\test.mp4 -hide_banner

@wielandjeff
Copy link
Author

wielandjeff commented Dec 23, 2023

Ran the above ffprobe from command line, getting the same error...

{
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001c8a5e7dd80] moov atom not found
file:\\Movies\test.mp4: Invalid data found when processing input

}

Interestingly, if I drag the exact same "test.mp4" into Lossless Cut from a different read/write share (same Unraid server), it loads fine (as it always has). Then, if export a clip, put the clip back onto the read only share, now everything works! The "test_clip.mp4" (which presumably has been "fixed" when it passed through Lossless Cut) will open JUST FINE in Lossless Cut (even though it's back on the read only share).

So I think what's going on is - Lossless Cut (and/or ffmpeg) is detecting something 'wrong' with the "moov atom" (whatever the heck that is), and is trying to repair/monkey with the file (which it can't, since it's read only), so it freaks out and throws the "Unsupported file" popup.

There must be a way to load/edit a video without needing write permissions to the original file... And like I said, this isn't an issue with just one 'bad' file, this is EVERY mp4 on the read only share (tons of different videos/sources).

@mifi
Copy link
Owner

mifi commented Dec 23, 2023

Hmm. I highly doubt that ffprobe tries to write to the file. Ffprobe is a program that is meant to just read data from media files. I guess you could verify this by creating a readonly file on c:/ and try to open that and aee if it’s the same error.
What might be happening is maybe it cannot seek the file? Maybe the file system is not seekable? I know ffprobe needs to seek back and forth to look for the moov atom. Either that or it simply cannot read from the file, but it throws this confusing error message.

@wielandjeff
Copy link
Author

All the files play fine (and are seekable), directly off the read only network share. Tested several different media players.

The thing that confuses me the most - I just ran another test with a random mp4 video file. If I try to load it into Lossless Cut directly off the read only share, I get "Unsupported file".

However, if I pull the file down to my local machine, not only does it load in just fine, but if I export a clip, then send the clip back to the read only share, everything magically starts working. I can now load the new clip DIRECTLY into Lossless Cut (straight off the read only share), just as you would expect, no problems.

So it's like when exporting a clip, Lossless Cut modified the file format somehow and now it's more 'readable'? But why do the original files (which don't seem to be corrupt in any way) load in fine as long as they aren't on this read only share? All the mp4s on my other read/write share load in just fine, so I don't think it's a problem with my network/Unraid server...

@mifi
Copy link
Owner

mifi commented Dec 29, 2023

I cannot explain this unfortunately. I don't have any way to reproduce this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants