Download the binary located under Resources on the main page to your desktop. Then extract the zip file. After the extraction you will be left with a folder called Techspansion. Drag it into the /Library/Application Support folder. Make sure to create a backup of your original Techspansion folder.
vh131ffmpeg is compiled to run on Mac OS X 10.6 or greater. You will also need a copy of VisualHub. The source code changes and a build script have been provided for those who wish to compile the program.
It does but you need to use the updater
on the Techspansion website. Tyler was kind enough to provide it. Pretty good for
an outdated/EOL product. According to Tyler this will be the last update so enjoy
Visualhub for a little while longer. Also grab the updated tools (tccat
and avimerge). The original tools that came with VisualHub are PowerPC
only builds and will not work with Lion.
Download the individual tools located under Resources on the main page to your
desktop. Extract the files and then copy the extracted files to the application
bundle VisualHub.app/Contents/Resources.
To compile vh131ffmpeg, you will need a couple of items first. Install the Mac OS X Developer tools for your version of Mac OS X. Then download, compile and install YASM. Once completed, download the build script tarball located under Resources on the main page. Extract the tarball to install the scripts. Open Terminal and change the directory to the extracted folder. Run ./jam. This will download, compile and install the needed 3rd party libraries and create the final vh131ffmpeg binary. The Jamfile can be configured for multiple architectures (i386, x86_64, ppc). See the HOWTO in the tarball for further instructions. The build script was adapted from the contrib Jamfile included with the Handbrake source code.
ffmpeg now has the ability to use preset files for storing commonly used encoding parameters. It comes with several x264 and VPX standard presets. I have provided a few xvid presets and additional x264 presets that I adapted from internet posting (see table below). There are two types of presets: standard and tuning. The tuning presets are used in conjuntion with a standard preset. To use the presets, open the Advanced Settings window and type them in the Video "Extra FFmpeg Flags" box:
-vcodec libx264 -vpre medium
-vcodec libxvid -vpre fast
-vcodec libx264 -vpre medium -vpre film
-vcodec libxvid -vpre medium -vpre cartoon
| Encoder | Preset | Example Usage | Command Options Used |
|---|---|---|---|
| libxvid | slow | -vcodec libxvid -vpre slow | -me_method full -mbd 2 -trellis 1 -flags +cgop+mv4+aic |
| libxvid | medium | -vcodec libxvid -vpre medium | -me_method epzs -mbd 2 -flags +cgop+mv4 |
| libxvid | fast | -vcodec libxvid -vpre fast | -bf 0 -me_method log -mbd 0 -flags +cgop |
| libx264 | universal | -vcodec libx264 -vpre universal | -level 30 -qmin 4 -qmax 69 -g 250 -coder 0 -cmp +chroma -bf 0 -refs 2 -directpred 1 -trellis 0 -me_method umh -subq 6 -me_range 16 -partitions +parti4x4+partp8x8+partb8x8 -flags +loop -keyint_min 25 -qcomp 0.6 -qdiff 4 -flags2 -wpred+mbtree-dct8x8+mixed_refs+fastpskip -sc_threshold 40 -i_qfactor 0.71 -rc_lookahead 40 -wpredp 0 -maxrate 10000000 -bufsize 10000000 |
| libx264 | divxplushd | -vcodec libx264 -vpre divxplushd | -level 40 -qmin 4 -qmax 69 -g 250 -coder 1 -cmp +chroma -bf 2 -refs 2 -directpred 3 -trellis 0 -me_method umh -subq 7 -me_range 16 -partitions +parti4x4+partp8x8+partb8x8 -flags +loop -keyint_min 25 -qcomp 0.6 -qdiff 4 -flags2 +bpyramid+mixed_refs-wpred-dct8x8+fastpskip+mbtree -sc_threshold 40 -i_qfactor 0.71 -rc_lookahead 40 -wpredp 0 -maxrate 25000000 -bufsize 20000000 |
| libx264 | highprofile | -vcodec libx264 -vpre highprofile | -level 41 -qmin 4 -qmax 69 -g 250 -coder 1 -cmp +chroma -bf 3 -refs 3 -directpred 3 -trellis 1 -me_method umh -subq 7 -me_range 16 -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -flags +loop -keyint_min 25 -qcomp 0.6 -qdiff 4 -flags2 +bpyramid+mixed_refs-wpred+dct8x8+fastpskip+mbtree -sc_threshold 40 -i_qfactor 0.71 -rc_lookahead 50 -wpredp 1 -maxrate 40000000 -bufsize 30000000 |
| Encoder | Preset | Example Usage | Command Options Used |
|---|---|---|---|
| libxvid | film | -vcodec libxvid -vpre film | -mpeg_quant 1 |
| libxvid | cartoon | -vcodec libxvid -vpre cartoon | -mpeg_quant 0 -flags2 +cartoon |
| libx264 | animation | -vcodec libx264 -vpre animation | -deblockalpha 1 -deblockbeta 1 -psy_rd 0.4 -aq_strength 0.6 |
| libx264 | fastdecode | -vcodec libx264 -vpre fastdecode | -coder 0 -flags2 -wpred -wpredp 0 -x264opts no-deblock=1 |
| libx264 | film | -vcodec libx264 -vpre film | -deblockalpha -1 -deblockbeta -1 -psy_trellis 0.15 |
| libx264 | grain | -vcodec libx264 -vpre grain | -deblockbeta -2 -psy_trellis 0.25 -aq_strength 0.5 -b_qfactor 1.1 -x264opts no-dct-decimate=1:deadzone-inter=6:deadzone-intra=6 -i_qfactor 1.1 -qcomp 0.8 |
| libx264 | psnr | -vcodec libx264 -vpre psnr | -flags2 -psy -aq_mode 0 |
| libx264 | ssim | -vcodec libx264 -vpre ssim | -flags2 -psy -aq_mode 2 |
| libx264 | touhou | -vcodec libx264 -vpre touhou | -deblockalpha -1 -deblockbeta -1 -aq_strength 1.3 -psy_trellis 0.2 -partitions +partp4x4 |
| libx264 | zerolatency | -vcodec libx264 -vpre zerolatency | -bf 0 -flags2 -mbtree -rc_lookahead 0 -x264opts sync-lookahead=0:sliced-threads=1 |
Presets are searched in the following order:
~/.visualhub (home folder)
VISUALHUB_DATA
/Library/Application Support/Techspansion/vhpresets
/Library/Application Support/Techspansion/vhpresets.
I have included a x264 ffpreset called universal. I adapted this
preset from Handbrake's "Apple Universal"
preset. This ffpreset is designed to allow videos to run on a bunch of devices.
-vcodec libx264 -crf 20 -vpre universal -vpre film
By default, variable frame rate detection is turned off because the play_title
command used to play DVD VIDEO_TS folders can cause ffmpeg to incorrectly determine
the frame rate during the encoding process. To enable, open the Advanced Settings
window and type the following command in the Video "Extra FFmpeg Flags" box:
-vsync 2
VisualHub comes with two different programs that can be used to read DVD/VIDEO_TS
folders: play_title (default) and tccat. To change the
program used to read DVDs, open the terminal application and use the following
command:
defaults write com.techspansion.visualhub dvdpipe tccat
defaults write com.techspansion.visualhub dvdpipe play_title
Variable bit rate encoding can be enabled for both encoders. For x264, use -crf
and for Xvid, use -qscale. Open the Advanced Settings window and type the command
in the Video "Extra FFmpeg Flags" box:
-vcodec libx264 -crf 20
-vcodec libxvid -qscale 5
The Xvid encoder supports both threads and slices as of version 1.3. By default VisualHub only tells ffmpeg to use one thread. Open the Advanced Settings window and type the following command into the Video "Extra FFmpeg Flags" box:
-threads 2 -vcodec libxvid -vpre medium
-threads 4 -vcodec libxvid -vpre slow
-threads 8 -vcodec libxvid -vpre fast
There are a few topics on the internet that describe the problem. Basically
videos encoded with the x264 encoder look washed out when played on a Mac using
QuickTime Player. The fix is to either add a color space tag or write the color
space information direcly to the video stream. I have added a new ffmpeg option
-colr that does both. This option allows you to specify the color
space for a encoded video: none (do not write tag), bt601 (standard video) or
bt701 (high definition video). It will only work for videos using the MP4 format
or videos encoded with libx264. To use the option, type the following command
in the Video "Extra FFmpeg Flags" box:
-colr bt601
-colr bt709
The AAC encoder is based on a codec implementation by VisualOn as part of the Stagefright framework from the Google Android project. The encoder can encode audio at a higher bit rate than FAAC which is limited to 160kb. To use it, open the Advanced Settings window and type the following command in the Audio "Extra FFmpeg Flags" box:
-acodec libvo_aacenc
Use the command -vol to increase the volume on an encode. The
default value is set to 256. I suggest that you increase the value by 128 each
time to see what volume works best for the encoded material. Open the Advanced
Settings window and type the following command into the Audio "Extra FFmpeg
Flags" box:
-vol 384
VisualHub does not include DVD decryption software. Use a DVD ripper to rip the DVD to a local folder or to a MKV file on your computer. There are several Mac DVD rippers available: Mac The Ripper, DVDFab HD Decrypter, MakeMKV, RipIt and Fairmount.
The problem occurs with MV4/MOV videos that are processed by QuickTime using the movtoy4m and ffmpeg's yuv4mpegpipe commands. During the conversion, VisualHub will immediately display an error message such as "Stream #1.0 -> #0.1" and the log will not show any conversion activity. This is due to ffmpeg terminating with a SEGFAULT error. The issue seems to only affect videos that are cropped incorrectly by VisualHub. There are a few work-arounds that can be used:
VisualHub incorrectly determine the number of threads needed on certain Macs. To fix the error, open the Advanced Settings window and type in the number of threads explicitly in the Video "Extra FFmpeg Flags" box. You may have to experiment with the number. Start with the total amount of cores and then work your way back to the total number of physical processors:
-threads 24
-threads 6
-threads 4
-threads 1
VisualHub computes the aspect ratio for widescreen videos as 2.22 (720x384). If you would like an aspect ratio closer to the original video, this can be fixed manually through the Advanced Settings window. First you will need the aspect ratio of the video that you are encoding. Second, use the following table as a guideline for configuring the proper Video settings. If the video does not have any black bars or you want to keep them, I suggest setting the crop to (0, 0, 0, 0).
| Aspect | Size: width | Size: height | Extra FFmpeg Settings |
|---|---|---|---|
| 1.78 | 720 | 480 | -aspect 16:9 |
| 1.85 | 720 | 460 | -aspect 16:9 -padtop 10 -padbottom 10 |
| 2.35 | 720 | 364 | -aspect 16:9 -padtop 58 -padbottom 58 |
| 2.39 | 720 | 356 | -aspect 16:9 -padtop 62 -padbottom 62 |
The "Burn When Done" option does not work under Mac OS X 10.6 or greater due to an AppleScript change in the OS. Uncheck the option and burn the DVD ISO image created by VisualHub using Disk Utility.
This error is most likely due to an AppleScript change in Mac OS X. In Mac OS X 10.5 the Info panel will show garbled output and in Mac OS X 10.6 there is no output.