I thought by now there would be audio support since you can wrap h264 in mp4 and mkv during encoding with x264 but there is no audio.
What parameter(s) do I need to include for video + audio in x264 ?
Thanks
+ Reply to Thread
Results 1 to 9 of 9
-
-
You can use ffmpeg libx264 if you want audio support
There is an x264 audio patch, but it's only compatible with older versions (about 2 years old) . Changes in the x264 API broke compatibility and nobody updated it. taro_06 regularly posted builds with the audio patch in the past, they are still up on his board -
The MP4 container supports MP1, MP2, MP3, AAC, DTS, AC3, ALAC, MPEG-4 ALS (besides Vorbis and some obscure low-bandwidth cräp).
The Matroska container supports many more audio formats.
Which audio formats should x264 include, then?
Only one of the above?
Some of the above?
All of the above?
Or none of the above? -
My source is analog captures from vhs. So, the audio is raw, 48khz. I was not encoding for any specific "codec" format (aac, ac3, etc), maybe that is why. It didn't occur to me to change anything. I was assuming that it would take care of that and encode to minimal format, thus aac or ac3. Anyway. If there is any parameters I need to include in the x264 script, let me know, or else i'll look into the ffmpeg method, thanks.
-
The x264 encoder has a single purpose: Encode H.264 video. The x264 CLI (= command line interface) encoder is just the simplest possible user interface. You are more or less "lucky" that x264 (in contrast to x265, yet...) already comes with a few convenience extras so that you can read more than just a raw video stream from the standard input, and output the result not only raw but also in some basic containers for better compatibility with picky follow-up applications. Just to save you a few more manual steps.
Instead, ffmpeg is the tool you need when you are looking for a multi-purpose converter. You have a choice of input formats, a choice of output formats (each both content and containers), and on top even several built-in filters (depending on the build details).
The reason for this separation is "division of labour": Codec developers can concentrate their attention on the development of high quality and high speed codec modules. And ffmpeg developers can concentrate their attention on the cooperation of all modules to one slightly more convenient framework. If codec developers had to make both a great codec and a convenient interface, they would have to re-invent wheels while being engine developers instead. -
Ok. So after searching and reading and trial/error, i finally have video/audio. May not be the best method or (audio) quality, but at least it works.
Code:ffmpeg -i movie.avs -c:v libx264 -x264-params preset=slow:tune=grain -c:a aac -strict experimental -b:a 160k -y video.test1.mkv
But the only problem I have is that ffmpeg is using an older version x264 and not the current one. -
You can compile ffmpeg with a newer libx264, and libfdk_aac (which is the highest quality AAC encoder ffmpeg has to offer), but it has to be compiled non-free . According to various tests, fdk-aac and quicktime aac are the best overall in terms of quality for AAC encoders
Or if you want to continue to use x264CLI, just make a batch file for video, audio and muxing . This is what the many of the various GUI's for x264 do (the ones that aren't ffmpeg based) -
yes, for avisynth script as input, you need Bepipe, NeroAacEnc (or something else), x264.exe, MP4box, this way you use always version you want, latest etc...
Code:set "fps=23.97" BePipe.exe --script "Import(^movie.avs^)" | neroAacEnc.exe -lc -cbr 160000 -if - -of "audio.m4a" x264.exe --crf 18 --preset slow --tune grain --output "video.264" "movie.avs" MP4box.exe -add "video.264":fps=%fps% -add "audio.m4a" -new "movie.mp4"
-
To compile ffmpeg with all current sources from this moment, you can use jb-alvarado's media-autobuild_suite (green button to the right: "Clone or download", download master ZIP, unpack in an auxiliary directory; run batch file to configure ffmpeg with "non-free" license, install an MSYS2 environment, download sources, and start the compilation; it will need a few GB free space and some time). Do not redistribute this ffmpeg binary!
It is also possible to configure VirtualDub 1.10+ (or VirtualDub Filter Mod) to use e.g. x264 + a CLI audio encoder (fdkaac or qaac) + a CLI multiplexer (MP4Box or L-SMASH) as "external encoders" to handle output streams from VirtualDub, instead of saving an AVI. This has been documented before here...
Similar Threads
-
3 languages support in ripbot x264 ?
By chibunda in forum Blu-ray RippingReplies: 4Last Post: 10th Apr 2016, 19:51 -
Looking for a Batch x264 Encoder with AviSynth Support
By VideoFanatic in forum RestorationReplies: 8Last Post: 19th Sep 2014, 12:08 -
TX264 0.9.7 - GUI for x264 with audio encoding support
By ozok in forum Video ConversionReplies: 4Last Post: 27th Jul 2013, 20:12 -
using x264 encoder with audio/video in one step possible ?
By vhelp in forum Video ConversionReplies: 8Last Post: 2nd Jun 2012, 18:37 -
How it possible Video: X264 encoder with Matroska encoder extension?
By flash_os in forum Newbie / General discussionsReplies: 1Last Post: 11th Feb 2012, 09:13