Jump to content

ffe


corz
 Share

Recommended Posts

ffe..

Posted Image

I did this a while back for someone who needed a load of youTube (FLV) videos converted. Since then I spruced it up a bit, and find myself using it steady, so I figured someone else might also find it useful. Obviously you need an ffmpeg binary to be a front-end for; Google will sort you out with that.

What is ffe?

ffe is a simple Windows® front-end for ffmpeg, designed for rapid testing

of its various multimedia conversion parameters, enabling you to save lots of slightly

different versions of a file very, very quickly; in other words, "finding the best settings".

ffmpeg, by Fabrice Bellard, et al., is a quite incredible multimedia converter, capable

of converting a vast number of input and output media formats, and depending on

which binary you use, supports either a HUGE number of control parameters, or a

REALLY HUGE number of control parameters.

ffe uniquely uses MATOF technology to automatically update output filenames to match

your encoding parameters; you can tweak-and-go without worrying about obliterating

your previous tests.

You can basically convert anything to anything, whilst doing crazy stuff like mixing MP3

audio tracks with H264 video, and adding ID3 tags to AVI files. Big fun. Of course, it

allows you do do things the correct way, too. No limits. I find it very handly for

converting FLV files, and the raw video from my camera.

While converting, the output from ffmpeg can be viewed live inside ffe, and when complete,

the entire process log is available for viewing/searching.

I put up a wee page about it, here.

ffe is fairly rudimentary, but pretty handy. There's a ready-built exe, with all the icons and ini file and what-not inside, and a source pack, with all the extras you need to build it yourself. Grab either or both, here.

Have fun!

;o)

(or

[edit - oops! screenshot was linked to my local dev mirror!]

Edited by corz

nothing is foolproof to the sufficiently talented fool..

Link to comment
Share on other sites

Very nice! Your site is great, by the way. You're pretty funny :)

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

Heh, cheers!

By the way, did it work?

;o)

(or

Yes, it did. Very good idea here! The console output really helps.

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

Really like it.

I'd like to implement a conversion technique into a script, can you give me a quick example on how to convert from .flv to .mp3? I'm having lots of trouble following your script :)

$args = $ffmpeg_loc & " " & GUICtrlRead($in_input_params) &  " -i " & """" & $infile & """" & $v_codec & _
                                " " & $a_codec & " " & $out_args & " " & """" & $matof_outfile & """"

Any help is appeciated!

Thanks,

Kurt

Awaiting Diablo III..

Link to comment
Share on other sites

Yup, sandman, I've already pointed someone else looking to integrate console output into their script, to this page. That was the main reason I did it, really; converting the video for my mate was just a convenient excuse. I wanted to get some experience sending stuff to and from another exe, handy skills for quick front-ends. Note you can hit "q" to abort in mid-process. Pretty neat.

One big foible of ffe, is that it's intuitive to hit <enter> after entering text in the find input, but <enter> is the HotKey for the encoding process! Sorree. I should probably disable that while the find input is visible (the find was tacked on at the last minute, mainly for the built-in man page/help file). But then, like any application, the longer you look at it, the more you can see could be done. In the end it's like art; you never finish applications, you abandon them.*

Ho Hum.

_Kurt, I'm not exactly certain what the code you posted has to do with your FLV>MP3 issue, which is almost certainly at the user-input end of things. Download the exe, or compile as-is, and launch..

You are trying to convert an FLV video, to an MP3 audio track (I'm assuming you don't want the video track), right? Like this..

* Browse for the source flv file (using the cute folder button)

* Disable MATOF (which is for doing many-many video tests in a hurry - I could make it audio-only-aware, I guess, hmm)..

* Give your output file an ".mp3" extension. <- that's the key!

* Select mp3 as your audio codec. <- and that.

* In the extra parameters input, put "-vn" (no quotes), which disables video output. <- and that!

* Click "do it NOW!"

TADA!

;o)

