[RNLD] Import .wav into .mp4?
Jeremy.Hammond at MPI.NL
Wed Mar 13 17:14:17 UTC 2013
A few things
1. .mp4 containers generally don't normally use a PCM audio stream. It is a compressed format and PCM is a lossless codec. A select few video cameras might create a h.264 codec + PCM codec in a MP4 container, some even mpeg2 codec + PCM codec in a MP4 container, but on the whole the data stream is most likely to be h.264 video + AAC audio in a MP4 container. I.e. PCM is not a standard of the MP4 container, so you really shouldn't try have a finished product with an mp4 (h.264 + PCM).
2. If you want a wave form in ELAN then you'll need to have a separate PCM file anyway. As far as I know it won't generate wave forms from video (though maybe this has changed recently?). In any case there are no archive-quality video container standards that include PCM audio streams.
3. It might sound trivial but the clocks on different recorders (i.e. the time measuring device) are often microseconds out. For a short clip (1min) this isn't a problem, but if you plan to splice the two together, it is very hard to them to stay in sync over a longer period of time (>15mins). They will start in sync, but by the end might be a good few seconds out, which for linguistics work is problematic. (If you can get a camera which records audio in PCM to start with then you are better off doing that.)
Having said that, you can do most of what you asked for with ffpmeg or ffmbc. They are command line programs, so they work with Mac, Linux and PC. They are free (of sorts) and are pretty easy to use if you are comfortable with terminal or prompt. FFmpeg can take a video file and remove the audio , then you would simply remake the video file with the new audio stream . The trick would be to first trim the audio with Audacity (or via CLI ffmpeg) first so that it starts at exactly the same time as the video file. You could conceivably trim the video too, but I would suggest that manipulating audio is much easier.
some sample lines of code would be (once you have ffmpeg installed etc.)
= ffmpeg.exe -i input.mp4 -na -vcodec copy output1.mp4
= ffmpeg -i audio.mp3 -i output1.mp4 -acodec copy -vcodec copy output2.mp4 (note you must convert the PCM file into mp3 for this to work, MP4 containers won't easily take a PCM file)
Let me know if this is the way you want to and I can give you more info on all this.
On 13/03/2013, at 8:54 PM, Frank Seidel <frank.zidle at gmail.com<mailto:frank.zidle at gmail.com>> wrote:
you need to align the two in Premiere or Final Cut or any other cutting program that allows several audio tracks. I cannot give you specifics about other programs because I do that in Premiere. The principle of it is not too hard to do though. You will have two audio tracks that you can align, which make things easier. Align the two audio spikes you created with a clap. You have to zoom in really close to do that. Then shift the new audio track forward or backward a little until you hear no echo anymore, if you play both audio tracks simultaneously. Delink the original audio from the video track, link the new audio to the video track, delete the old audio track and you are good to go.
There are plenty video tutorials on You tube. If you cannot find a good one contact me again and I have the link to one somewhere that I cannot readily find at the moment (for Prmiere only though, but the principles are explained which should enable you to transpose the process to a cheaper video cutter.)
Best of luck,
Frank Seidel, Ph.D.
University of Florida
Center for African Studies at the University of Florida
427 Grinter Hall - PO Box 115560
Gainesville, FL 32611-5560
On Wed, Mar 13, 2013 at 10:16 AM, Mark W. Post <markwpost at gmail.com<mailto:markwpost at gmail.com>> wrote:
Hi All -
I've been trying to figure out something which I feel *should* be pretty straightforward for quite some time now, but can't seem to find an ideal solution. Advance apologies if this is old hat.
I'd like to import a .wav file into an .mp4 container, ideally without using a big expensive program like Final Cut or Premiere. So, according to my poor understanding of things, an .mp4 contains an MPEG-4 video stream and a PCM audio stream. What I would like to be able to do is disassociate the audio stream, import a distinct .wav file, sync up the two streams audio-visually (i.e., with a clap), and export a new .mp4 file. And, to make it even more interesting, I would like to know how to do this on both a Mac and a PC. So, the situation I have in mind is when someone has a good HD camcorder with terrible audio, but a good separate audio recorder, and needed one resulting file (e.g. to import into ELAN). I realize that ELAN also has the ability to sync multiple streams, but I'd like to know how to create a stand-alone container file.
Many thanks in advance for any help!
Dr. Mark W. Post
Institut für Sprachwissenschaft
3000 Bern 9
Tel +41 31 631 37 07<tel:%2B41%2031%20631%2037%2007>
Eml markwpost at gmail.com<mailto:markwpost at gmail.com>
Syntax, Typology and Information Structure Group
Max Planck Institute for Psycholinguistics
E: Jeremy.Hammond at mpi.nl<mailto:Jeremy.Hammond at mpi.nl>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Resource-network-linguistic-diversity