Does anybody knows of an app to manipulate mp4 files? I mean:
- adding/removing audio tracks
- adding/removing subtitles tracks (and converting them to MPEG4 Timed Text before)
thanks!
+ Reply to Thread
Results 1 to 15 of 15
-
-
I don't know of any real front ends to these cli tools, but I know 2 cli tools that should be able to do it. mp4creator (part of mpeg4ip) or mp4box (part of gpac) can add tracks... I've never tried removing a track though.
You can find a precompiled binary of mp4box in a few video tools (fourtytwo & ffmpegx), but I think you'll have to build mpeg4ip yourself. If you do try to compile mpeg4ip yourself & you're on Tiger, get a cvs checkout - you won't be able to compile it otherwise.
From the mp4box's manpage:
Create a movie with subtitle:
MP4Box -add video.avi -add audio.mp3 -add Subtitle.srt mymp4.mp4 -
ok, I tried MP4Box. Great software, easy to use. I added a second audio track and 2 subtitles tracks.
But:
- after adding an audio track to a movie, quicktime wasn't able to open it again: error -50. (vlc and mPlayer still can, but quicktime is the less cpu intensive. H264 seems to be extremely demanding in terms of CPU usage for certain specific scenes containing a lot of movement and colors)
- I didn't find any software able to read the embedded subtitles. Do you know of one? -
Sorry to hear about the quicktime issues. You should report that bug to gpac - for all anyone knows, it *could* be a fixable issue - more likely a problem on Apple's end (which translates into "live with it").
The other mp4 players would be (none of which I would tell you to trip over trying to get):
Realplayer
Osmo4.app (part of gpac). I haven't returned to working on it - won't allow any files to be opened. You would have to build it (and if your not on Tiger, wxWidgets) from source.
mp4player (part of mpeg4ip). It might be able to handle subtitles. mp4player uses SDL; the gmp4player variant uses gtk2. Only the SDL-based player could actually play a file, but gmp4player had "Play text" (which might be different than subtitles for all I know) as a menu item. Unfortunately, mp4player has *NO* controls to that I could find - essentially just a window.
Maybe Handbrake can add tracks and leave it playable by quicktime. -
Thank you for the answer! I'll report the quicktime bug to gpac. It seems, that, the higher the quicktime version number, the more bugs and incompatibilities. Too bad.
Handbrake does only works with a DVD as source, doesn't it? Ok, I'll try it with a DVD...
Realplayer doesn't seem to be able to play my mp4 file. He only "see" the 2 audio tracks, and play both of them simultaneously, curiously.
I'll maybe try the two others. But since putting the srt files in the same folder as the mp4 file allow vlc to use them as subtitles, I don't really need them. It's just that it would be more handy to have only one file. And its frustrating to see that it is possible to create embedded subtitles, but it's not possible to use them... -
Nevermind - I just noticed your video codec was h.264. Those players won't play h.265/avc1. Just goes to show you: you can throw anything in a container - its the PLAYER that determines whether it matters.
-
Ok, MP4Box seem to have some problems with adding tracks. "Isomedia not compliant" or soemthing like this before adding an AAC audio track in a mov container. Nevermind, I'll check this out with the gpac people.
But Handbrake is able to create a file with double audio track, which is readable by quicktime. Only problem, Quicktime doesn't seem to understand this, because it's playing both audio tracks at the same time. -
That gpac worked on a mov container is... odd. Probably due to the similar atom structure, it just found something it can work with. There are a number of similarities between the formats (mp4 was based on quicktime).
The last time I let ffmpegX at a video file was many moons ago, so I can't help you there.
I'm unsure of what you are trying to do.
To extract raw aac from a mp4 file that has aac (.aac - raw aac bitstream -no wrapper) :
mp4box ~/Desktop/sample.mp4 -raw 1 -out ~/Desktop/raw.aac
Convert (.aac - raw aac conversion from an input wav file):
faac -r --obj-type LC ~/Untitled.wav ~/Desktop/out.aac
if you are extracting an aac track from an mp4 file into a virgin mp4 container (containing only the raw aac bitstream; essentially an iTunes m4a file), use mp4box:
mp4box -add ~/sample.mp4#audio -new ~/Desktop/new.mp4 -
Sorry, I wasn't very clear. I want to extract an audio track from a VOB file into an m4a or mp4 file. Something compatible with MP4Box, so that I can add it in a mp4 file afterwards.
I tried handbrake: it is very handy, you can add the two track at once, but the compression rate isn't that good in my opinion. Don't know exactly why. Maybe because I activated some prof. options in ffmpegX. Anyway, I'm still running some test on a short file, in order to campare the quality/size ratios, but I think ffmpegX is much better at using the x264 encoder. Are they many implementation of this x264? -
There are a number of front ends to the various implementation of x264 (x264, ffmpeg's incorporation of x264 & mencoder's incorporation of ffmpeg's incorporation). I compile x264 from the svn source, so I don't use any of the front ends & wouldn't really know. You can get a pre-compiled x264 binary in fourty-two, google for the manpage or type "x264 -h" and see your available options - a lot more than ffmpegX will ever give you.
As for working with the vob file, I haven't worked with them in some time. Logically, since "ffmpeg -formats" shows that ffmpeg doesn't decode vob files, you'll have to transcode the vob to something like an mpeg2 file, and then something like:
ffmpeg -i ~/sample.mpg -acodec copy -vn ~/Desktop/out.m4a -
I tried using Quicktime 7Pro to copy an mp4 audio file - it wouldn't let me do it. However, I still have a copy of Quicktime Player 6.5.2 around - that DID let me copy the audio file, and I pasted (using Add to Selection & scale) into the video in Quicktime 7 player, even added a 3rd audio track. I could select which one played with the properties window. I didn't get an mp4 output file though - it was tragically a mov - but it didn't require re-encoding.
Similar Threads
-
How to open .MP4 files in virtualdub? (i want to sharpen mp4
By fuc847 in forum Video ConversionReplies: 27Last Post: 22nd Apr 2015, 08:06 -
How to convert m2ts files to mp4 files with sound
By diets in forum Blu-ray RippingReplies: 8Last Post: 18th Jan 2010, 11:17 -
joining mp4 files
By slgorin in forum EditingReplies: 3Last Post: 3rd Sep 2009, 17:47 -
what is the relation between mp4 files and mov files?
By donaldxdog in forum MacReplies: 3Last Post: 3rd May 2009, 15:28 -
Converting mp4 files to avi files
By HartsVideo in forum AudioReplies: 1Last Post: 18th Jul 2008, 18:20