Hello,
Is it possible to use a lossless compressed FLAC audio track in an MP4 file?
The MP4 files are most commonly used on WhatsApp, YouTube, etc but have a lossy AAC audio track.
I came across this link which suggests using MKV container instead of MP4:
http://forum.doom9.org/archive/index.php/t-157319.html
Does it mean that this bottleneck is integral to MP4 format?
Thanks
+ Reply to Thread
Results 1 to 19 of 19
-
Sword is no substitute for kitchen-knife.
-
Yes, the .mp4 container does not support flac. Normally you would use alac when going for lossless audio inside a .mp4 container.
Yes, .mkv would be an alternative container which supports flac as audio stream.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Sword is no substitute for kitchen-knife.
-
MPEG-4 ALS codec for Windows - mp4alsRM23.exe
https://www.nue.tu-berlin.de/menue/forschung/forschungsgebiete/datenkompression_und_ue.../parameter/en/"Programmers are human-shaped machines that transform alcohol into bugs." -
nice
users currently on my ignore list: deadrats, Stears555, marcorocchini -
Support for ALAC is good but not universal. For example Airpods support AAC but not ALAC.
You may not like AAC audio but if sticking with what is common is important to you, AVC + AAC probably has the best support and is the most typical combination of audio and video for the mp4 container.
Odd that WhatsApp seems not to provide any guidelines beyond a 16 MB size limit for each video.Ignore list: hello_hello, tried, TechLord, Snoopy329 -
Sword is no substitute for kitchen-knife.
-
Sword is no substitute for kitchen-knife.
-
You can't use wav/pcm audio since .mp4 does not support wav/pcm audio.
(sometimes folks mux their content to .mov and rename it to .mp4 and clain they got a .mp4 files which contains wav/pcm, but that is not the case)users currently on my ignore list: deadrats, Stears555, marcorocchini -
Last edited by ConverterCrazy; 13th Oct 2021 at 13:46. Reason: Additional info
Sword is no substitute for kitchen-knife. -
No, mp4alsRM23 should be able to convert wav/pmc to mp4 als.
the help:
Code:mp4alsRM23.exe -h
Code:mp4alsRM23 - MPEG-4 Audio Lossless Coding (ALS), Reference Model Codec Version 23 for Win32 (c) 2003-2008 Tilman Liebchen, TU Berlin / LG Electronics E-mail: liebchen@nue.tu-berlin.de Portions by Yuriy A. Reznik, RealNetworks, Inc. E-mail: yreznik@real.com Portions by Koichi Sugiura, NTT Advanced Technology corporation E-mail: koichi.sugiura@ntt-at.co.jp Portions by Takehiro Moriya, Noboru Harada and Yutaka Kamamoto, NTT E-mail: {moriya.takehiro,harada.noboru,kamamoto.yutaka}@lab.ntt.co.jp Usage: mp4alsRM23 [options] infile [outfile] In compression mode, infile must be a PCM file (wav, aif, or raw format) or a 32-bit floating point file (normalized, wav format type 3). Mono, stereo, and multichannel files with up to 65536 channels and up to 32-bit resolution are supported at any sampling frequency. In decompression mode (-x), infile is the compressed file (.als or .mp4). If outfile is not specified, the name of the output file will be generated by replacing the extension of the input file (wav <-> als). If outfile is '-', the output will be written to stdout. If infile is '-', the input will be read from stdin, and outfile has to be specified. General Options: -c : Check accuracy by decoding the whole file after encoding. -d : Delete input file after completion. -h : Help (this message) -v : Verbose mode (file info, processing time) -x : Extract (all options except -v and -MP4 are ignored) Encoding Options: -7 : Set parameters for optimum compression (except LTP, MCC, RLSLMS) -a : Adaptive prediction order -b : Use BGMC codes for prediction residual (default: use Rice codes) -e : Exclude CRC calculation -f# : ACF/MLZ mode: # = 0-7, -f6/-f7 requires ACF gain value -g# : Block switching level: 0 = off (default), 5 = maximum -i : Independent stereo coding (turn off joint stereo coding) -l : Check for empty LSBs (e.g. 20-bit files) -m# : Rearrange channel configuration (example: -m1,2,4,5,3) -n# : Frame length: 0 = auto (default), max = 65536 -o# : Prediction order (default = 10), max = 1023 -p : Use long-term prediction -r# : Random access (multiples of 0.1 sec), -1 = each frame, 0 = off (default) -s# : Multi-channel correlation (#=1-65536, jointly code every # channels) # must be a divisor of number of channels, otherwise -s is ignored -sp#: Enforce ALS Simple Profile Level # (currently only #=1 is defined) -t# : Two methods mode (Joint Stereo and Multi-channel correlation) # must be a divisor of number of channels -u# : Random access info location, 0 = frames (default), 1 = header, 2 = none -z# : RLSLMS mode (default = 0: no RLSLMS mode, 1-quick, 2-medium 3-best ) MP4 File Format Support: -MP4: Use MP4 file format for compressed file (default if extension is .mp4) -OAFI:Force to embed meta box with oafi record -npi: Do not indicate the conformant profiles in the MP4 file Audio file support: -R : Raw audio file (use -C, -W, -F and -M to specify format) -S# : Sample type: 0 = integer (default), 1 = float -C# : Number of Channels (default = 2) -W# : Word length in bits per sample (default = 16) -F# : Sampling frequency in Hz (default = 44100) -M : 'MSByte first' byte order (otherwise 'LSByte first') -H# : Header size in bytes (default = 0) -T# : Trailer size in bytes (default = 0) -I : Show info only, no (de)compression (add -x for compressed files) Examples: mp4alsRM23 -v sound.wav mp4alsRM23 -n1024 -i -o20 sound.wav mp4alsRM23 - sound.als < sound.wav mp4alsRM23 -x sound.als mp4alsRM23 -x sound.als - > sound.wav mp4alsRM23 -I -x sound.als
Since I have never used mp4alsRM23 I can't recommend any settings.
Cu Selurusers currently on my ignore list: deadrats, Stears555, marcorocchini -
Yes, that compressed output is an audio-only stream in an mp4 container (aka m4a, m4b, like aac often is), or a raw .als elementary stream, so an extra step of muxing it with the video stream will be necessary.
Scott -
Different containers, different supported stream formats, nothing new.
users currently on my ignore list: deadrats, Stears555, marcorocchini
Similar Threads
-
ffmpeg losing subtitle track converting MP4 to MP4
By the_steve_randolph in forum Newbie / General discussionsReplies: 9Last Post: 31st May 2021, 16:42 -
Set a default subtitle track in a .mp4 file (with BOX4)
By Alice in forum SubtitleReplies: 1Last Post: 4th Oct 2020, 16:38 -
Lossless to MP4 Simple FFMPEG Commend.
By dellsam34 in forum Video ConversionReplies: 28Last Post: 6th Mar 2019, 22:15 -
replacing (and syncing) an audio track of an MP4 video file
By rotchild in forum Newbie / General discussionsReplies: 6Last Post: 23rd Dec 2016, 04:32 -
replacing (and syncing) an audio track from an MP4 video file
By rotchild in forum RestorationReplies: 0Last Post: 14th Dec 2016, 20:30