Announcement

  •  » Extensions
  •  » [resolved] Did anyone successfully upload mp4 by VideJS

#16 2022-03-24 15:43:01

rajdude
Member
2021-05-18
90

Re: [resolved] Did anyone successfully upload mp4 by VideJS

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:

https://i.imgur.com/K3zjjZ2.png

Offline

 

#17 2022-03-24 19:45:04

erAck
Only trying to help
2015-09-06
2027

Re: [resolved] Did anyone successfully upload mp4 by VideJS

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

Code:

LD_LIBRARY_PATH=/path/to/mediainfo/lib64 /path/to/mediainfo/bin/mediainfo "$@"

and chmod +x the script and use that in videojs.


Running Piwigo at https://erack.net/gallery/

Offline

 

#18 2022-03-24 20:39:55

rajdude
Member
2021-05-18
90

Re: [resolved] Did anyone successfully upload mp4 by VideJS

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

 

#19 2022-03-28 08:40:33

cryopad
Piwigo Team
Grenoble, France
2015-11-01
191

Re: [resolved] Did anyone successfully upload mp4 by VideJS

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


If you enjoy Piwigo for iOS…
➤ We would appreciate an AppStore review.
➤ Comments, suggestions ? Tell us on GitHub…
➤ Not yet available in your language ? Help us translate it…

Offline

 

#20 2022-04-16 22:48:23

rajdude
Member
2021-05-18
90

Re: [resolved] Did anyone successfully upload mp4 by VideJS

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

 

#21 2022-04-16 23:18:58

rajdude
Member
2021-05-18
90

Re: [resolved] Did anyone successfully upload mp4 by VideJS

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

 

#22 2022-04-16 23:34:27

rajdude
Member
2021-05-18
90

Re: [resolved] Did anyone successfully upload mp4 by VideJS

YAHOOOOOOOO!
I GOT IT WORKING!

Here is what I had to do to introduce the switch -threads 1


https://i.imgur.com/dLXHDOQ.png


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

 
  •  » Extensions
  •  » [resolved] Did anyone successfully upload mp4 by VideJS

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact