Topic on Project:Support desk

Jump to navigation Jump to search

TimedMediaHandler won't transcode anything

38
Eluphay (talkcontribs)

TimedMediaHandler won't transcode anything, am not really qualified to be making my own wiki, but so far i have gotten most things to work, this is one of two things i can't seem to get to work, am making a local only site just for me and my friends to screw around with, so it does not need to be able to handle work outside of the local network.

it keeps saying, failed transcodes, in the Special:TimedMediaHandler part of the site

i suspect that i might have not setup the locations of the trancoders properly, perhaps someone that knows more could check them for me...

$wgFFmpegLocation = 'C:/Bitnami/wampstack-7.1.30-0/ffmpeg413/bin';

windows location is.... C:\Bitnami\wampstack-7.1.30-0\ffmpeg413, do i included the bin that contains the exes?

$wgFFmpeg2theoraLocation = 'C:/Bitnami/wampstack-7.1.30-0/ffmpeg2theora';

windows location is.... C:\Bitnami\wampstack-7.1.30-0\ffmpeg2theora, exe is in the actual folder on this one.

$wgOggThumbLocation = 'C:/Bitnami/wampstack-7.1.30-0/php/OggTools/bin';

Windows location is... C:\Bitnami\wampstack-7.1.30-0\php\OggTools\bin, do i included the bin that contains the exes?


TimedMediaHandler 0.6.0 (5d59610)21:40, June 13, 2019


Installed software

Product Version
MediaWiki 1.32.1
PHP 7.3.7 (apache2handler)
MySQL 5.7.23
ICU 64.2
Lua 5.1.4


if anyone needs more information, please let me know what they need and i'll try get it for them.

Ciencia Al Poder (talkcontribs)

$wgFFmpegLocation should point to the full path of ffmpeg, not only the folder where it's placed. I guess it should be C:/Bitnami/wampstack-7.1.30-0/ffmpeg413/bin/ffmpeg.exe or similar. The same for other settings.

Eluphay (talkcontribs)

awesome, that seems to have solved the access problem, now i just need to fix my other issues

Eluphay (talkcontribs)

am now getting this error instead,


Error creating thumbnail: "C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_6ca548108731.jpg" 2>&1 wgMaxShellMemory: 32768000 The filename, directory name, or volume label syntax is incorrect.

Ciencia Al Poder (talkcontribs)

The problem seems to be the "2>&1" part of the command executed, which only works on bash shell (linux) and not on Windows. If you can locate it on the code, just remove it and it should work. That's worth a BUGREPORT

Eluphay (talkcontribs)

okay removed the 2>&1 part of the command in TimedMediaThumbnail.php,

now it just says...

Error creating thumbnail: "C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_6ca548108731.jpg" 2>&1 wgMaxShellMemory: 32768000

Ciencia Al Poder (talkcontribs)

There's still a 2>&1 somewhere...

Eluphay (talkcontribs)

Error creating thumbnail: "C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_c415afd9e35c.jpg" wgMaxShellMemory: 32768000


got rid of it, still nothing

Eluphay (talkcontribs)

i forgot to save the changes to TimedMediaThumbnail.php, i was being an idiot, sorry about that

Eluphay (talkcontribs)

still nothing though

Ciencia Al Poder (talkcontribs)

Can you open CMD and execute the command directly?

"C:/Bitnami/ff/ffmpeg.exe" -threads 1 -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3 -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_c415afd9e35c.jpg"
Eluphay (talkcontribs)

that works, but the server fails to do it itself

Eluphay (talkcontribs)

Obviously their is nothing wrong with the command or ffmpeg then, the server is just not calling the command properly for some reason, what is it doing wrong?, is their a way to fix it?

Ciencia Al Poder (talkcontribs)
Eluphay (talkcontribs)

in the log its still saying the same error, however after i deleted 2>&1 from the php file, the only thing that seemed to change, is the showing of the error message on the page itself, but it still seems to be having this problem internally...


[exec] Error running "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg": The filename, directory name, or volume label syntax is incorrect.

Eluphay (talkcontribs)

other part of this log was...


File::transform: Doing stat for mwstore://local-backend/local-thumb/b/b0/video.webm/120px--video.webm.jpg

[FileOperation] FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/b/b0/video.webm/120px--video.webm.jpg does not exist

Creating video thumbnail at C:\Windows\TEMP/transform_31d6904568a5.jpg

File::transform: Doing stat for mwstore://local-backend/local-thumb/b/b0/video.webm/720px-seek=140-video.webm.jpg

[FileOperation] FileBackendStore::getFileStat: File mwstore://local-backend/local-thumb/b/b0/video.webm/720px-seek=140-video.webm.jpg does not exist

