I desperately need a module/patch or any other solutions that are able to help me converting and injecting metadata into the flv files. using ffmpeg_converter.module that requires ffmpeg_wrapper.module to do the job, I like how thin and easy both modules are.
according to my own research, there's only flvtool2 to do the work. i only need to insert an additional command to the ffmpeg command line when converting the file. e.g.
ffmpeg -i %in_file -ar 64 -ab 44.1 -f flv -s 704×576 – | flvtool2 -U stdin %out_file
so my problem is, i can't insert any pipe '|' inside the custom command field.
arthurf, the maintainer for ffmpeg_wrapper.module, suggested to look at the mm_flvtool2 (which is for media_mover). I'm totally blank when I look at the codes there.. as I'm still at my learning stage with Drupal (hook and all).
I hope that someone here could lend me a hand to help me with this.
Comments
mm_flvtool2
There is a media mover module which can do this, but of course, not everybody needs media mover. I'd be willing to remove the | restriction from ffmpeg_wrapper and/or modify the flvtool2 module to be an API module which ffmpeg wrapper can push content through. Any thoughts?
a.
http://24b6.net
hi arthurf, thanks for the
hi arthurf,
thanks for the help. appreciate it so much.
tho I prefer it this way, I'm not sure how critical will the security issues be if pipe | restriction been removed. but modifying flvtool2 module to be an API module for ffmpeg_wrapper is good for others who doesn't need it.
IMHO, I think flvtool2 should be a ready option for ffmpeg_wrapper.module (at least as a plugin) since a converted FLV file should have metadata in it.
pipe and security
While I don't really like people being able to have full control of the command line, because the custom command only allows you to add arguments, it seems like an obvious improvement to allow for it- also makes it easier to integrate with other tools I'd imagine.
I think what I'm going to do is pull the Media Mover functionality out of mm_flvtool2 and place this in mm_ffmpeg as an add on. I'll take the API stuff from mm_flvtool2 and make it an api module.
I'll see what I can do about creating a hook for ffmpeg_wrapper, but I'm betting it'd be easier for folks to just us a pipe. Would you be willing to write up a post about how to implement flvtool2 with ffmpeg_wrapper ?
http://24b6.net
do you mean How-to guide? Tho
do you mean How-to guide? Tho it will be my first time.. then yes. I'm more than excited doing it. ;D
arthurf, i realised you'd
arthurf, i realised you'd removed the pipe restriction on the dev version. (or at least, i don't see the help-text mentioning the pipe anymore.)
but when i tried uploading video files, nothing happen. file is still not converting, which will only display a notice of it is still waiting to be converted.
Stuck at ffmpeg?
Is the file not converting in ffmpeg at all? Anything in your logs of note?
http://24b6.net
mm_flvtool2
FYI, I've updated the mm_flvtool2 module- there is a 6.1 branch now. This now depends on the flvtool2_api module (only in CVS right now). Both have not been tested, but I'm moving toward getting them working better.
http://24b6.net
arthurf, i actually tested
arthurf, i actually tested the ffmpeg_wrapper.module only. i haven't check out the mm_flvtool2 since i don't use mediamover.module at all (tested it, but there're too much bugs).
do i have to install mediamover or mm_flvtool2 is no longer depending on it anymore?
yes, it is not converting at
yes, it is not converting at all whenever i enable the custom command field. here's the log entry:
Conversion of /tmp/179-1_230.flv failed ...
message:
Conversion of /tmp/179-1_230.flv failed unexpectedly. The command was: -i files/video/179-1_230.mov -ar 64 -ab 44.1 -f flv -s 704×576 – | flvtool2 -U stdin /tmp/179-1_230.flv
it will be back to normal (but without controlbar) once i disable it.
Path to flvtool 2?
Can you try the above command with a path to flvtool2 on the commandline- also, can you try to simplify your command first and then add things in to figure out where it's breaking?
http://24b6.net
Not directly related, but
Not directly related, but does anyone know where I can find documentation for using FFMPEG's -copyright to insert a copyright string?
@arthurf afer testing and
@arthurf
afer testing and trying several custom commands, all of them works except if I place the '| flvtool2'. Whether it is full path or not, with the '| flvtool2' command just doesn't work.
works:
-i %in_file %out_file
-i %in_file -ab 64 -ar 44100 -b 1000 -r 29 -nr 1000 -g 500 -s 704:576 -qmax 2 -f flv %out_file
doesn't work:
-i %in_file | /usr/bin/flvtool2 -U stdin %out_file
-i %in_file -f flv - | /usr/bin/flvtool2 -U stdin %out_file
-i %in_file -f flv %out_file | /usr/bin/flvtool2 -U stdin %out_file
-i %in_file -ab 64 -ar 44100 -b 1000 -r 29 -nr 1000 -g 500 -s 704:576 -qmax 2 -f flv - | /usr/bin/flvtool2 -U stdin %out_file
the file is not converting at all. FYI, I can run those commands with flvtool2 on shell.