On running the cron, the log says that it has successfully converted the file but its no where to be found in the directory it specifies...tho it fails to create a thumbnail.


mm_ffmpeg converted this file: files/media_mover/ffmpeg/converted/1/issue3.avi.flv
ffmpeg ran this command:
-i 'files/issue3.avi' -acodec mp3 'files/media_mover/ffmpeg/converted/1/issue3.avi.flv'

Comments

arthurf’s picture

Can you try selecting the audio codec liblamemp3 ? I think it's not happy about the mp3 codec

jordanmagnuson’s picture

I'm having this same issue. I set up a configuration to harvest from a local directory, convert the video, and then save to a local directory. When I run the configuration Media Mover tells me:

Harvesting....
Configurationg process: harvest found 1 files
Configuration process: process is acting on 1 files
Configuration process: storage is acting on 1 files
Configuration process: complete is acting on 1 files

But I get this warning above from drupal:

warning: copy(files/media_mover/ffmpeg/converted/6/redblue.avi.avi) [function.copy]: failed to open stream: No such file or directory in C:\xampp\htdocs\mbi\sites\all\modules\drupal-contrib\media_mover\contrib\mm_dir\mm_dir.module on line 276.

The issue seems to be that there is no converted video in files/media_mover/ffmpeg/converted/6/ (indeed the case when I check). I have tried converting from .avi and .wmv, and converting to .flv and .avi, and nothing works. I have also tried storing the converted file as a node, but still no luck. (I also tried using the liblamemp3 codec when converting to .flv as you suggested Arthur).

Here's my log:

Message 1:

Type media_mover
Date Monday, August 18, 2008 - 07:14
User davidlerin
Location http://localhost/mbi/admin/media_mover/config/4/run
Referrer http://localhost/mbi/admin/media_mover
Message mm_ffmpeg converted this file: files/media_mover/ffmpeg/converted/4/redblue.avi.flv
ffmpeg ran this command:
-i 'files/test_input/redblue.avi' -acodec libmp3lame -ar 22050 -ab 16 -vcodec flv -s 128x96 -b 50k -r 25 'files/media_mover/ffmpeg/converted/4/redblue.avi.flv'
Severity notice
Hostname 127.0.0.1

Message 2:

Type php
Date Monday, August 18, 2008 - 07:14
User davidlerin
Location http://localhost/mbi/admin/media_mover/config/4/run
Referrer http://localhost/mbi/admin/media_mover
Message copy(files/media_mover/ffmpeg/converted/4/redblue.avi.flv) [function.copy]: failed to open stream: No such file or directory in C:\xampp\htdocs\mbi\sites\all\modules\drupal-contrib\media_mover\contrib\mm_dir\mm_dir.module on line 276.
Severity error
Hostname 127.0.0.1

Any help would be much appreciated, thanks!

jordanmagnuson’s picture

Thought I should perhaps note my ffmpeg version info as well:

FFmpeg version SVN-r13118, Copyright (c) 2000-2008 Fabrice Bellard, et al. configuration: --enable-memalign-hack --enable-postproc --enable-swscale --enable-gpl --enable-liba52 --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libxvid --enable-libx264 --disable-ffserver --enable-avisynth --enable-pthreads --enable-shared --disable-static libavutil version: 49.6.0 libavcodec version: 51.56.0 libavformat version: 52.13.0 libavdevice version: 52.0.0 built on May 11 2008 23:16:13, gcc: 4.2.3 c:/msys/local/bin/ffmpeg.exe: missing argument for option '-v'

I'm afraid I don't know a whole lot when it comes to ffmpeg... could "c:/msys/local/bin/ffmpeg.exe: missing argument for option '-v' " be the problem? I am running ffmpeg r13118 pre-compiled for win32.

Thanks again,

Jordan

arthurf’s picture

can you run

#ffmpeg -i 'files/test_input/redblue.avi' -acodec libmp3lame -ar 22050 -ab 16 -vcodec flv -s 128x96 -b 50k -r 25 'files/media_mover/ffmpeg/converted/4/redblue.avi.flv'

