shish / shimmie2

An easy-to-install community image gallery (aka booru)
http://code.shishnet.org/shimmie2/
GNU General Public License v2.0
411 stars 115 forks source link

Missing thumbnails for webm/mp4 files #1220

Closed Stormlashbd closed 1 month ago

Stormlashbd commented 3 months ago

Server Software

Client Software

What steps trigger this bug

  1. Go to './post/list'

What did you expect to happen? Video files (mp4, webm) to have a thumbnail preview

What actually happened? Only other static formats (jpg, png etc) get thumbnails generated. Untitled

Full description

I'm sorry for bringing up this issue once more, but I've ran out of ideas of what to do, and I don't want to run in circles or, worse, break something. Thank you kindly in advance, any and all help appreciated!

discomrade commented 3 months ago

I can't find information on what an ffmpeg error 245 is, can you try running that command on the image in CLI and see if it gives a descriptive error message?

MP4 and WebM ffmpeg thumbnails are working on my booru but I am using a much older ffmpeg version (not 7.x.x).

Stormlashbd commented 3 months ago

I can't find information on what an ffmpeg error 245 is, can you try running that command on the image in CLI and see if it gives a descriptive error message?

MP4 and WebM ffmpeg thumbnails are working on my booru but I am using a much older ffmpeg version (not 7.x.x).

I ran the conversion command in CLI and got:

Another discovery, on running ffbrobe -version it returns "command not found" (I imagine it's also required)

ChatGPT advised I update ffmpeg, I downloaded "ffmpeg-git-amd64-static.tar.xz" from https://johnvansickle.com/ffmpeg/, but beside extracting it on the server, I don't know how to instruct shimmie to use it.

Hope this information proves useful, let me know if I omitted anything. Thank you for your time!

EDIT: I've decided to upload multiple webm files to see if the error changes. It seems I missed that the error comes in pairs, as seen here error

discomrade commented 3 months ago

ffbrobe -version

Well-spotted, I suspect that's the issue. Just double checking, is this just a typo ('b' instead of 'p') or does ffprobe actually not exist on the server? (I assume the latter, because IIRC error 127 is "command not found"). ffprobe is mentioned many times in the Shimmie code so I also believe it's necessary for audio and video files, so install it and retry, checking it works on CLI with no errors.

My (naïve!) guess is ffprobe is being used to get the video's dimensions, and when this fails, the ffmpeg isn't given valid scale instructions, giving that first error: Failed to configure output pad on Parsed_scale_0

If it keeps having issues, I would try searching the individual error messages, ideally from first to last.

PS: I personally would be cautious about relying on NLPs like ChatGPT for advise. It can't understand context like outdated answers, disputes and critique of replies, etc., so it ends up just giving what it thinks is the most likely answer (in this case, the generic advise to update, which isn't harmful or anything but I don't think it would solve your problem - in this case when we might be talking about compatibility rather than missing features, if anything I would first consider downgrading it!)

Stormlashbd commented 3 months ago

Sorry, yes, it was a typo (picture related) Untitled The existence of a disable ffprobe command makes me think it might still exist, despite CLI not being able to find it?

Frankly, I am not sure how to downgrade it, I live under the assumption that it came pre-installed when I purchased this webhost (siteground.com, shared hosting by the looks of it).

The default install location (found with a whereis) points towards "usr/local/bin/ffmpeg" (which I don't have access to tamper with, via CLI or FTP). Which brings back the question I made in the previous post: if I were to manually add ffmpeg/ffprobe to say, the root folder of my site, how would I instruct shimmie to use it? I poked a bit at /ext/media/config.php and changed the strings there, but it didn't seem to have any effect (or maybe I messed it up due to lack of know-how).

And I'm aware GPT is not the most reliable tool to use, but it helped me gain some insight about the whole ordeal, especially as a complete novice. I just didn't want to open an issue the moment I got stuck, and tried to do it on my own. Unfortunately, I think this is as far as I can go with my limited knowledge.

discomrade commented 3 months ago

I wouldn't try downgrading yet, I think the problem is not ffmpeg, but that ffprobe is missing. I've never used shared hosting, so you might need to ask the siteground.com support team how to enable/install ffprobe because I am confused why only one of them would be working.

And I'm aware GPT is not the most reliable tool to use, but it helped me gain some insight about the whole ordeal, especially as a complete novice

That's fine, and I'm glad to hear you were already aware and that it helped :) I was only saying that just in case.

Stormlashbd commented 3 months ago

I wouldn't try downgrading yet, I think the problem is not ffmpeg, but that ffprobe is missing. I've never used shared hosting, so you might need to ask the siteground.com support team how to enable/install ffprobe because I am confused why only one of them would be working.

I am just as confused. I saw siteground has a built-in AI assistant, and I tried inquiring about ffprobe missing, to which I got the following answer : image I'm not sure what to believe anymore. It's weekend so I'll wait until tomorrow and try to contact someone from support directly, since I'm all out of ideas.

Thank you again for your help!

Stormlashbd commented 3 months ago

With a bit of help from a friend, we got ffprobe working (error 245 is gone, but 127 persists). He verified that the ffmpeg commands worked without issue with the amd64 7.0.1 binaries on a second machine, but the first machine continues to throw errors, namely

It's a bit of progress, but I still don't know what causes it. I will still try to contact siteground support, while keeping an eye on here as well.

Stormlashbd commented 1 month ago

It was indeed an issue with the hosting service. I changed it and works perfectly now. Thank you again for all the help!