View Full Version : ffx264 & ffhevc for Linux/BSD
microchip8
4th September 2015, 13:21
I wrote two small, simple and basic shell scripts for Linux. I did it because I encountered a few video remuxes (from my own Blu-rays) that I couldn't encode with my h264enc script so I turned to ffmpeg which was able to handle them.
ffhevc & ffx264 won't be anything big and professional like h264enc. I intend to keep them both basic and with the options I most often use so stuff like many audio/video filters, different input sources, etc, etc won't be added, unless I really need them on a frequent basis in the future.
However, if you need something and are willing to implement it, I accept patches. :)
ffx264: https://sourceforge.net/projects/ffx264/
ffhevc: https://sourceforge.net/projects/ffhevc/
microchip8
5th September 2015, 13:11
ChangeLog for ffhevc 1.3
* Added support for copying a single subtitle. Note that this is only supported when output container is set to mkv (default)
* Changed var OUTPUT in the config file to OUTDIR. Also changed internal var OUT to OUTPUT
* Updated the README file
ChangeLog for ffx264 1.5
* Added support for copying a single subtitle. Note that this is only supported when output container is set to mkv (default)
* Changed var OUTPUT in the config file to OUTDIR. Also changed internal var OUT to OUTPUT
* Updated the README file
microchip8
5th September 2015, 17:39
ChangeLog for ffhevc 1.4
* Implemented support for virtually an unlimited audio track encodings
* Ask for AC-3 bitrate instead of setting it in the config file
* Updated the README file
ChangeLog for ffx264 1.6
* Implemented support for virtually an unlimited audio track encodings
* Ask for AC-3 bitrate instead of setting it in the config file
* Updated the README file
microchip8
6th September 2015, 00:10
ChangeLog for ffhevc 1.5
* Bugfix: dB was missing after the value of the audio volume filter
* Be a bit more consistent with the audio variables
* Added support for encoding to AAC audio
* Use eval instead of seq for the for audio loops as seq is Linux-specific
* Added an ASCII art banner
* Export encoding params to a shell script and source it for encoding
* Place the libx265 params in the config file for easy modifications
* Made auto-cropping optional. It can be disabled in the config file
* Made the SUBS var in the config file consistent with the ones that accept "y" or "n" as value
* Added support for specifying the audio language metadata
* Automatically add the title of the content based on provided output name
* Automatically add the audio codec name metadata
* Updated the README file
ChangeLog for ffx264 1.7
* Bugfix: dB was missing after the value of the audio volume filter
* Be a bit more consistent with the audio variables
* Added support for encoding to AAC audio
* Use eval instead of seq for the for audio loops as seq is Linux-specific
* Added an ASCII art banner
* Export encoding params to a shell script and source it for encoding
* Place the libx264 params in the config file for easy modifications
* Made auto-cropping optional. It can be disabled in the config file
* Made the SUBS var in the config file consistent with the ones that accept "y" or "n" as value
* Added support for specifying the audio language metadata
* Automatically add the title of the content based on provided output name
* Automatically add the audio codec name metadata
* Updated the README file
microchip8
6th September 2015, 11:22
ChangeLog for ffhevc 1.6
* Added support for setting the genre and year metadata
* Added support for virtually an unlimited amount of subtitles copy
* Colorized the banner
* Cosmetics
* Updated the README file
ChangeLog for ffx264 1.8
* Added support for setting the genre and year metadata
* Added support for virtually an unlimited amount of subtitles copy
* Colorized the banner
* Cosmetics
* Updated the README file
microchip8
7th September 2015, 15:37
ChangeLog for ffhevc 1.7 and ffx264 1.9
* Bugfix: the specified channels to decode wasn't honored due to missing 'a' in the -ac option
* Added support for encoding to DTS audio
* Reduced some duplication in the audio code
* More cosmetics
* Updated the README file
microchip8
8th September 2015, 09:29
ChangeLog for ffhevc 1.8 and ffx264 2.0
* Enabled subs copy for other containers than mkv
* Some tweaks in the audio code
* Updated the README file
microchip8
9th September 2015, 14:18
ChangeLog for ffhevc 1.9 and ffx264 2.1
* Removed the $ in the index of array variables
* Use an if conditional instead of case to check for DTS audio and to check which audio codec has been selected
* Support setting the paths to mplayer/ffmpeg/ffprobe in the config file
* Support setting the language metadata for subs copy
* Fixed a small issue in the subtitles code
microchip8
10th September 2015, 14:37
ChangeLog for ffhevc 2.0 and ffx264 2.2
* Tweaks to the audio code
* Somehow I removed the chapters option. Add it back
microchip8
11th September 2015, 13:25
ChangeLog for ffhevc 2.1 and ffx264 2.3
* Update to the default libx264/libx265 encoding params
microchip8
12th September 2015, 19:56
ChangeLog for ffhevc 2.2 and ffx264 2.4
* Added audio channel layout mappings
microchip8
13th September 2015, 09:46
ChangeLog for ffhevc 2.3 and ffx264 2.5
* Added support for scaling
* Updated the README file
microchip8
14th September 2015, 19:22
ChangeLog for ffhevc 2.4.0 and ffx264 2.6.0
* Fixed an issue where -vf was added despite not using any filters
microchip8
15th September 2015, 10:14
ChangeLog for ffhevc 2.4.1 and ffx264 2.6.1
* Added support for deinterlacing
* Updated the README file
microchip8
17th September 2015, 10:06
ChangeLog for ffhevc 2.4.2 and ffx264 2.6.2
* Small update to the channel layout mappings
microchip8
18th September 2015, 06:48
ChangeLog for ffhevc 2.4.3 and ffx264 2.6.3
* Removed the workaround for DTS audio since we always use "5.1(side)" for 6 channels output
* Support setting the MAX_AUD_TRKS and MAX_SUBS variables in the config file to "auto". When set to "auto", it will ask for as many as detected audio tracks/subtitles
microchip8
19th September 2015, 08:51
ChangeLog for ffhevc 2.4.4 and ffx264 2.6.4
* Added support for encoding to MP3, Vorbis, FLAC and Opus audio
* Do some sanity checks for AC3/DTS channels
* Updated the README file
microchip8
4th October 2015, 12:28
ChangeLog for ffhevc 2.4.5 and ffx264 2.6.5
* Removed a test condition in the mp3 code that is not really needed
* Cosmetics in the audio code
* Added a counter
microchip8
31st October 2015, 13:54
ChangeLog for ffhevc 2.4.6 and ffx264 2.6.6
* Added support for audio resampling
microchip8
2nd November 2015, 18:06
ChangeLog for ffhevc 2.4.7 and ffx264 2.6.7
* Use -filter:a:id aresample instead of -ar:a:id
microchip8
3rd November 2015, 13:02
ChangeLog for ffhevc 2.4.8 and ffx264 2.6.8
* Use a single var to set the audio filters, in preparation for possible future extensions
microchip8
4th November 2015, 00:05
ChangeLog for ffhevc 2.4.9 and ffx264 2.6.9
* Made audio resampling optional
microchip8
21st November 2015, 22:00
ChangeLog for ffhevc 2.5.0 and ffx264 2.7.0
* Don't use dB for the volume filter
microchip8
26th November 2015, 18:42
ChangeLog for ffhevc 2.5.1
* Default params performance improvements. ONLY USE THIS VERSION IF YOU HAVE THE LATEST libx265/ffmpeg
microchip8
18th December 2015, 22:20
ChangeLog for ffhevc 2.5.2 and ffx264 2.7.1
* Add back using dB for the volume filter
microchip8
19th December 2015, 14:16
ChangeLog for ffhevc 2.5.3 and ffx264 2.7.2
* Added support for audio normalization using the Dynamic Audio Normalizer filter
microchip8
29th March 2016, 20:18
ChangeLog for ffhevc 2.5.4
* Support setting the MPlayer options
* Minor tweaks to the default x265 encoding options
ffx264 2.7.3
* Support setting the MPlayer options
microchip8
16th May 2016, 13:23
ChangeLog for ffhevc 2.5.5 and ffx264 2.7.4
* Only use side channels for DTS encoder which doesn't support anything else
microchip8
21st May 2016, 03:20
ChangeLog for ffhevc 2.5.6 and ffx264 2.7.5
* Add audio channel metadata
microchip8
27th May 2016, 17:52
ChangeLog for ffhevc 2.5.7 and ffx264 2.7.6
* Don't rm config file upon update. Just move it to .ffhevc.old / .ffx264.old
* Add audio bitrate metadata
microchip8
30th May 2016, 14:10
ChangeLog for ffhevc 2.5.8 and ffx264 2.7.7
* Support asking for container format if the CON variable is not set in the config file
* Warn and exit if user chooses MP4/M4V container and DTS audio
* Some minor code improvements
microchip8
7th June 2016, 20:09
ChangeLog for ffhevc 2.5.9 and ffx264 2.7.8
* Added support for cover art for the MKV container
smok3
8th June 2016, 05:55
Thanks for sharing, this will come handy. (I've been doing something similar (https://github.com/brontosaurusrex/singularity) (but much simpler), mostly various transcoders as tools/helpers for my daily editing needs. Also trying to be more modular this time, to avoid long spaghetti code.)
microchip8
8th June 2016, 11:23
ffx264/ffhevc are pretty simple and small. I will keep them that way and will no longer go the h264enc way. The latter got too complex and big for my taste. With ffx264/ffhevc I try to add just the "enough" for me, what I require to encode bluray remuxes
microchip8
9th June 2016, 03:28
ChangeLog for ffhevc 2.6.0 and ffx264 2.7.9
* Warn and exit if user provides an unsupported image format for cover art
* Added support for nosound option to disable audio encoding
* Updated the README file
microchip8
15th June 2016, 03:05
ChangeLog for ffhevc 2.6.1 and ffx264 2.8.0
* Added the MOV container to the list of containers that don't support DTS audio
* Made the audio volume filter optional
microchip8
29th June 2016, 15:09
ChangeLog for ffhevc 2.6.2
* Tuning to the default encoding options
microchip8
30th June 2016, 14:24
ChangeLog for ffhevc 2.6.3
* Added support for the built-in x265 presets
* Added a -h|--help option
* Tuning to the default encoding options v2
* Updated the README file
ChangeLog for ffx264 2.8.1
* Added support for the built-in x264 presets
* Added a -h|--help option
* Updated the README file
microchip8
3rd July 2016, 00:57
ChangeLog for ffhevc 2.6.4
* recursion-skip -> rskip to the default encoding options
microchip8
3rd July 2016, 18:26
ChangeLog for ffhevc 2.6.5 and ffx264 2.8.2
* Placed the supported audio codecs in a menu
* Updated the audio codecs default bitrates
microchip8
30th July 2016, 13:21
ChangeLog for ffhevc 2.6.6
* Update to the default encoding options
microchip8
12th August 2016, 00:15
ChangeLog for ffhevc 2.6.7 and ffx264 2.8.3
* Set the first video/subtitle/audio track as default
microchip8
16th August 2016, 13:37
ChangeLog for ffhevc 2.6.8 and ffx264 2.8.4
* Check the value of the astrm variable. This allows to properly remove any audio options in case no audio is detected
* Only display the audio codecs menu when audio has been detected or the user explicitly sets the track ID
microchip8
16th August 2016, 19:15
ChangeLog for ffhevc 2.6.9 and ffx264 2.8.5
* Switched to using getopts for parsing the options
* Added support for using x264/x265 tune profiles
microchip8
17th August 2016, 03:02
ChangeLog for ffhevc 2.7.0 and ffx264 2.8.6
* Added support for custom preset files (loaded with the new -c option)
* Added an example custom preset file to the package
* Added support for editing the config file with the vi text editor, using the new -e option of ffhevc/ffx264
* Updated the README file
microchip8
18th August 2016, 11:10
ChangeLog for ffhevc 2.7.1 and ffx264 2.8.7
* Added an EDITOR variable to the config file so the user can set his preferred editor for the -e option
* Added -r option to reset the config file to its defaults
* Cosmetics in the help info code
* Added man page
microchip8
18th August 2016, 17:38
ChangeLog for ffhevc 2.7.2 and ffx264 2.8.8
* Support asking for CRF value if it isn't set in the config file
* Support custom config files with using the x264/x265 preset/tune profiles
* Minor code updates
* Updated the man page
microchip8
19th August 2016, 15:04
ChangeLog for ffhevc 2.7.3 and ffx264 2.8.9
* Increased the frames value for the crop detection code
* Added ogv to list of containers not supporting DTS
* Cosmetics
microchip8
19th August 2016, 23:33
ChangeLog for ffhevc 2.7.4 and ffx264 2.9.0
* Added support for E-AC-3 audio encoding
* Add title metadata to the video stream
microchip8
20th August 2016, 21:26
ChangeLog for ffhevc 2.7.5 and ffx264 2.9.1
* NOSOUND audio option takes precedence so clear any other audio options given
* Workaround an ffmpeg disposition issue where in some cases it sets the default flag on all subsequent subs/audio tracks
* Bumped up default AAC bitrate
* Move the MOOV atom for MP4 files to the beginning of the file, for streaming-friendly files
* Enforce lower-case for container extension
* Added install script to the package
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.