View Full Version : Can flac or .ass files be muxed into a MP4 container?
Cyber Akuma
7th October 2010, 06:11
I have a MKV file that I wanted to convert into MP4, and avoid re-encoding as much as possible to preserve quality which is why I want to do it manually and avoid automated encoding tools such as handbrake.
After extracting it with MeGui I was left with a .h264 video file, .flac audio file, and a .ass subtitles file.
Any attempt to mux the .flac and/or .ass file into an MP4 container failed.
First of all, I want to ask if its even possible (without breaking standards and thus making the file incompatible with many devices) to put FLAC audio into an MP4 container?
If not then no problem, I can convert it to AAC, a bit of quality loss is acceptable if its the only way.
I have no idea what to do with the .ass subtitle file though since I have never worked with soft subtitles before, how can I mux this into an MP4 file without breaking any standards? Do I need to convert it into another format? And if so, how?
Finally, if I am forced to go with hard coded subtitles, what would be the best way to encode the video and subtitle track together? I am aware that this would mean I would need to re-encode the video and thus suffer some quality loss...
Thanks
Keiyakusha
7th October 2010, 07:33
First of all, I want to ask if its even possible (without breaking standards and thus making the file incompatible with many devices) to put FLAC audio into an MP4 container?
Theoretically - you can put anything. Practically, it won't work anywhere. The same about ass.
The option you can try is to convert audio into alac (but not sure if there is alac decoder in ffdshow... and if it work on devices other that PC...) and subtitles into srt (they will be converted again into ttxt whe you'll mux them to mp4 using mp4box). But anyway this will be ugly. Another option for audio is probably AAC with highest quality setting.
zmaster
7th October 2010, 07:49
Cyber Akuma,
Why do you need to put .ass subtitles in the container? Do not convert them, leave the outer .ass subtitles. (For compatibility with hardware player subtitles can be sewn into the video.)
Cyber Akuma
29th October 2010, 14:04
(sorry for not replying to this in a while)
I don't want my videos to be made up of multiple files and would much rather have all the video, audio, subtitles, etc in one file.
Is there any way for me to add these subtitles to the MP$ file? Or do I need to convert them to another format before doing so?
Also, if I run into a player that can't so soft subtitles, what would be a good way to make a hard subtitled video with these files?
Sharktooth
29th October 2010, 15:50
they have to be converted to mp4 timed text format (TTXT). Subrip can do that.
however, mp4box reads .srt files and automatically converts them into ttxt when muxing to mp4.
flac audio doesnt fit.
i suggest to use the MKV container that can accept both FLAC audio and ASS subs.
dansrfe
29th October 2010, 23:36
Frankly speaking, I don't understand exactly why you want to use mp4 instead of mkv.
Cyber Akuma
30th October 2010, 16:06
MP4 is more widely supported than MKV
RunningSkittle
30th October 2010, 16:56
However FLAC and .ASS are not widely supported in mp4, while the opposite is true for MKV. Besides really its only the PS3 and Xbox that do not play MKV.
Cyber Akuma
30th October 2010, 18:21
they have to be converted to mp4 timed text format (TTXT). Subrip can do that.
however, mp4box reads .srt files and automatically converts them into ttxt when muxing to mp4.
flac audio doesnt fit.
i suggest to use the MKV container that can accept both FLAC audio and ASS subs.
I tried both SubRip and Subtitle Workshop.
I couldn't even figure out how to load the subtitles into SubRip, even with googling it.
Subtitle Workshop loaded the .ass file just fine and gave me many different formats to work with, but I didn't see the TTXT subtitle format, does Subtitle Format support exporting to this format?
However FLAC and .ASS are not widely supported in mp4, while the opposite is true for MKV. Besides really its only the PS3 and Xbox that do not play MKV.
Just about anything that plays video and isn't a computer doesn't support MKV but almost all support MP4.
The original file already is a MKV, I'm trying to convert it to MP4.
dansrfe
31st October 2010, 04:15
convert the flac to aac and use subrip to save the subs as ttxt (which you will have to figure out how to do).
RunningSkittle
31st October 2010, 08:32
Just about anything that plays video and isn't a computer doesn't support MKV but almost all support MP4
Perhaps this was true years ago but not in 2010+! The ones that ONLY support mp4 certainly will not support ASS or FLAC. Most hardware players (like WDTV, popcorn hour etc), some bluray players, and even modern TV's support MKV now.
filler56789
13th October 2022, 16:30
Overdue update
First of all, I want to ask if its even possible (without breaking standards and thus making the file incompatible with many devices) to put FLAC audio into an MP4 container?
Yes, now it is «officially» possible to store FLAC in MP4 files...
Since 2017, apparently. :-|
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.