Creating video thumbnail at C:\Windows\TEMP/transform_540f9f5c2317.jpg

[exec] MediaWiki\Shell\Command::execute: "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "D:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg"

[exec] Error running "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "C:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg": The filename, directory name, or volume label syntax is incorrect.


This post was hidden by AhmadF.Cheema (history)
Ciencia Al Poder (talkcontribs)

Can you try to change

C:/Bitnami/ff/ffmpeg.exe

to

C:\Bitnami\ff\ffmpeg.exe

In your LocalSettings.php?

Since \ is an escape character in PHP, you may need to use

C:\\Bitnami\\ff\\ffmpeg.exe

185.43.110.30 (talkcontribs)

does not work, same error

Eluphay (talkcontribs)

does not work, same error,


forgot to log in

Eluphay (talkcontribs)

tried both \\, and \.

This post was hidden by 107.242.117.44 (history)
Ciencia Al Poder (talkcontribs)

The error The filename, directory name, or volume label syntax is incorrect is produced by the windows shell.

If executing "C:/Bitnami/ff/ffmpeg.exe" -threads 1  -ss 137 -y -i "D:\Bitnami\wampstack-7.1.30-0\apps\mediawiki\htdocs/images/b/b0/video.webm" -ss 3  -s 720x480 -f mjpeg -an -vframes 1 "C:\Windows\TEMP/transform_540f9f5c2317.jpg" from a command prompt doesn't produce this error, then the version of PHP you're using may have a bug invoking the shell.

Eluphay (talkcontribs)

does the $wgImageMagickConvertCommand variable use the shell?, because its loading convert.exe from imagemagik without problems

Ciencia Al Poder (talkcontribs)

Yes, it uses the shell

Eluphay (talkcontribs)

how come that works fine?, it the php version is not able to use the shell properly, then how does it managed with imagemagik?

Ciencia Al Poder (talkcontribs)

This is a problem with ffmpeg.exe

I've tried the same command on my PC, and changed C:/Bitnami/ff/ffmpeg.exe with notepad.exe, and I get the same error, but if I change it to calc.exe instead I don't get the error

ffmpeg (and notepad) seem to be interpreting something weirdly from the command that cause them to throw that error.

Eluphay (talkcontribs)

interesting..., any idea whats going on?, is it the text formatting or something?

Ciencia Al Poder (talkcontribs)

I don't know, but it doesn't make sense

Eluphay (talkcontribs)

is ffmpeg perhaps accepting text via the shell only when its encoded in unicode or ansi perhaps?, just theorising now. notepad i believe only supports ansi not unicode, ffmpeg probably does support unicode, probably useless, but am just trying to brainstorm here

AhmadF.Cheema (talkcontribs)

Notepad supports Unicode, though depending on the version, the default save format is likely to be ANSI. In recent Windows 10 builds, the default might have been set to Unicode now.

Ciencia Al Poder (talkcontribs)

This doesn't seem to be a unicode issue, since the problem is caused when a path is passed to a program (in some programs it causes an error, in others it doesn't)

Eluphay (talkcontribs)

i haven't used notepad properly since windows 98, which i believe did not support Unicode in those days, obviously it does now, did not know that, good to know though.

either way we still need to figure out whats going on, i assumed that the path was likely not effected by text encoding, it was mostly a wild guess, as i can't think of anything else right now, am able to execute the command purely myself in the command prompt, so ffmpeg can use the command, it seems that the way its receiving the command is effecting it, if am understanding correctly.


Eluphay (talkcontribs)

still trying to fix this, still nothing yet

Eluphay (talkcontribs)

finally got everything else on my site working, but this issue just won't go away

Ciencia Al Poder (talkcontribs)

Unfortunately this is something specific to windows and ffmpeg, probably not a common setup. If nobody else has a clue about this you may need to find help in other forums or stack overflow.

Eluphay (talkcontribs)

imagemagik cmd executed programs work fine, such as convert.exe, as do all other cmd programs, its just ffmpeg that refuses to work, according to task manager and process hacker, it seems its not even loading up at all, is it loaded within apache's httpd.exe or something, cause that seems kinda weird to me.

Eluphay (talkcontribs)

seems that getting parsoid and nodejs to run on windows for the visualeditor is also very hard to do, as windows is an uncommon setup, however after a lot of hard work, its working perfectly now, that was my only other issue, now am left with just this one issue, audio playback works, and the videos play if pre-converted to the right format prior to upload and you go to the direct link to the file in the web-browser, however the generation of thumbnails and the trans-coding, just refuses to work.

Reply to "TimedMediaHandler won't transcode anything"