h264enc Changelog

What's new in h264enc 8.9.3

Jul 1, 2009
  • Fallback to undefined audio language in the AUDLANG[$i] variables if we detect unknown language from MPlayer's output
  • Added support for bitrate-based ABR Vorbis encoding in addition to quality-based VBR. ABR mode in Vorbis resembles quality-based VBR except the encoder averages a given nominal bitrate
  • Updated the Vorbis part of the video bitrate calculation code
  • Added new function ratio_and_pixels_func() which calculates and displays the Storage Aspect Ratio (SAR), Pixel Aspect Ratio (PAR) and total pixels from resolution
  • Bugfix for track 1 in the internal audio encoding code. If using aacplusenc to encode audio, the case statement had a wrong selection value (aac++ instead of aac+) resulting in displaying a failed message and forcing an exit even though the encoding may have succeeded
  • Simplifications to the internal audio encoding code which reduce code duplication
  • Small fixes to the video bitrate calculation code
  • Small tuning to the Blu-ray/AVCHD presets
  • Small cleanups

New in h264enc 8.9.2 (Jun 26, 2009)

  • Set default audio codec for the Blu-ray/AVCHD presets to AC3
  • Bugfix to the OGM muxing code. Second/third track were ignored when one selects AC3 audio
  • Added keyint, keyint_min, nr and interlaced variables to the custom preset skeleton file 'preset.cfg'
  • Moved the AACTYPE variable to the neroaac_audio_func() function and updated the specific parts that use it in the MKV/MP4 muxing code
  • Do not automatically detect audio sample rate in directory batch encoding mode. Only do it for single file/dvd/vcd encodings as in batch mode, detection will only print the sample rate of the first file but not the other files in the directory so this can mislead the user in thinking that all files in the directory have the sample rate reported by the script. It is possible to implement sample rate detection for all files but since we don't know how many files are in the directory, I do not want the user to see a full screen with sample rate info of each file if he deals with a directory with a few hundreds or more files in it
  • Disallow autocropping, if enabled in the config file, for directory batch encodings
  • Small reordering to the MP4 muxing code
  • Small update to the install script
  • Updated the man page

