I've got the latest ffmpeg windows binary installed, and the ffmpeg wrapper module correctly lists all the available codecs once I specify the path.

So, I'm trying to use Media Mover to convert videos to FLV. When trying to create my first configuration profile, I get the following error on the "video codec" dropdown, no matter what codec I select (and even without "Use advanced settings" checked):

An illegal choice has been detected. Please contact the site administrator.

Hence, I cannot even save my configuration at all.

Any suggestions? I have not tried it on our live server yet, but I've used ffmpeg with the FlashVideo module locally on Windows with no problems.

Thanks

Comments

arthurf’s picture

I think the problem is that some other form has a required field which is breaking things. You can't see the field as it's hidden in a fieldset I think. Can you poke around and see if that's the case?

jrefano’s picture

The field for video codec is the one that comes up highlighted in red, signifying the error. I don't think the offending field is hidden.

This is a fairly new Drupal installation (all I've really done is some very basic theming and installing of modules). If there's something specific you'd like me to check I certainly will, but to be honest, I'm not sure where to "poke around" at this point.

jrefano’s picture

Category: support » bug

Update:

I just uploaded and tested this on our live server running Red Hat, specified the ffmpeg path, and can easily create config profiles as advertised. There must be a bug here when working with ffmpeg binaries on Windows.

Here's the error from the log while running locally on windows, though not very illuminating:

Details
Type form
Date Monday, June 30, 2008 - 12:48
User admin
Location http://carbon/admin/media_mover/config/add
Referrer http://carbon/admin/media_mover/config/add
Message Illegal choice flv Flash Video in Video codec element.
Severity error
Hostname 127.0.0.1

arthurf’s picture

This is strange- I don't imagine that the windows vs linux would be an issue here, if ffmpeg_wrapper was reporting things right. What codec were you choosing?

jrefano’s picture

I think you should try it out on Windows with the latest binary I linked above. As reported above, the form will not validate with *any* video codec. I'm trying to choose flv (which is a choice), but again, none of them work.

On my Linux server this same exact drupal install, but with a linux compiled ffmpeg, the form passes validation without any problems.

arthurf’s picture

I don't have windows so sorry to make you my test case. It's really weird to me that this is happening- media mover doesn't actually do validation on that config, so it shouldn't do that. I'm not sure where the heck that is coming from. Would you mind looking at your logs and see if there is anything in there?

jrefano’s picture

The only mention of it in the log is what I posted above. Well, that and a similar entry for every video codec I attempted to choose (I tried them all), so it's definitely failing form validation for some reason, as it wont even let me save the configuration. I will gladly supply any other information you might find helpful.

After looking around some more,I found this in the log, but I'm not sure if it's related to this specific issue:

Type	php
Date	Monday, June 30, 2008 - 12:04
User	admin
Location	http://carbon/admin/settings/media_mover
Referrer	http://carbon/admin/media_mover/settings
Message	call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'media_mover_admin_settings' was given in C:\Documents and Settings\john\My Documents\canary\carbon\includes\form.inc on line 218.
Severity	error
Hostname	127.0.0.1
jrefano’s picture

Here's more examples of the log entry messages I'm getting:

Illegal choice flv Flash Video in Video codec element.
Illegal choice asv1 in Video codec element.
Illegal choice mpeg4 in Video codec element.
Illegal choice libx264 libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 in Video codec element.
Illegal choice mpeg2video MPEG-2 video in Video codec element.

Illegal choice libmp3lame libmp3lame MP3 (MPEG audio layer 3) in Audio codec element. (this one came when I tried to change the audio config from it's default)

etc....

I tried them all, and all are illegal choices which fail form validation.

arthurf’s picture

Wow. What's weird is that there is *no form validation* in that version. It was only introduced in the last few weeks, so I'm really surprised that it's happening. I think more likely, it's something that I'm doing with PHP that windows php does not like so much. Or there is maybe a module conflict?

My guess is that the forms_api is having a hard time with some of the trickery that I'm doing with how MMA builds form elements- there maybe something in the prefixing that i'm doing that causing the problem. If you're technically savy, try changing the line:

<?php
function media_mover_api_build_add_config( ..... 

... $action_form = media_mover_api_rename_form_keys($action_form, "{$verb}--{$module}--{$action_id}--" ); 
?>

Which will change how the form ids are prefixed.

arthurf’s picture

Have you run update.php? I'm betting you have a missing column

jrefano’s picture

Sorry I never responded to this. I switched to flashvideo for the project I was working on this time. I had of course run update.php -- and as I said before, everything worked on the actual server, just not on my local box. I'll try again on my next project and report back.

arthurf’s picture

Status: Active » Closed (fixed)