(or

* Or keep updating them, for ever...

Edited by corz

nothing is foolproof to the sufficiently talented fool..

Link to comment
Share on other sites

By the way, if you want to update the MATOF capability to also sense the audio codecs (and switch to audio file extensions when "-vn" is detected in the extra parameters), you go right ahead!

But do share the code!

;o)

(or

nothing is foolproof to the sufficiently talented fool..

Link to comment
Share on other sites

Too late!

I had a look inside the source, and if you look at the FillOutputFile() function, you'll see that there is another version FillOutputFile2() right above it. It's not like me to leave old functions lying around; but it looks like I was considering some sort of filetype-contitional MATOF functionality, but didn't get back to that. Probably because that's not the place for it. GetExtFromCodec() is.

Here's an improved GetExtFromCodec() function that will do all you need..

; check for correct extension (by codec)..
;
func GetExtFromCodec($v_codec)

    switch $v_codec
        case $v_codec = "copy"
            $this_ext = GetExtension($infile)

        case $v_codec = "flv"
            $this_ext = "flv"

        case $v_codec = "mpegvideo", "mpeg1video", "mpeg2video"
            $this_ext = "mpg"

        case $v_codec = "flic"
            $this_ext = "flc"

        case $v_codec = "wmv1", "wmv2"
            $this_ext = "wmv"

        case $v_codec = "msmpeg4v2", "mpeg4"
            $this_ext = "mp4"

        case else
            $this_ext = "avi"
    endswitch

    if StringInStr(GUICtrlRead($in_raw_params), "-vn") then
        switch GUICtrlRead($combo_a_codec)
            case 'flac'
                $this_ext = 'fla'
            case 'mp3'
                $this_ext = 'mp3'
        endswitch
    endif

    return $this_ext
endfunc

With this in place, all you need to do is put -vn in the extra parameters, and ffe will use MATOF to automatically give the output file an mp3 extension. It could easily be expanded to other audio types. I'll likely add this to the main source sometime soon.

for now..

;o)

(or

Edited by corz

nothing is foolproof to the sufficiently talented fool..

Link to comment
Share on other sites

When I got some time today, I went back and added these changes proper..

changes..       [since release]

    0.7.9

    *   Improved the gui automation for single track conversions, and removed
        the need for either the -an or -vn switches - simply select the item
        in the drop-down (the item containing the word, "disabled").

    *   moved img/icons/ to icons/ - there are no other images in this program
        if you are upgrading your source, remember to move your icons up ../

    0.7.8
    
    *   Expanded the audio and video track disable functionality; you can now 
        use the "disable video" option in the codec dropdown (there's also one 
        for disable audio) which will add/remove the correct switches from the 
        parameters, and enable/disble the correct properties and MATOF string.

        It's trivially easy to rip either the video track or audio track from a 
        piece of video, and convert it in the process, too.

        NOTE:   The "quick config types" (which are native to ffmpeg) will still 
                override any of these settings.

        
    *   Added more extension types to the mix, and improved some legacy code (a 
        nice way of saying it was shite before)


    *   Decreased the minimum height - folks that don't use the console output 
        can have a neater looking window.

    0.7.7

    *   MATOF now senses when you've added the -vn (no video) switch, and gives 
        the output file an audio extension, instead. It gets the extension from 
        whichever audio codec you have selected.

    *   This makes it very simple to do video >> audio conversions.

So basically, you can leave MATOF enabled, and ffe will switch extensions automatically if you choose either of the "disable" options, and also if manually add the switches to the extra parameters. ffe will also remove extraneous elements from the MATOF, like "[mp3]", when it's an audio-only conversion (and the extension will be .mp3, anyway - there's no need to add it again into the output filename)

Links in the first post will always be for the latest version.

By the way, don't forget, you can drag-and-drop files onto the input to automatically add them (I forgot myself!)

;o)

(or

nothing is foolproof to the sufficiently talented fool..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...