as a test, I tried to run the ffmpeg command manually, on a terminal,
I got this error
Command I ran:
/home/rajivm/app/ffmpeg/ffmpeg-5.0-amd64-static/ffmpeg -ss 4 -i "/home/rajivm/public_html/photos/upload/2022/03/23/20220323101442-44d7364c.m4v" -vcodec mjpeg -vframes 1 -an -f rawvideo -y "/home/rajivm/public_html/photos/upload/2022/03/23/pwg_representative/20220323101442-44d7364c.jpg"
Error:
Offline
rajdude wrote:
A few days back, I was able to install all the dependencies of mediainfo successfully and was able to test mediainfo as described here:
https://github.com/Piwigo/piwigo-videoj … ing-system
There is a catch though:
Seems to me defining the absolute path is not enough, it needs the dependency libraries included in the PATH variable.
Under that link there's a legacy very much outdated version compiled using shared libraries, that's why (and it's LD_LIBRARY_PATH as you found out).
Use the CLI package pointed to by cryopad instead, it builds into a statically linked binary instead of shared libs.
If you can't compile on your server and have to fall back to that ancient shared library binary then you'll have to create a script that sets LD_LIBRARY_PATH and calls the actual binary, like
LD_LIBRARY_PATH=/path/to/mediainfo/lib64 /path/to/mediainfo/bin/mediainfo "$@"
and chmod +x the script and use that in videojs.
Offline
thanks erAck
I do not have access to a Linux server, but I could spin up a VM for this....but that is too much work though; just to get mediainfo working. Besides, I don't really need to show my videos' exif info in Piwigo.
The thing I do want to get working is the poster generation, and that needs ffmpeg to work properly.
Any tips for the ffmpeg problem I am facing?
Offline
Hi Raj,
Hum… have you checked the error logs of your server as suggested by FFmpeg?
Have you tried to compile mediainfo as I suggested to solve the library access issue?
All the best,
Eddy
Offline
Hi Eddy,
Got some time now, so I am now trying to resolve these problems again.
About ffmpeg:
I just ran VideoJS plugin [Synchronize] again and got the same errors.
Then I checked web server error log messages in the web-hosting company's cPanel. It says this
No recent web server errors exist for your domain: rajdude.com
It is a shared web hosting package deal, so I do not have full access to the file system of the server. I am not sure what else I should look at.
Any tips?
About mediainfo:
I really do not need mediainfo working. I do not think ffmpeg depends upon mediainfo to create the thumbnails posters for videos, correct?
Offline
OH Oh Oh!!!!! :-) Check this out!
While Googling the error message shown by ffmpeg, which is:
Error:
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[auto_scale_0 @ 0x7f4b280] Failed to configure output pad on auto_scale_0
Error reinitializing filters!
Failed to inject frame into filter network: Resource temporarily unavailable
Error while processing the decoded data for stream #0:0
...I stumbled upon this:
https://stackoverflow.com/questions/333 … navailable
The guy suggests adding -threads 1 to the command. So I did.
Guess what? It worked on a terminal session! It actually created a thumbnail poster!
Now, how can I tell the VideoJS plugin to implement this switch?
-threads 1
Offline
YAHOOOOOOOO!
I GOT IT WORKING!
Here is what I had to do to introduce the switch -threads 1
It generated the thumbnails. NICE!
Two more things I need to resolve before I can put Piwigo finally into "production" on my website.
1. How do I make this -threads 1 stick for videoJS?
I do not want to type stuff into the "program dependencies" page every time I want to generate thumbnails/posters.
2. The "Add film effect" works, but is NOT visible on the pages where thumbnails are shown. It is only visible if I click on the video poster link and on the next page the poster is shown along with film effect on the sides.
Offline