Ffmpeg fails creating thumbnails on wmv files but has no problems with mpg and avi

piett

Joined: 2006-03-27
Posts: 11
Posted: Wed, 2006-03-29 12:40

i have enabled the Ffmpeg module and configured the path to Ffmpeg.exe.
everything works on all videos except Windows Media Videos.

is this an limitation of Ffmpeg? or do i need to install codecs on my webserver?


Gallery versie = 2.1 core 1.1.0
PHP versie = 5.1.2 cgi-fcgi
Web server = Apache/2.0.55 (Win32)
Database = mysql 5.0.18-nt, lock.system=database
Toolkits = Exif, Gd, ImageMagick, Thumbnail, Ffmpeg
Versnelling = none, none
Besturingssysteem = Windows NT ERCOLE 5.0 build 2195
Standaard thema = matrix
Talen = nl_NL
Browser = Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Fri, 2006-03-31 06:59

I'm betting that your .WMV videos used Media Encoder v9 so yes this is a ffmpeg limitation.
You need the mplayer module. You'll first need to compile/install mplayer.
Go here: http://codex.gallery2.org/index.php/Gallery2:UserContributions#Modules

 
piett

Joined: 2006-03-27
Posts: 11
Posted: Sat, 2006-04-01 20:24

i have installed the mplayer module and set the path to mplayer.exe (version: dev-CVS-050928-16:38-3.4.2)

but when i try to use:

Quote:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in C:\websites\eckhart.da.ru\gallery\modules\mplayer\classes\MplayerToolkit.class on line 202

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\websites\eckhart.da.ru\gallery\modules\mplayer\classes\MplayerToolkit.class on line 202

Warning: Invalid argument supplied for foreach() in C:\websites\eckhart.da.ru\gallery\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 71

what version of mplayer was used by the developers of this module? and was it tested with the win32 executable?

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Sat, 2006-04-01 21:42

Hmm, not sure on mplayer version. I'm using dev-CVS-060217-02:46-3.4.4 on Linux with PHP 4.4.2.
Your issue may be due to the PHP version you are using. I think some folks were successful using Windows.
Looks as though someone else has the same bug as you over here.
Might want to follow-up with mattyb as he is the one who wrote the mplayer module.

 
piett

Joined: 2006-03-27
Posts: 11
Posted: Sat, 2006-04-01 22:20

thanks swordfish ( congrads with your 300th post ;) )

the array_merge() problem is solved (it had something to do with new php version.
(i needed to change

Quote:
$platform->exec(array(array_merge($mplayerPath, $sourceFilename, $args)));

to

Quote:
$platform->exec(array(array_merge((array)$mplayerPath, (array)$sourceFilename, $args)));

on line 202 in ./modules/mplayer/classes/MplayerToolkit.class

But i will contact mattyb about the rest of my problems i have below...
thanks again for putting me on the right track!

mplayer -vc help:

Quote:
Available video codecs:
vc: vfm: status: info: [lib/dll]
(...)
wmv8 dshow working Windows Media Video 8 [wmv8ds32.ax]
wmv7 dshow working Windows Media Video 7 [wmvds32.ax]
wmv9dmo dmo working Windows Media Video 9 DMO [wmv9dmod.dll]
wmvdmo dmo working Windows Media Video DMO [wmvdmod.dll]
wmvadmo dmo working Windows Media Video Adv DMO [wmvadvd.dll]
(...)

mplayer -demuxer help:

Quote:
Available demuxers:
demuxer: type info: (comment)
rawaudio 20 Raw audio demuxer
rawvideo 26 Raw video demuxer
tv 9 Tv card demuxer (?)
mf 16 mf demuxer (multiframe?, pictures demuxer)
avi 3 AVI demuxer (AVI files, including non interleaved files)
y4m 12 YUV4MPEG2 demuxer
asv 6 ASF demuxer (ASF, WMV, WMA)
nsv 36 NullsoftVideo demuxer (nsv and nsa streaming files)
nuv 13 NuppelVideo demuxer
real 11 Realmedia demuxer (handles new .RMF files)
smjpeg 24 smjpeg demuxer
mkv 31 Matroska demuxer (based on gstreamer demuxer by Ronald Bultje a
nd demux_mkv.cpp by Moritz Bunkus)
realaudio 32 Realaudio demuxer (handles old audio only .ra files)
vqf 37 TwinVQ demuxer (ported frm MPlayerXP)
mov 7 Quicktime/MP4 demuxer (Handles Quicktime, MP4, 3GP)
vivo 8 Vivo demuxer
fli 10 Autodesk FLIC demuxer (Supports also some extensions)
film 14 FILM/CPK demuxer for Sega Saturn CD-ROM games
roq 15 RoQ demuxer
gif 28 GIF demuxer
ogg 18 Ogg demuxer
avs 38 Avisynth demuxer (Requires binary dll)
pva 23 PVA demuxer (streams from DVB cards)
mpegts 29 MPEG-TS demuxer
lmlm4 34 LMLM4 MPEG4 Compression Card stream demuxer
mpegps 2 MPEG PS demuxer (Mpeg)
mpegpes 41 MPEG PES demuxer (Mpeg)
mpeges 1 MPEG ES demuxer (Mpeg)
mpeggxf 42 MPEG ES in GXF demuxer (Mpeg)
mpeg4es 27 MPEG4 ES demuxer (Mpeg)
h264es 30 H.264 ES demuxer (Mpeg)
mpc 40 Musepack demuxer (supports v7 bitstream only)
audio 17 Audio demuxer (Audio only files)
tivo 33 TiVo demuxer (Demux streams from TiVo)
rtp 21 LIVE555 RTP demuxer (requires LIVE555 Streaming Media library)
lavf 35 libavformat demuxer (supports many formats, requires libavforma
t)
aac 39 AAC demuxer (Raw AAC files )

it looks ok to me so i dont understand why it wont work.

 
mattyb

Joined: 2005-07-04
Posts: 82
Posted: Sun, 2006-05-14 18:30

Something I can offer my two sense on?

I think I have mplayer1.0pre7 on my server. Valiant had a newer version but I am unable to update my server to a newer version. My version does not use -demuxer help.

I run on linux but I am almost positive that this module has been used on a win platform.

If you are trying to use those commands I assume you are trying to get it to recognize other mime types. The mime type module doesnt or at least it didnt properly register videos within gallery. They were hardcoded in. Since that was the case the types of files that gallery recognized as movies was in turn hardcoded into the mplayer module. It does not actually check to see what types of codecs your version of mplayer supports. If you need help hardcoding your particular modeule to support another codec let me know and I will help.

I currently have no plans of actually making mplayer check (for real) what codecs it can work with. Get back to me and Ill see what I can do.

Mattyb