New in h264enc 8.9.0 (Jun 22, 2009)

  • Small improvement to the MKV/MP4 tagging code: support audio tagging of single file encodes with audio stream copy
  • Use array variables ${SUBFILE[2] and ${SUBFILE[3] instead of ${OUTPUT%.*}_sub2 and ${OUTPUT%.*}_sub3 when dumping the second/third DVD subtitles
  • Simplified the MKV cover art importing code
  • Small improvements to video bitrate calculation with audio stream copy
  • Use only one named pipe for all tracks when encoding to neroAAC/AAC+/Vorbis/FLAC
  • Major audio code restructuring and partial rewrite. Converted virtually all audio code variables to array variables. This allows for easy extensibility and much less code duplication. It's very easy now to add as much audio tracks as one may want to the code with very little changes/updates needed to the containers code. Also the current changes may allow very easily to support different audio codecs per track in the future
  • Added support for a third DVD audio track
  • Updated the video bitrate calculation for target size to support the above audio changes
  • Converted most of the variables in the video_subtitles_func() function to arrays. This moderately reduces some code duplication
  • Updated the container muxing/tagging code to support the above audio changes
  • Use external flac encoder to encode to FLAC audio as doing it through mencoder is terribly broken. This updates the config file to version 8 and adds the 'flac' encoder as dependency
  • Set the default resampling filter to lavcresample as the other one gives problems when encoding to FLAC audio and resampling

New in h264enc 8.8.7 (Jun 19, 2009)

  • Simplifications to the MKV tagging code which reduces some code duplication
  • Bugfix: FAAC acodec2 variable has wrong mpeg value. Must be mpeg=4 instead of mpeg4. This results in failure in encoding of the second audio track when one selects FAAC as encoder
  • Bugfix: FLAC audio was ignored for the second track due to missing value in the selection of the case statement
  • Added support for tagging of MKV files when doing a directory batch encoding
  • Replaced the IMPSUB1, IMPSUB2 and IMPSUB3 variables, used to import subs when input type is file/directory/vcd, by array variables EXTSUB[1], EXTSUB[2] and EXTSUB[3]. This allows for less code duplication as these array variables are shared by all input types (including DVD) and thus we only need to do a small loop and add their values if not empty to the MKVSUBS, MP4SUBS and OGMSUBS variables
  • Use as temp directory $HOME/.h264enc/job
  • Added new function audio_stream_copy_func() which will print a warning that audio stream copy in directory batch encoding mode is not recommended unless the user is certain that the files have a supported audio codec by the MKV/MP4/OGM/TS containers
  • Group audio filters under a submenu similar to how the video filters are grouped
  • Some small cleanups

New in h264enc 8.8.5 (Jun 15, 2009)

  • Update to the video_subtitles_func() function: for DVD encodings, added support for importing up to three external subtitles into MKV/MP4/OGM. Also added support for hardcoding an external subtitle into the movie
  • Updated the MKV/MP4/OGM muxing code to support imports of external subtitles
  • Increased Psy RD from 0.5 to 0.6 for some presets
  • If dumping of the second and/or third DVD subtitle fails and user has selected to import the subs into MKV/MP4, force an exit since container conversion will fail as the muxing programs will complain about the missing subs. If no container conversion is chosen or user has chosen not to import the subs and dumping of subs fails, just continue since there's nothing critical in this case
  • Use mplayer -really-quiet option instead of redirection to /dev/null when dumping audio to a named pipe for neroAAC/Vorbis/AAC+ encoding
  • Some small updates to the man page
  • Updated the AUTHORS file

New in h264enc 8.8.2 (Jun 8, 2009)

  • Add iTunes video title name to MP4 files

New in h264enc 8.8.0 (May 12, 2009)

  • Added deinterlace combinations of Yadif + linear blend, linear interpolation, cubic interpolation, median deint, ffmpeg deint and lowpass 5
  • Cosmetics to the help menu
  • Added global audio function audio_filters_func() for calling the resample, volume normalizing and volume filters
  • Added 16 new variables to the config file for enabling/disabling of specific audio/video filters and containers: ALLOW_FPS_CONVERSION, ALLOW_SCALER_TUNING, ALLOW_DSIZE, ALLOW_EXPAND, ALLOW_COLORSPACE, ALLOW_ASPECT, ALLOW_AUD_RESAMPLE, ALLOW_AUD_NORMALIZE, ALLOW_AUD_VOLUME, ALLOW_MKV_MUXING, ALLOW_MP4_MUXING, ALLOW_TS_MUXING, ALLOW_OGM_MUXING, ALLOW_SAMPLE_ENCODING, ALLOW_SCAN_MULTIPLE_VIDSTREAMS and ALLOW_SCAN_MULTIPLE_AUDSTREAMS, the last two are only effective on file and directory batch encodings
  • Updated the man page

New in h264enc 8.7.9 (May 7, 2009)

  • Automatically add the shebang line to batch files and make them executable
  • Added new variable ALLOW_AUTOCROP to the config file which allows the user to enable or disable automatic cropping
  • Added MP3 presets and updated target file size code to support them (requested by RogĂ©rio Brito)
  • Some minor adjustments to the hq, vhq, ehq, uhq and ihq presets; decrease b-frames by one

New in h264enc 8.7.8 (Apr 29, 2009)

  • Small bugfix: video filters variables in the config file were not respected when one chooses to encode VCDs.
  • Add video title meta-data for MKV and OGM when doing directory batch encodings

New in h264enc 8.7.7 (Apr 28, 2009)

  • Optimize some variables by replacing piping to sed with VARIABLE1="${VARIABLE2%.*}.ext"
  • Move out the built-in -loop 1 mplayer option to the config file's MPLAYEROPTS variable
  • Add support for enabling/disabling specific pre/postprocessing filters in the config file. This adds 7 new variables to the config file where the user can either enable to ask questions about a specific filter or disable a specific variable, thus skipping questions about the filter
  • Moved the video filters code to a new function called video_filters_func(). This also reduces a bit of code duplication
  • Add a new option -e which allows the user to edit the config file directly from within the terminal. This adds a new variable EDITOR to the config file where the user can set his preferred text editor (defaults to nano)
  • Silence possible dvdxchap warnings
  • Updated the man page

New in h264enc 8.7.5 (Apr 22, 2009)

  • Dump first subtitle during the first pass of a multipass encode to avoid possible delay problems

New in h264enc 8.7.4 (Apr 14, 2009)

  • Proper file extension handling for directory batch encodings
  • Removed workaround for bug present in old versions of tsMuxeR. Please upgrade to tsMuxeR version 1.9.1(b). The previous one is no longer supported
  • Optimizations to the Blu-ray and AVCHD muxing code
  • Add video fps value to the tsMuxeR meta file for TS/Blu-ray/AVCHD muxing
  • User request: add an mplayer variable to the config file where the user can set custom mplayer options. One should be careful which options he uses as some of them may introduce problems and make h264enc behave badly. The default option set in the new MPLAYEROPTS variable is '-noconfig all' which disables parsing of the mplayer config file
  • Made the VCD device scanning code a function -> get_vcd_devices_func()
  • Updated the -scan option to also support VCD scanning
  • Small cleanups

New in h264enc 8.7.3 (Apr 12, 2009)

  • Optimize output file naming for file/vcd encodings. Based on a patch by Jouni Suorsa
  • Added support for the dsize video filter
  • Added support for VBR audio encoding when using FAAC or neroAacEnc as encoder. This automatically disables target file size calculation until I find out how to map quality values to bitrates for these codecs.

New in h264enc 8.7.1 (Feb 2, 2009)

  • Use keyint_min of 2 instead of 1 for the Blu-ray/AVCHD presets to prevent consecutive IDR frames
  • Added -loop 1 to MPlayer to prevent infinite looping if user has set -loop 0 in MPlayer's config file. Suggested by Jan Paral (Dept. of Physics, Univ. of Alberta, Canada)

New in h264enc 8.7.0 (Jan 20, 2009)

  • Added support for setting the position of the expand filer when scaling is used. The user can now choose to place it before or after the scale filter. Previously the expand filter was always placed after the scale filter which is not optimal in certain cases
  • Small improvement/fix: when encoding two audio tracks to HE-AAC audio and muxing them into MKV, mkvmerge uses for both tracks the same track ID (1) while h264enc assumes that the second track uses track ID 2 which is wrong so the option --aac-is-sbr 2:1 is incorrect here and should actually be --aac-is-sbr 1:1 for the second audio track

New in h264enc 8.6.8 (Jan 14, 2009)

  • Calculate and display the amount of frames when scanning a video file. Also display seconds in addition to minutes for the runtime
  • Replaced MB and GB with MiB and GiB
  • Updates to the hq, vhq, ehq, ihq, ani and anihq presets: lower b-frames from 16 to 5 for the hq, ani and anihq, from 16 to 6 for the vhq, from 16 to 7 for the ehq and from 16 to 8 for the ihq presets and use b_adapt=2 instead of b_adapt=1. These changes increase encoding time a bit but are worth it quality-wise
  • Updated QP range, add 0 for lossless mode

New in h264enc 8.6.6 (Dec 12, 2008)

  • Added support for the software equalizer video filter (eq2)
  • Removed signal SIGTSTP from the trap list. The user can now suspend the encoding process with CTRL+Z and continue later on by typing fg in the terminal
  • Small loop modifications in the video_subtitles_func() function
  • Set default AAC profile when using neroAacEnc to LC instead of HE
  • Added support for VCD/SVCD encodings. Yeah, yeah (S)VCD is crap and old but nevertheless I'll support it. It's a small change to the codebase of h264enc anyways
  • Add option -ipod to the MP4Box muxing parameters. This removes the need of running MP4Box again after muxing just to rewrite the file for the iPod/iPhone
  • Added a condition to check if MP4Box is compiled with the PSP patch and if so, the -psp option will be added to the parameters when using the Sony PSP presets. The PSP patch along with install instructions can be downloaded from h264enc's site at http://h264enc.sourceforge.net/download.html
  • Small loop modifications to the get_dvd_devices_func() function
  • Small modifications to the install script
  • Updated the man page

New in h264enc 8.6.5 (Dec 6, 2008)

  • Huge bugfix to the audio part of the portable device presets. Variable audiocodec2 was missing resulting in the second audio track being ignored. Everyone who uses these presets and wants a second audio track should upgrade ASAP
  • Offer nosound audio option for the portable device presets
  • Don't exit if the user has not added the .avi extension for the output file. Instead automatically add the extension to it

New in h264enc 8.6.3 (Dec 4, 2008)

  • Small bugfix: IVTC/Telecine was still asked if user has selected to do FPS conversion using frame duplication (25 -> 50 fps, 50 -> 100 fps). This is due to wrong variable being tested: $fpsfilter instead of $frc
  • Use MEncoder to dump the video when remuxing to MP4 as MP4Box can crap out in certain cases. I'm tired of fixing MP4Box' problems :/ but the alternative (mp4creator) is a piece of crap too and is no longer maintained. It doesn't support VobSub subtitles either, nor chapter files AFAIK
  • Made the Insane High Quality (IHQ) preset more insane. The IHQ preset is my baby so it gets very special treatment, haha! Increased frameref from 8 to 16, increased me_range from 64 to 128, enabled all partitions instead of using only p8x8,b8x8,i8x8,i4x4 and set trellis to 2. I hope the Japs are happy now.
  • Added support for providing a custom factor value when using the video bitrate calculation formulas
  • Added initial support for a second audio track for DVD encodings. Below is a list of what currently works and what doesn't:
  • PCM audio is not supported yet. It's not a priority for me
  • If you're looking for second audio track in AVI, don't waste your time. I will never support it. Use the MKV/MP4/TS/OGM containers
  • Audio filters are supported for both tracks
  • Audio codecs and audio filters apply to both tracks. One can't use, for example, Vorbis audio for first and AAC audio for second track. One also can't set audio bitrate independently for each track
  • Audio stream copy is supported by the MKV/TS/OGM containers. For the MKV/TS containers one can copy AC3 + AC3 or AC3 + DTS audio. For OGM only AC3 + AC3 is supported since it knows nothing about DTS audio. If DTS audio is selected, it will be ignored
  • I use (very?) dirty tricks to maintain A/V sync when one uses frame altering video filters, like bobbing, interlacing, ivtc/telecine, FPS conversion
  • Updated the video bitrate calculation code to support a second audio track
  • Updated the MKV/MP4/TS/OGM containers code to support a second audio track
  • Better explanation about what the -r option does/is used for
  • Implemented audio_exit_func() function. This function kicks in effect if the audio encoding with an external audio encoder didn't succeed. If this is the case, the function will be called with the appropriate parameters and will force an exit to prevent container conversion. This is because if the audio encoding fails for some reason, container conversion will automatically fail too since the muxing programs will complain about the missing audio file and will exit, thus there is no point in continuing and displaying conversion failing messages
  • Reduced the amount of options displayed when one calls the script without any parameters. From now on it will just display: Usage: h264enc < options > Use 'h264enc -help' for more information
  • Better wording in the preset.cfg skeleton file
  • Some old comments cleanups
  • Updated the man page

New in h264enc 8.6.1 (Nov 25, 2008)

  • Empty variables cleanups
  • Bugfix: the vobsubout3 variable was not tested in the MKV/MP4 muxing code. This leads to the third subtitle not being imported into these containers
  • Added support for TS/Blu-ray muxing when batch encoding files in a directory
  • Small improvements for batch encoding of video files in a directory
  • New formulas to calculate the video bitrate for a target filesize. The user can choose between MeGUI's formula, h264enc's refactored MeGUI formula and the old h264enc/ripdvd formula

New in h264enc 8.6.0 (Nov 25, 2008)

  • Bugfix: add the $ofps variable to MEncoder when dumping a second subtitle. Also enable pcm as audio to maintain sync with the video. A small performance hit but it's worth it
  • Added support for dumping one more subtitle. This brings it to a total of 3 subtitles that can be dumped to disk and imported into the MKV and/or MP4 container
  • Dramatically simplified the TS/Blu-ray muxing code
  • Implemented initial real batch support for files. As of now, one can encode a bunch of video files in a directory and automatically remux them to MKV/MP4/OGM. The TS container is not supported yet due to me being lazy. The user only needs to configure one of the files in a given directory, and all the settings will apply to the other files as well
  • Moved the DVD device detection code into its own function to reduce some code duplication
  • Made the encoding priority level global. It now applies to audio/video dumping, audio encoding, subtitles dumping and container muxing

New in h264enc 8.5.9 (Nov 20, 2008)

  • Rewrote the DVD part of the video_subtitles_func() function. It now supports dumping two subtitles to disk
  • Updated the MP4/MKV muxing code to support importing of two subtitles
  • Dramatically simplified the MP4/MKV/OGM batch exporting code. This reduces a lot of code duplication
  • Bugfix in the video_subtitles_func() function for SRT subtitles for video files. Wrong variable used
  • When encoding samples, make sure to take care of any subtitles that might have been dumped to disk
  • Don't exit if the user provides a floating point value for the Vorbis audio codec. Instead warn and use the default value.
  • New formula to calculate the video bitrate for a target filesize. The previous formula, which was directly taken from the ripdvd project, incorrectly calculates the bitrate which often results by missing the target filesize by as much as 30 MB. The new formula also uses floating point precision and has been tested agains the calculators of MeGUI and Avidemux
  • Removed support for me-prepass
  • Removed neroAacEnc quality-based encoding mode. It is incompatible with video bitrate calculation for a target size and I cannot find any info on quality -> average bitrate mappings.
  • Updated the HW compatible presets. Changed H.264 Level for the SD presets from 3.1 to 3.0 and for the HD presets from 4.1 to 4.0. Also updated the vbv_maxrate values according to Level specs
  • Restructured the Blu-ray presets. Now there are four different Blu-ray presets available: bd40, bdhq40, bd41, bdhq41. bd40 is Main profile @ Level 4.0, bdhq40 is High profile @ Level 4.0, bd41 is Main profile @ Level 4.1 and bdhq41 is High profile @ Level 4.1
  • Allow CRF encoding to be used with some device presets (ps3, xbox360, appletv)
  • Updated the man page
  • Some cleanups

New in h264enc 8.5.8 (Nov 10, 2008)

  • Added support for the aacplusenc AAC+ audio encoder from Matteo Croce
  • Updated the MP4 & MKV batch exporting and muxing code to support the aacplusenc encoder
  • Display elapsed time when encoding samples
  • Added NAL HRD to the Blu-ray presets. This requires a patched x264 with the NAL HRD patch. The patch along with install instructions can be downloaded from http://h264enc.sourceforge.net/download.html
  • Added option nal_hrd to the 'preset.cfg' skeleton file
  • In some cases it is possible for h264enc to leave its unique temp directory. Find those directories and remove them if they are 15 or more days old
  • Added support for deinterlacing at half frame rate. Useful for interlaced content that's running at 50 or 59.940 fps (100i/120i)
  • Updated the source_fps_func() function
  • Removed support for the MP2, WMA and ADPCM audio codecs. No one uses these codecs in combination with H.264 video
  • Removed support for MPEG-2 AAC audio
  • Reduced some code duplication in the set_output_filename_func() function by moving path and extension checking into its own function
  • SSIM and PSNR statistics are now enabled by default
  • Removed the noise filter. No real use for it
  • Updated the audio_resample_func() function
  • Updated the check_audio_codec_func() function
  • Updated the genconfig_func() function
  • Updated the man page
  • Updated the README.h264enc file

New in h264enc 8.5.6 (Oct 23, 2008)

  • Updated the 'preset.cfg' skeleton file. Added support for psy_rd, Psychovisual optimization
  • Improved subtitle handling for video file encodings. Now the user can select to hardcode a given subtitle into the movie or import it into the MP4 and/or MKV container. Only two subtitle formats are supported and have been tested: VobSub and SRT
  • Added support for sample encoding and previewing. When encoding samples, one can specify the start position and the duration in seconds for the sample. Sample encoding respects encoding passes meaning if you execute h264enc in two-pass mode and want to encode a sample before the real encoding starts, then the sample will also be encoded in two-pass mode with all the options and filters selected by the user. Sample encoding can further be used to encode only specific parts of a video file or a DVD. In regards to DVDs, sample encoding does not respect selected DVD chapters meaning the given start position for the sample will overwrite the selected DVD chapter(s). This is a mencoder problem and there's nothing I can do about it.
  • Presets update: most presets for portable devices have been renamed. Please read the man page or execute 'h264enc --help' for more information
  • Added two QuickTime presets - qt and qthq
  • denoise3d & hqdn3d: implemented weak/medium/strong denoising presets
  • Removed quantization parameters for the spp, uspp, fspp and pp7 deblockers
  • Updated the crop preview code. Instead of sleeping for 15 seconds and then killing the PID value of mplayer, use the -endpos option
  • Updated the man page