"Recipe" type aggregator for memcoder, ffmpeg, mp3gain etc.

Any other tech-related topics
Post Reply
Message
Author
User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

"Recipe" type aggregator for memcoder, ffmpeg, mp3gain etc.

#1 Post by Andrew Lee »

I find myself having to perform certain media operations from time-to-time eg.

- Losslessly concatenating a few video files
- Extracting audio track as MP3 from video files
- Normalizing the volume of a video file whose audio track is too soft

etc.

The tools I turn to are typically open-source CLI tools such as ffmpeg, memcoder, mp3gain, aacgain etc. Unfortunately, it is impossible to remember the syntax of these CLI tools, so every time I need to perform one of these operations, I need to search and find the right parameters to use. For tools like ffmpeg, there are different ways to perform the same task (eg. concat) under different situations (eg. lossless for media files with same encoding params, or lossy for media files with different encoding params).

I was wondering if there is a "recipe" type GUI app for these CLI tools. You can browse through these recipes in a listbox, which tells you in detail what each recipe does, the limitations or restrictions for the recipe, add files, set paramaters, show you what the final command line is, then run the command for you.

You can also create your own recipe (probably just a text file in a certain format) if what you want is not available.

I do use GUI tools like Handbrake or TEncoder, but I find them quite limited in functionality and options compared to CLI tools like ffmpeg, which can pretty much do anything.

billon
Posts: 843
Joined: Sat Jun 23, 2012 4:28 pm

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#2 Post by billon »

Maybe FFQueue or Avanti?

User avatar
smaragdus
Posts: 2120
Joined: Sat Jun 22, 2013 3:24 am
Location: Aeaea

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#3 Post by smaragdus »

@billon
Thanks for the tip about FFQueue- I didn't know about it. I did a short testing and besides powerful it seems portable too, I am surprised it hasn't been mentioned at the forum. I think FFQueue deserves to be reviewed here.

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#4 Post by Andrew Lee »

@billon: Thanks for FFQueue. Didn't know about it until you mentioned it. Avanti is nice too.

However, these apps are like TEncoder. They are not task-based but function-based, forcing one to think about all the parameters required when trying to do something.

What I have in mind is more task-based and exposing far less adjustable parameters. Sort of like the dummy's interface to ffmpeg/memcoder etc.

A mockup screenshot might help to illustrate what I have in mind. The task in the mockup (lossless concat of H264/AAC-encoded MP4 files) actually translates to the following commands:

Code: Select all

ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc output.mp4
What I do now is I record this in my note taker every time I encounter a useful recipe, but sometimes I get lazy and neglect to do it. This has happened so many times that I wonder if there is a better way.
Attachments
mockup.png

shnbwmn
Posts: 265
Joined: Sat Jul 11, 2015 12:59 am

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#5 Post by shnbwmn »

I swear I came across something like you're describing, but for the life of me I can't remember what it was called. I'll be sure to post here if I do manage to find that program.

Edit: take a look at FFE and Win-FF. FFE saves the presets in its INI file, while Win-FF has its own storing format (XML?), so FFE might be more what you're looking for. Plus it's also portable 8)

Image

Image

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#6 Post by webfork »

Andrew Lee wrote:Extracting audio track as MP3 from video files
Tencoder will extract audio well, including converting to MP3 if it started out as AAC or OGG. There's a bit about this over in the Lossless convert thread. I can put together a breakdown. Alternatively, Pazera's extractor works okay but isn't as up-to-date and I don't know if it has the best converters/encoders.

shnbwmn
Posts: 265
Joined: Sat Jul 11, 2015 12:59 am

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#7 Post by shnbwmn »

@Andrew Lee Thinking about this again, I completely forgot about mentioning VideoHelp. Have you looked there yet?

For instance, a casual browsing of the Video Encoders / Converters category brought AnotherGUI to my attention. It might be worth a look.
Videohelp (edited) wrote:AnotherGUI is a graphical front-end for audio/video command line converters (such as ffmpeg/ffmbc).

Main features:
  • parallel batch processing (better usage of multi-core/thread CPUs)
  • support of complex options in presets (compatible with studio and professional settings)
  • large support of audio/video converters
AnotherGUI is portable; no installation needed.

It requires Microsoft .NET 4.0 and the command line converter you need (like ffmpeg, ffmbc, libav, mencoder, handbrake, etc).
Image

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#8 Post by Andrew Lee »

To scratch my personal itch, I spent the last 2 weekends hacking together "Media Cookbook" using AutoIt.
screenshot.png
Technically, it is more like a batch file generator. It takes a bunch of input parameters and generate/execute a batch file called "_recipe.cmd", which can be further edited to suit one's needs.

The recipes are easy to muck around with, or new ones created (as long as you know a little bit of BASIC).

At its current state, this thing has almost no error checking and very few niceties (eg. the file list is strictly drag-and-drop and does not offer any functions for reordering or editing). But I am more than happy with it. I fully appreciate this app serves a much narrower purpose compared to some of the more powerful frontends out there. But like I said, it was to scratch a long-time personal itch. Hopefully a few of you out there might find it useful as well.