from your drupal root? I'm guessing the audio settings are the problem, but let's see if it can convert

jordanmagnuson’s picture

Thanks for the fast reply Arthur! Okay. I tried converting 2 files from drupal root with the command you gave me, one a small avi without sound, and one a larger wmv with sound. Both files seemed to convert fine, but I did get a couple of warnings. Here's what the command prompt gave me:

FFmpeg version SVN-r13118, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-memalign-hack --enable-postproc --enable-swscale --ena
ble-gpl --enable-liba52 --enable-libfaac --enable-libfaad --enable-libmp3lame --
enable-libvorbis --enable-libtheora --enable-libxvid --enable-libx264 --disable-
ffserver --enable-avisynth --enable-pthreads --enable-shared --disable-static
  libavutil version: 49.6.0
  libavcodec version: 51.56.0
  libavformat version: 52.13.0
  libavdevice version: 52.0.0
  built on May 11 2008 23:16:13, gcc: 4.2.3
[mpeg4 @ 6C184E10]frame skip 8

Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (300
00/1) -> 30.00 (30/1)
Input #0, avi, from 'redblue.avi':
  Duration: 00:00:01.00, start: 0.000000, bitrate: 2031 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 320x240 [PAR 1:1 DAR 4:3], 30.00 tb(r)
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not
kbits/s
Output #0, flv, to 'files/media_mover/ffmpeg/converted/4/redblue.avi.flv':
    Stream #0.0: Video: flv, yuv420p, 128x96 [PAR 1:1 DAR 4:3], q=2-31, 50 kb/s,
 25.00 tb(c)
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
[mpeg4 @ 6C184E10]frame skip 8
frame=   26 fps=  0 q=21.3 Lsize=      30kB time=1.0 bitrate= 236.7kbits/s
video:25kB audio:0kB global headers:0kB muxing overhead 20.939465%

And for the second file, wmv with sound:

FFmpeg version SVN-r13118, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --enable-memalign-hack --enable-postproc --enable-swscale --ena
ble-gpl --enable-liba52 --enable-libfaac --enable-libfaad --enable-libmp3lame --
enable-libvorbis --enable-libtheora --enable-libxvid --enable-libx264 --disable-
ffserver --enable-avisynth --enable-pthreads --enable-shared --disable-static
  libavutil version: 49.6.0
  libavcodec version: 51.56.0
  libavformat version: 52.13.0
  libavdevice version: 52.0.0
  built on May 11 2008 23:16:13, gcc: 4.2.3
[wmv3 @ 6C184E10]Extra data: 8 bits left, value: 0

Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000
/1) -> 15.00 (15/1)
Input #0, asf, from 'session1.3.wmv':
  Duration: 00:09:31.52, start: 5.000000, bitrate: 155 kb/s
    Stream #0.0: Audio: wmav2, 16000 Hz, mono, 16 kb/s
    Stream #0.1: Video: wmv3, yuv420p, 320x240, 134 kb/s, 15.00 tb(r)
WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not
kbits/s
Output #0, flv, to 'files/media_mover/ffmpeg/converted/4/session1.3.wmv.flv':
    Stream #0.0: Video: flv, yuv420p, 128x96, q=2-31, 50 kb/s, 25.00 tb(c)
    Stream #0.1: Audio: libmp3lame, 22050 Hz, mono, 0 kb/s
Stream mapping:
  Stream #0.1 -> #0.0
  Stream #0.0 -> #0.1
[wmv3 @ 6C184E10]Extra data: 8 bits left, value: 0
Press [q] to stop encoding
frame=14317 fps=816 q=3.5 Lsize=    6650kB time=572.7 bitrate=  95.1kbits/s
video:2123kB audio:2238kB global headers:0kB muxing overhead 52.513496%
jordanmagnuson’s picture

Version: 5.x-0.4-1 » 5.x-1.0-alpha3

