If execute media_mover or generating FLV from AVI i recive:

warning: filesize() [function.filesize]: stat failed for files/media_mover/ffmpeg/converted/6/rf.avi.flv in /data01/htdocs/video/sites/all/modules/media_mover/mm_node/mm_node.module on line 342.

If execute the generation of thumbnail there are not problem.

Tks

Comments

arthurf’s picture

Status: Active » Postponed (maintainer needs more info)

I think what's happening is the convert was failing- did you see any errors in the logs to that effect?

antoniotorres’s picture

I'm having the same issue. clueless. The logs say that the convert happened and it assumes the file was put in place, from what I gather.

antoniotorres’s picture

StatusFileSize
new85.78 KB
new46.63 KB

took a screenshot, don't know if it'll help

edit: It claims it did it but the flv is never dropped off on the encoded folder, attached another screenshot.

please help.

edit2: manual ffmpeg encodes work perfectly.

arthurf’s picture

@chubakkaz can you give me the log info of where it says it converted the file?

antoniotorres’s picture

StatusFileSize
new43.91 KB
mm_ffmpeg converted this file: files/media_mover/ffmpeg/converted/3/trn_parallel_25_adj.mpg_1.mpeg.flv
ffmpeg ran this command:
-i 'files/trn_parallel_25_adj.mpg_1.mpeg' -acodec mp3 'files/media_mover/ffmpeg/converted/3/trn_parallel_25_adj.mpg_1.mpeg.flv'

also attached a screenshot, thanks so much for the help.

arthurf’s picture

@chubakkaz

can you run this command from the root of your drupal installation:

ffmpeg -i 'files/trn_parallel_25_adj.mpg_1.mpeg' -acodec mp3
'files/media_mover/ffmpeg/converted/3/trn_parallel_25_adj.mpg_1.mpeg.flv'

thanks

antoniotorres’s picture

[root]# ffmpeg -i 'files/trn_parallel_25_adj.mpg_1.mpeg' -acodec mp3 'files/media_mover/ffmpeg/converted/3/trn_parallel_25_adj.mpg_1.mpeg.flv'
FFmpeg version SVN-r14883, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: 
  libavutil     49.10. 0 / 49.10. 0
  libavcodec    51.69. 0 / 51.69. 0
  libavformat   52.20. 0 / 52.20. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  built on Aug 21 2008 07:30:24, gcc: 4.1.2 20070626 (Red Hat 4.1.2-14)
Input #0, mpeg, from 'files/trn_parallel_25_adj.mpg_1.mpeg':
  Duration: 00:00:06.53, start: 0.340044, bitrate: 1449 kb/s
    Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 320x120 [PAR 1:1 DAR 8:3], 104857 kb/s, 30.00 tb(r)
    Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, s16, 224 kb/s
Unknown encoder 'mp3'

Interesting!

arthurf’s picture

Ok, so the problem is that you need the lamemp3 codec, not the mp3 codec. Give that a shot.

antoniotorres’s picture

I'm not sure I understand what your suggestion was, that's the command that media mover used, do you want me to try with lamemp3 isntead of mp3?

edit: I tried running the command without -acodec altogether and it worked perfectly, sound and everything, can I somehow make media mover encode without the -acodec option?

antoniotorres’s picture

Status: Postponed (maintainer needs more info) » Postponed

I commented out the codec line altogether and they encode just fine with the defaults. everything is fine or now.

thanks for the help so far arthur.

arthurf’s picture

Status: Postponed » Needs review

If you don't use the "advanced audio settings" it doesn't try to force the audio, or just don't select an audio codec. This will work most of the time, but not all of the time- the problem is that there are so darn many video formats... anyway, on the CVS version of ffmpeg_wrapper, there is now a "choose codec" option which will prevent the -acodec (or -vcodec) from getting issued.

janusman’s picture

I'm also getting this problem... I'm running Windows Vista, XAMPP-lite, Drupal 5 (duh).

I found that one problem under windows is having single quotes in the command options; Windows likes them to be double quotes.

Having fixed that, this command fails to run under Drupal but works fine when run from the Drupal install directory.

"C:\Program Files\ffmpeg\ffmpeg" -i "sites\default\files\107_0750_0.AVI" -acodec libmp3lame -ar 22050 -ab 32 -vcodec flv -s 320x240 -b 50k -r 25 "sites\default\files\media_mover\ffmpeg\converted\1\107_0750_0.AVI.swf"

Watchdog reports the dreaded error...

filesize() [function.filesize]: stat failed for sites/default/files/media_mover/ffmpeg/converted/1/107_0750_0.AVI.swf in E:\UV-L00329342\Laboral\xampplite\htdocs\d5\sites\default\modules\media_mover\mm_node\mm_node.module on line 370.

There are no files in that directory after running my media mover configuration #1, and yes, it does appear there after running the command manually from the Windows command prompt.

Any pointers? =)

janusman’s picture

I think I solved this, 2 ways:
(I'm running under XAMPP in Windows)
1) Copy the ffmpeg.exe to the Drupal installation dir (e.g. c:\xampp\htdocs\ffmpeg.exe) and change the path to ffmpeg to just be "ffmpeg" in the ffmpeg_wrapper module config.
2) Change the code in ffmpeg_wrapper module so the command has double quotes instead of single quotes, with a $command = str_replace("'", '"', $command);

I should probably open up an issue for the ffmpeg_wrapper project =)

delykj’s picture

Or change:
$options[] = "-i '". $input_file ."'";
into:
$options[] = "-i ". escapeshellarg($input_file);

and change:
$options[] = "'". $output_file ."'";
into:
$options[] = escapeshellarg($output_file);

arthurf’s picture

This is now committed to CVS. I also applied this to the custom ffmpeg arugment as well. Thanks for the information- I didn't realize that windows functioned this way. Please give things a test and let me know if it's working.

osopolar’s picture

Status: Needs review » Closed (fixed)

Committed and fixed, I guess.