If you are interested in test-driving the packaged binaries, you can download V0.1.1 from here (updated 11 Sep 2016)

The full source code is available at Github.

Specular
Posts: 443
Joined: Sun Feb 16, 2014 10:54 pm

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#9 Post by Specular »

Andrew Lee wrote:To scratch my personal itch, I spent the last 2 weekends hacking together "Media Cookbook" using AutoIt.
screenshot.png
Technically, it is more like a batch file generator. It takes a bunch of input parameters and generate/execute a batch file called "_recipe.cmd", which can be further edited to suit one's needs.

If you are interested in test-driving the packaged binaries, you can download V0.1.0 from here.

The full source code is available at Github.
I really like this idea, will have to muck around with it later. BTW have you thought of adding the binaries to the Github Releases tab? Also I'm assuming it's portable.

As for my existing solution for ffmpeg and other CLIs I keep a text file for each with single line 'recipes' as you call them, along with a short description of what they do. This idea of a manager for whole tasks (essentially a UI for batch scripts from what you've made) rather than just front-ends for specific programs is a nice idea.

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain e

#10 Post by Andrew Lee »

I really like this idea, will have to muck around with it later. BTW have you thought of adding the binaries to the Github Releases tab?
I am unsure about that, because I have also included my version of binaries of ffmpeg, mp3gain etc. in the 7z archive for the downloader's convenience (although the source URLs are clearly indicated in their respective subdirectories in "@source.txt"), I'm not sure if github would accept it.

Anyway, it's really easy to build your own (this is AutoIt you know, not Visual Studio). Just make sure you have AutoIt installed. Download the source files, run "package.cmd" and you have the EXE (you can even run mcookbook.au3 directly without building the EXE). Then download the various binaries for ffmpeg, mp3gain etc. and unzip.
Also I'm assuming it's portable.
You bet!
As for my existing solution for ffmpeg and other CLIs I keep a text file for each with single line 'recipes' as you call them, along with a short description of what they do. This idea of a manager for whole tasks (essentially a UI for batch scripts from what you've made) rather than just front-ends for specific programs is a nice idea.
I sorta do that too (but with doskey macros), but you can't work on a subset of files without moving them to another subdirectory; drag-and-drop is just so much more convenient. :D

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain etc.

#11 Post by vevy »

Hey Andrew, I like the concept of this app and I have always wanted a kind of "batch file manager", where you can have a list (or a tree) of your batch files on the left and you can search, edit, and run them, maybe even drag and drop files on them.

Could Media Cookbook evolve into something like this? Obviously something like editing is a whole project on its own, so it can simply be a button to open the script in a predefined editor.

What do you think? 💡

User avatar
Andrew Lee
Posts: 3048
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain etc.

#12 Post by Andrew Lee »

vevy wrote: Tue Nov 17, 2020 10:35 am Hey Andrew, I like the concept of this app and I have always wanted a kind of "batch file manager", where you can have a list (or a tree) of your batch files on the left and you can search, edit, and run them, maybe even drag and drop files on them.

Could Media Cookbook evolve into something like this? Obviously something like editing is a whole project on its own, so it can simply be a button to open the script in a predefined editor.

What do you think? 💡
Though I am still using Media Cookbook atm, I have plans for something better, so I won't be working on it further.

The reason is because GUI code has too much overhead, and it takes an unreasonable amount of effort to add simple enhancements or new recipes.

The idea I have is to write a Python script to achieve a few things:

1) Recipes in a single INI file

2) Automatically convert long filenames to short ones, process and convert back to long filenames again. This is for CLIs lke Windows version of ffmpeg that doesn't work with long filenames very well.

3) Automatically handle batch-processing with wildcards. This is for CLIs that doesn't do wildcard batch processing on their own (again, eg. ffmpeg).

So I can do for example:

cookbook -recipe to_mp4_lossless *.avi ("cookbook" is my python scipt, "convert_mp4_lossless" is the recipe name)

The INI section will look like:

[to_mp4_lossless]
cmd = ffmpeg -fflags +nofillin -i i<infile1> -c copy <@infile1.mp4>


and the script will automatically do all the magic for me without writing a pseudo batch file like Media Cookbook requires with each new recipe.

It should also be able to handle multiple input parameters (Media Cookbook can't do that right now), maybe even recipe chaining.

It seems obvious to me all this extra functionality will be much much easier to implement in Python + CLI, instead of drag-and-drop GUI.

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain etc.

#13 Post by vevy »

It is actually further from what I wanted but still sounds useful. You can do similar things with batch files (usually one for each recipe), although it is not gonna be one-liners!

thepiney
Posts: 161
Joined: Wed Aug 31, 2011 11:57 am

Re: "Recipe" type aggregator for memcoder, ffmpeg, mp3gain etc.

#14 Post by thepiney »

Read this post earlier and while checking my email I run across this --> https://www.howtogeek.com/700045/how-to ... g-winstall

It's not quite the same but it does create a script that can be used to install apps in Windows 10 PowerShell.

Post Reply