Oops -- sorry, I am using Media Mover 5.x-1.0-alpha1, and FFMpeg Wrapper 5.x-1.0-alpha1.

jordanmagnuson’s picture

Any ideas on a fix Arthur? I am in fairly urgent need of this module, so I really appreciate your help! Thanks again,

Jordan

arthurf’s picture

Ah, it looks to me like -b 50k is the issue. Can you either remove that, or up the value to 500 or so?

jordanmagnuson’s picture

Thanks Arthur! That put me on the right track: it turns out that that problem is the -ab 16, which I take it is the audio bit rate? I changed that to -ab 16k and everything worked without any warnings. I messed around, and discovered that anything from 1k up works without a warning, but anything lower (including -ab 999) produces a warning (it still converts the video okay from the command prompt, but I take it the warning is why media mover is not converting the file?)

The problem is when I select any of the audio bit rates in Media Mover (1k to 256k), when I look at the ffmpeg command in the log files, the 'k' is never there: it's always -ab 16 (for 16k) or -ab 256 (for 256k).

So I thought I could use the custom ffmpeg command box and run:

-i %in_file -acodec libmp3lame -ar 22050 -ab 16k -vcodec flv -s 128x96 -b 50k -r 25 %out_file

However, this didn't work either, and when I looked at the log it showed that the ffmpeg command run was:

-i n_file -acodec libmp3lame -ar 22050 -ab 16k -vcodec flv -s 128x96 -b 50k -r 25 0ut_file

Which is odd, because normally it shows the command with the actual file paths there, not 'n_file' and 'out_file'. It seems that the %in_file and %out_file tags did not work properly, as it should have said that this command was run:

-i 'files/test_input/redblue.avi' -acodec libmp3lame -ar 22050 -ab 16k -vcodec flv -s 128x96 -b 50k -r 25 'files/media_mover/ffmpeg/converted/12/redblue.avi.flv'

I hope I've been coherent with all this! Please let me know if you need me to explain anything better. Otherwise, is there any hope to finding a solution here?

Thanks always!

Jordan

arthurf’s picture

Ok, that's interesting. This might be a change in ffmpeg. I'll have to check on my other machine to confirm that. As per the custom command- that was fixed recently, I think it hasn't made it to the forthcoming alpha4 which should be out shortly. I'll take a look at fixing the ffmpeg commands for that release as well.

jordanmagnuson’s picture

Thanks a lot Arthur! Please let me know when an update is ready to try!

jordanmagnuson’s picture

Hi Arthur, just wondering: do you have any rough estimate for when a fix might be available for this issue? I totally understand if you're swamped right now: it's just that I've got a deadline coming up for a big project I'm working on, and need to know whether I'll be able to use this module, or if I need to look for alternatives. That being said, do you know of any alternatives out there? I haven't found any Drupal modules that have anywhere near the same functionality as Media Mover.

If you have a fix for this anywhere close to being done, I would be willing to pay you to work on it. Feel free to email a quote to me at jm.magnuson@gmail.com.

Thanks!

jordanmagnuson’s picture

Great news: custom FFMPEG commands are now working--which means that I can get video converted!

Slightly bad news: only custom commands are working. If I don't use a custom command, I still have this problem, and the video fails to convert:

The problem is when I select any of the audio bit rates in Media Mover (1k to 256k), when I look at the ffmpeg command in the log files, the 'k' is never there: it's always -ab 16 (for 16k) or -ab 256 (for 256k).

The main issue is resolved though, thanks to the custom commands working -- thanks a lot Arthur!

arthurf’s picture

Ok, I'm going to put the k's into the ffmpeg_wrapper form- will require updating your ffmpeg_wrapper module and the configuration that you're currently using. Hopefully this will nip this issue in the bud!

arthurf’s picture

Project: Media Mover » FFmpeg Wrapper
Version: 5.x-1.0-alpha3 » 5.x-1.0-alpha1
Status: Active » Postponed (maintainer needs more info)

Switched the project to ffmpeg. ks are now in the form, should hopefully solve the issue.