Log in

View Full Version : ffdrop = series of ffmpeg powered droplets for OS X Lion


smok3
24th September 2011, 23:40
what is:
A series of shell-script powered droplets (OS X Mavericks, Mountain Lion, older versions will work with Lion and snow leopard) that will encode prores and other type of files supported by ffmpeg with predefined command line (edit shell script to change that with your favorite text editor) to x264 or prores or vp8 or flac or .... (whatever is supported by ffmpeg).

quickguide, video:
http://youtu.be/6pu5WnbznVc?hd=1
(a. analyze master video, b. editing the droplet (ffmpeg encoding settings), c. encoding movie)
http://youtu.be/7f0qGEc7y5g
(arm via dock)

http://youtu.be/Vfvq_skLS8Q
(experimental scene detection droplet)

snapshots:
icon view (https://a.fsdn.com/con/app/proj/ffdrop/screenshots/ffdrop14dev.png)
list view (https://a.fsdn.com/con/app/proj/ffdrop/screenshots/ffdrop12listview.png)

download:
http://sourceforge.net/projects/ffdrop/files/ffdrop/ffdrop12b.zip/download
beta:
https://sourceforge.net/projects/ffdrop/files/latest/download

install:
.extract to /some/place
.install TextWrangler (http://www.barebones.com/products/textwrangler/) so that the pumpkin can be used as droplet editor (or configure the pumpkin to use your favorite text editor)

why/motivation:
.x264 8 bit/10 bit
.Prores decoder in ffmpeg (and now the encoder).
.All bunch off existing apps (with gazzilion menues and buttons) that can't/refuse to do what would human want.

changing the ffmpeg command line:
To edit the 'script' file: rmb on app then select 'Show Package Contents', find 'script' in ./Resources and open with your text editor (or drop droplet to magic pumpkin).
Testing: When you save the script, the app is ready for testing at once - no need to restart it, just drop in stuff to test.

powered by:
x264, http://x264.nl/
ffmpeg, http://ffmpeg.org/
mkvtoolnix, http://www.bunkus.org/videotools/mkvtoolnix/
mediainfo, http://mediainfo.sourceforge.net/
platypus, http://www.sveinbjorn.org/platypus
icondrawer: http://icondrawer.com/
and more.

known bugs/limitations in bundled droplets:
.multichannel audio input is not tested with bundled droplets.

changelog:
.v5 - droplets that will take image sequences as input to prores or x264.
.v6 - ffmpeg is now separated from droplets, some minor bugs fixed,
mediainfo is now part of the pack, new fresh ffmpeg/x264 compile from
git (1st one on lion)

.v7 - custom icons, qt-faststart, additional icons
.v7c - some icon cosmetics, some new presets (like animation qt)
.v7d - ability to drop the droplet onto pumpkin to get the "script" open in a
textWrangler
(that is if you happen to have one installed)
.v7f - xdcam422_1080p25.mov preset, it can talk

.v8 - x264 droplets (xCRF21, x1000) - are now using apple AAC encoder,
fresh ffmpeg version N-36981-g9e53f62 with x264 0.120.2146 bcd41db
.v8a - makethumbs droplet (movie to jpg thumb), some cosmetics
.v8b - audio transcoding droplets:
MP3(lame), AAC(apple), ALAC(apple), AIF, FLAC(ffmpeg), WAV,
ReplayGained WAV(wavegain)
.v8c - fixed file-naming behavior, experimental pal-dvd droplet, older 10bit
x264 droplet added

.v9 - fresh ffmpeg version N-37510-g8c48652 with Duclair libvpx &
x264 0.120.2146 bcd41db
.v9b_skinny - vp8 (webm) droplet - using 2pass cq mode
(note: do not use VLC to test playback, rather mplayer and/or chrome),
binary clean-up.

.v10 - x(264) and vp8 droplets: better audio handling, better stream handling
(map option).
Talking batch counter in x(264) droplet.
.v10c - 10bit x264 droplets - xCRF21tenbit, xLOSSLESStenbit422
(ffmpeg with 10 bit version of x264 0.120.2164 da19765)

.v11 - bugfixes (map removed), better tmp filenaming: avoiding possible
collisions in x264 and vp8 droplets, other cosmetic fixes.
- additional x264 'HTC Wildfire S' droplet (separate download)
- additional standalone 'printDuration' droplet (separate download);
prints a 'HH.MM.SS.MMM - filename' listing
- additional png & jpg droplets (separate download);
converts movie to jpg or png sequence
- additional standalone md5sum droplet (separate download);
prints some md5sums
- fresh ffmpeg version N-40006-g4a80ebe with 8 bit x264 0.122.2184 5c85e0a
(separate download)
- experimental mplayer droplet (known problems: filters misbehavior,
yadif not working at all)
- additional standalone automator droplet app that lets you add/remove
comments to set of files (searchable by spotlight)

.v12 - v11 + all of the above + some more
.v12b - killing bugs
- additional git fresh ffmpeg + x264 (separate download);
may improve yadif
- additional catMKVs (mkvmerge append) droplet (separate download)
will eat folder(s) full of mkvs and cat them together



troubleshoot:

if pumpkin refuses to cooperate, replace the appropriate part of its script with (full path):
for files in "$@" ;do
# text edit command:
open -a /Applications/TextWrangler.app "$files/Contents/Resources/script"

smok3
28th September 2011, 12:08
1. EBU r128 scanner that can be compiled/used with OS X (solved, waiting for implementation)
2. (2 pass) cq webm encoding (solved, vp8 droplet in v9b)
https://groups.google.com/a/webmproject.org/group/webm-discuss/tree/browse_frm/thread/c8cf0daa145f1317/65bee78c26c13cef?rnum=1&_done=/a/webmproject.org/group/webm-discuss/browse_frm/thread/c8cf0daa145f1317/65bee78c26c13cef?tvc%3D1%26&pli=1#doc_ef8a6ce953263c8b

sites:
http://segfault.in/2010/10/ffmpeg-tricks-you-should-know-about/
http://code.google.com/p/ffmbc/wiki/FFmbc06to07 (flag interlaced material)
https://ffmpeg.org/trac/ffmpeg/wiki/FilteringGuide (filtering guide)
http://ffmpeg.org/pipermail/ffmpeg-user/2012-February/004983.html (how to cat)
http://www.stuudio.ee/anotherGUI/Presets.html (lots of stuff)
http://www.itbroadcastanddigitalcinema.com/ffmpeg_howto.html (lots, also nice table with bitrates for DNxHD)
http://ffmpeg.org/pipermail/ffmpeg-user/2011-August/001876.html (scene detection?)
http://stackoverflow.com/questions/9160771/ffmpeg-watermark-first-30-second (watermark)

filtering:
uber-slow deinterlacer, mcdeint
-vf yadif=3,mp=mcdeint=0:1:10 or even slower -vf yadif=3,mp=mcdeint=2:1:10
(can't see a big difference versus just plain fast yadif=0, but the file-size is smaller with mcdeint (when feeding to x264, crf 21)

http://forum.doom9.org/showthread.php?p=1555481#post1555481

interlaced scaling
... -vf "scale=720:576:interl=1,fieldorder=tff" -vcodec dvvideo ... or maybe
... -vf "setfield=1, scale=720:576:interl=1, fieldorder=bff"...

assumefps25, keep audio in sync, resample audio to 48k (not working)
ffmpeg -r 25 -i <input file> <encoding parameters> -async 150 -ar 48000 <output file>

this seems to work (24fps to 25fps example)
a. ffmpeg -i 24.mov -r 25 -vsync drop -vcodec prores -profile 3 -an 25.mov
b. extract audio from 24.mov to 24.wav
c. sox 24.wav 25.wav speed 1.041666666666 (or tempo maybe)
ect ...

forcing chroma format:
-pix_fmt yuv420p

upsizing pal anamorph to hd
-sws_flags experimental -vf hqdn3d,scale=1920:1080

future possibilities:
.droplets that use replaygain could run all that in separate job while video encoding at the same time
.better error reporting, at least echo error status
.logging
.external config.txt file that would be used for certain parameters, like x264 options, ffmpeg filters, ect
(droplet would check if there is something in there and override default built-in commands)

Qwijib0
18th October 2011, 18:48
Thanks! this is a really useful utility.

I'd like to know how you're avoiding the 'invalid pixel format string' error with prores input though. Drag and drop works great, and I've modified the script to meet my requirements, but when I pull your ffmpeg binary out of the package and run the same command I get the pixel format error I was getting when I compiled my own.

Selur
9th February 2012, 10:17
can't see a big difference versus just plain fast yadif=0
I like this (http://bayfiles.com/file/2w6L/Hqo69j/SAT1.FFS.2011.03.21.m2v) short sample Didée posted a while back to compare the effect of mencoder/ffmpegs deinterlacers.

nm
9th February 2012, 15:21
I like this (http://bayfiles.com/file/2w6L/Hqo69j/SAT1.FFS.2011.03.21.m2v) short sample Didée posted a while back to compare the effect of mencoder/ffmpegs deinterlacers.

I posted another nice sample here: http://forum.doom9.org/showthread.php?p=1557034#post1557034

The sample you linked to has lots of curved and sloped edges, which is one major thing to compare. My sample focuses on fine details, where plain yadif loses badly to mcdeint and even pp=fd.

smok3
15th February 2012, 22:44
Thanks Selur, nm, since we are at samples, here is a little sample for testing 24 to 25 fps conversions (with burned 24 and 25 TC):
https://sourceforge.net/projects/resizecalc/files/osxffdrop/video/syncTestBunny/

(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org

Selur
31st May 2012, 07:38
just wondering when I drag&drop a file onto the audioToAAC droplet, it calls ffmpeg, sais 'Done' but where does the output file end up?
(no new file in my home folder, on my desktop or in my music folder or next to ffdrop12b,...)

smok3
31st May 2012, 07:58
just wondering when I drag&drop a file onto the audioToAAC droplet, it calls ffmpeg, sais 'Done' but where does the output file end up?
(no new file in my home folder, on my desktop or in my music folder or next to ffdrop12b,...)

default is next to original file, for more info post the entire log to pastebin or someplace (error handling is not very good at the moment).

Selur
1st June 2012, 09:57
.........................................................................................
audioToAAC
.........................................................................................

Fri Jun 1 10:54:11 CEST 2012

extract audio

droped files:
/Users/Selur/Desktop/Elephants Dream/VIDEO_TS/VTS_01_1.VOB



(__)
(oo)
/-------\/
/ | ||
* ||----||
~~ ~~

encoding /Users/Selur/Desktop/Elephants Dream/VIDEO_TS/VTS_01_1.VOB
ffmpeg version N-40006-g4a80ebe Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 20 2012 20:49:46 with clang 3.0 (tags/Apple/clang-211.12)
configuration: --prefix=/Volumes/tempdisk/sw --enable-gpl --enable-ffplay --enable-libx264 --cc=clang --enable-runtime-cpudetect
libavutil 51. 46.100 / 51. 46.100
libavcodec 54. 14.101 / 54. 14.101
libavformat 54. 3.100 / 54. 3.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 71.101 / 2. 71.101
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 11.100 / 0. 11.100
libpostproc 52. 0.100 / 52. 0.100
[mpeg @ 0x7fe2ab01ae00] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from '/Users/Selur/Desktop/Elephants Dream/VIDEO_TS/VTS_01_1.VOB':
Duration: 00:10:36.44, start: 0.280000, bitrate: 6854 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 8500 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), s16, 448 kb/s
Output #0, aiff, to '/Users/Selur/Desktop/Elephants Dream/VIDEO_TS/VTS_01_1.VOB.tmp.aif':
Metadata:
encoder : Lavf54.3.100
Stream #0:0: Audio: pcm_s16be (NONE / 0x454E4F4E), 48000 Hz, 5.1(side), s16, 4608 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (ac3 -> pcm_s16be)
Press [q] to stop, [?] for help
size= 8448kB time=00:00:15.07 bitrate=4591.7kbits/s
size= 16128kB time=00:00:28.70 bitrate=4602.9kbits/s
size= 22080kB time=00:00:39.29 bitrate=4603.0kbits/s
size= 27808kB time=00:00:49.44 bitrate=4607.7kbits/s
size= 33728kB time=00:01:00.00 bitrate=4605.0kbits/s
size= 40960kB time=00:01:12.86 bitrate=4605.1kbits/s
size= 47712kB time=00:01:24.83 bitrate=4607.4kbits/s
size= 53600kB time=00:01:35.29 bitrate=4607.7kbits/s
size= 59680kB time=00:01:46.11 bitrate=4607.4kbits/s
size= 64544kB time=00:01:54.75 bitrate=4607.7kbits/s
size= 69344kB time=00:02:03.29 bitrate=4607.3kbits/s
size= 73088kB time=00:02:09.98 bitrate=4606.2kbits/s
size= 79520kB time=00:02:21.37 bitrate=4607.8kbits/s
size= 82368kB time=00:02:26.46 bitrate=4607.0kbits/s
size= 86016kB time=00:02:32.96 bitrate=4606.7kbits/s
size= 87040kB time=00:02:34.78 bitrate=4606.6kbits/s
size= 94912kB time=00:02:48.76 bitrate=4607.0kbits/s
size= 101952kB time=00:03:01.24 bitrate=4608.0kbits/s
size= 109600kB time=00:03:14.88 bitrate=4607.2kbits/s
size= 117888kB time=00:03:29.63 bitrate=4606.8kbits/s
size= 123296kB time=00:03:39.20 bitrate=4607.9kbits/s
size= 127584kB time=00:03:46.84 bitrate=4607.4kbits/s
size= 132256kB time=00:03:55.13 bitrate=4607.7kbits/s
size= 137216kB time=00:04:03.96 bitrate=4607.5kbits/s
size= 141728kB time=00:04:12.00 bitrate=4607.3kbits/s
size= 148288kB time=00:04:23.64 bitrate=4607.6kbits/s
size= 155968kB time=00:04:37.28 bitrate=4607.9kbits/s
size= 162432kB time=00:04:48.80 bitrate=4607.5kbits/s
size= 166464kB time=00:04:55.93 bitrate=4608.0kbits/s
size= 171264kB time=00:05:04.51 bitrate=4607.4kbits/s
size= 175360kB time=00:05:11.77 bitrate=4607.6kbits/s
size= 179872kB time=00:05:19.80 bitrate=4607.5kbits/s
size= 183808kB time=00:05:26.81 bitrate=4607.4kbits/s
size= 189024kB time=00:05:36.06 bitrate=4607.7kbits/s
size= 196128kB time=00:05:48.70 bitrate=4607.6kbits/s
size= 201888kB time=00:05:58.91 bitrate=4608.0kbits/s
size= 209408kB time=00:06:12.32 bitrate=4607.5kbits/s
size= 212448kB time=00:06:17.69 bitrate=4607.9kbits/s
size= 217952kB time=00:06:27.48 bitrate=4607.8kbits/s
size= 221760kB time=00:06:34.24 bitrate=4608.0kbits/s
size= 227392kB time=00:06:44.28 bitrate=4607.6kbits/s
size= 234464kB time=00:06:56.83 bitrate=4607.9kbits/s
size= 240288kB time=00:07:07.23 bitrate=4607.4kbits/s
size= 246592kB time=00:07:18.43 bitrate=4607.5kbits/s
size= 251392kB time=00:07:26.94 bitrate=4607.7kbits/s
size= 256896kB time=00:07:36.73 bitrate=4607.7kbits/s
size= 263808kB time=00:07:48.99 bitrate=4608.0kbits/s
size= 265824kB time=00:07:52.57 bitrate=4608.0kbits/s
size= 273312kB time=00:08:05.88 bitrate=4608.0kbits/s
size= 276640kB time=00:08:11.84 bitrate=4607.7kbits/s
size= 282848kB time=00:08:22.84 bitrate=4607.9kbits/s
size= 284896kB time=00:08:26.49 bitrate=4607.9kbits/s
size= 287072kB time=00:08:30.36 bitrate=4607.8kbits/s
size= 290944kB time=00:08:37.24 bitrate=4607.9kbits/s
size= 297024kB time=00:08:48.09 bitrate=4607.5kbits/s
size= 301536kB time=00:08:56.09 bitrate=4607.7kbits/s
size= 305600kB time=00:09:03.32 bitrate=4607.7kbits/s
size= 320224kB time=00:09:29.31 bitrate=4607.8kbits/s
size= 323936kB time=00:09:35.90 bitrate=4607.9kbits/s
size= 328512kB time=00:09:44.06 bitrate=4607.7kbits/s
size= 330624kB time=00:09:47.80 bitrate=4607.8kbits/s
size= 336832kB time=00:09:58.84 bitrate=4607.7kbits/s
size= 339712kB time=00:10:03.96 bitrate=4607.7kbits/s
size= 345600kB time=00:10:14.43 bitrate=4607.8kbits/s
size= 346624kB time=00:10:16.25 bitrate=4607.7kbits/s
size= 357210kB time=00:10:35.04 bitrate=4608.0kbits/s
video:0kB audio:357210kB global headers:0kB muxing overhead 0.000020%
Error: ExtAudioFileSetProperty ('cfmt') failed ('!dat')
Input file: VTS_01_1.VOB.tmp.aif, 30481920 frames, MPEG_5_1_A

Fri Jun 1 10:54:52 CEST 2012

done in 0:00:41

Cu Selur

smok3
7th November 2013, 15:29
New beta; "14dev" released, see first post for download. (New ffmpeg, x264 and more)

.14dev_v4 - adds some interesting droplets, like splitter and various srt renderers like x264Srt2BlackCroped (renders soft srt subs as white on black video).
.14dev_v5/6 - slightly better metadata traveling in ./audio section.
.14dev_v7 - mpv player, some cosmetics
.14dev_v11 - small stuff, better pumpkin (goes through sublime>textwrangler>textedit before giving up), new ffmpeg/x264
.14dev_v12 - tar_7z droplet, also the distro will now be tar.7z-iped, makeup



To extract tar.7z on osx from cli to current dir:
7za x -so file.tar.7z | tar xf -
(You will need to install 7za)

p.s. ffdrop is mostly tested on Mountain lion & slightly tested on Mavericks.