FFmpeg 0.5 14/07/13 GUI, Batch converting, Metadata analysis

Discuss and share scripts and script files...
Post Reply
40k
Posts: 234
Joined: 09 Dec 2011 21:25

FFmpeg 0.5 14/07/13 GUI, Batch converting, Metadata analysis

Post by 40k »

FFmpeg 0.5 - GUI, Batch converting, Meta data analysis
FFmpeg 0.5.xys
(13.96 KiB) Downloaded 551 times
Get FFmpeg 0.5 from Pastebin

To use the script you will require:

1. Xyplorer 7.0 or later
2. FFmpeg and FFprobe. - http://ffmpeg.zeranoe.com/builds/
Any version should work. This link hosts the official Windows builds of the FFmpeg team. FFmpeg is 100% free software
Once you extract the zip file, you will find the ffmpeg.exe and ffprobe.exe in the "bin" folder

How to use:

1. Place FFmpeg.xys into the <xypath>\Data\Scripts folder
2. Create a catalog entry to load the script or make your own toolbar button
3. Select the files you want to use FFmpeg on.
4. With those files selected run the script and choose from one of the script functions

CURRENT VERSION: 0.5
Changelog:

Code: Select all

+ NEW script function "List selection Metadata"
  Displays all relevant media file meta data on the currently selected media files
  See example dump lower in this post
* Cleaned up certain subroutines
Image

Script Functions:

Code: Select all

1. List selection Metadata
   Analyze selected media files and display relevant information in a text box

2. Render selection - Specify bit rate
   All selected files are converted to the file format you with options you specified.

3. Render selection - Copy bit rate
   All selected files are converted using the exact same bitrate as the original file. This is useful to quickly convert a number of audio of video files to another codec without dramatically changing the file size

4. Books - Rename
   This renames all audio files in an audio book folder selected provided the folder is named "Writer - Title"
   example:

   Folder name: Dan Brown - Da Vinci Code
   001 Dan Brown - Da Vinci Code.mp3
   002 Dan Brown - Da Vinci Code.mp3
   003 Dan Brown - Da Vinci Code.mp3
   etc...

5. Books - Convert
   This function is rather complicated and was written for personal use but I'm including it anyway.
   Basically, this function will convert all files in an audio book folder to the .m4a format. This format is used by Apple on their iOS devices. If you replace the .m4a extension with .m4b, Your iPod/iPhone will recognize the files as an audiobook in your media library. Additionally, the bitrate of the original file is maintain so no bloating happens.

6. Edit Configuration
   Launches the automated configuration wizard   
This script serves as a front end GUI for the powerful FFmpeg package. FFmpeg is able to convert media files of all types to another type. It can also be used to add, remove, or extract audio or video, meta data, split media files, and many more things. The utility has no native GUI which can be a problem for new users. However, due to its' command line abilities it is excellent for batch processing. This script tries to make this accessible to Xyplorer users.

The general FFmpeg syntax for converting for example an .avi file to a .mp3 file:

Code: Select all

ffmpeg.exe -i OriginalMediaFile.avi -Option1 -Option2 -Option(n-1) -Option(n) ConvertedMediaFile.mp3
The available options are too many to list. If you take a look at this FFmpeg help file you will start to see just how many possibilities this program offers. Below are listed a couple of options that users of this script will most likely want to use, so I took the time to document them for you :)

http://www.ffmpeg.org/ffmpeg.html

Code: Select all

1. -vn
   Remove the video stream during conversion 

2. -an
   Remove the audio stream during conversion

3. -ab <bitrate>
   Convert using the specified bitrate for audio. Accepts absolute values (e.g 128000) or deprecrated values (e.g. 196k)
4. -vb <bitrate> 
  Convert using the specified bitrate for video. Accepts absolute values (e.g 1024000) or deprecrated values (e.g. 1024k

5. -acodec or -vcodec
   replace <codec> with a codec identifier found in the help file.
   Conversion will be using the codec you specified
   
   SPECIAL
   
   -acodec or -vcodec copy
   the copy identifier tells ffmpeg not to touch the specified stream codec. ffmpeg will copy bit for bit the content of the stream. use this in combination with -vn or -an to quickly remove the video stream from a music video and save the file as mp3 to create a song for your music library.
   
   example:
   
   ffmpeg -i OhFortunateLiveMoscow.avi -vn -acodec copy OhFortunateLiveMoscow.mp3

Here are some screenshots:

Image

Image

Image

Image

Image

Image

Image

PREVIOUS VERSION: 0.4 - 8
Last edited by 40k on 14 Jul 2013 16:30, edited 4 times in total.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

binocular222
Posts: 1416
Joined: 04 Nov 2008 05:35
Location: Hanoi, Vietnam

Re: FFmpeg 0.4 - Xyplorer GUI + Batch converting

Post by binocular222 »

Superb!
:appl: :appl: :appl: :appl: :appl:
-----------
Input dialogs should show a list of common options so that user do not have to remember or lookup everytime
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: FFmpeg 0.4 - Xyplorer GUI + Batch converting

Post by 40k »

binocular222 wrote:Superb!
:appl: :appl: :appl: :appl: :appl:
-----------
Input dialogs should show a list of common options so that user do not have to remember or lookup everytime
Found a bug that causes issues when converting certain filenames that contain multiple dots.
Also, do not use the copy bitrate function if you are ripping a music video. It will try to apply the video bitrate to your converted audiofile, which obviously does not work.

I'm starting to think I have started too many Xy script projects :lol:
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: FFmpeg 0.4 - Xyplorer GUI + Batch converting

Post by 40k »

Here is a small sneak peek at one of the new features I am developing: fully customizable media file analysis through ffprobe (included with the free ffmpeg package):

Image
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: FFmpeg 0.5 14/07/13 GUI, Batch converting, Metadata anal

Post by 40k »

Full meta data analysis through the new "List selection Metadata" feature.
The script uses ffprobe, included in the ffmpeg package, to show you meta data. Even the most obscure formats can be analyzed!
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

40k
Posts: 234
Joined: 09 Dec 2011 21:25

Re: FFmpeg 0.5 14/07/13 GUI, Batch converting, Metadata anal

Post by 40k »

Discovered a small error in the way audio bitrate is formatted. The values are correct but audio bitrate should obviously read 192 kb/s and not 192,000 kb/s

I've updated the code on pastebin and in the attachment so all is well :)

Also please note that the Bit Rate indication for files in variable bit rate encoding is an approximate average. Usually video files are in VBR while audio files maintain CBR.

For more info about VBR vs CBR

https://en.wikipedia.org/wiki/Constant_bitrate

https://en.wikipedia.org/wiki/Variable_bitrate
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial

Post Reply