Serato Video General Discussion

Talk about Serato Video and Video-SL.

HELP ! HOW To MUX with Mediacoder. Replacing andio without re-encoding video to preserve quality

DjBlaze 4:55 AM - 20 January, 2009
Hey everyone. A little help please.

I want to clean up a lot of the audio on my videos, even ones ripped from PO aren't that great usually especially older songs.

I want to demux the 2 streams (video and audio), clean up or replace the audio, then MUX the new audio and original video streams back together preferrably in a .mov container. THis would keep the video at its original quality without going through a whole rendering and re-encoding process just to replace the audio.

I can't get this to work in Mediacoder. I've tried and tried, but it simply does nothing when I try to MUX. Can't really find answers anywhere so I figured I'd post.

I can do this the long way but I want to preserve as much quality of my videos as possible when editing. Mediacoder is fanstastic but I can't get it to mux.

Any mediacoder experts please help.

Much luv

BLAZE
a-swift 5:42 AM - 20 January, 2009
mpegstreamclip is an easy app to use for remuxing without re-encoding.
DjBlaze 6:13 AM - 20 January, 2009
THanks for a quick response Ill give a go
DjBlaze 7:25 AM - 20 January, 2009
no luck, i tried what it said in the manual about having the same name for video and files, with same extension, but wont open them together. I'm close I know it. Any ideas? What file formats are u using to open both a video and audio stream together, so it can then be exported/muxed?
DjBlaze 7:29 AM - 20 January, 2009
I tried mpv video with aiff audio, same file names, no luck

from their manual...

For .m2v, .m1v, .mpv video files, if a valid audio file with the same name and the .aiff, .aif, .m1a, .mp2, mpa, .ac3 extension exists, it will be opened together with the video file. If more than one audio file with a valid extension exists, the first will be opened using the above search order (that is, .aiff first, .ac3 last). Opening a demuxed video or audio file may take time; a progress indicator appears and you can stop the process with Command-. or Esc.
a-swift 2:50 PM - 20 January, 2009
Name the video file .m2v, name the audio file .aiff. Open the m2v file in mpegstreamclip, audio will mux on the file automatically. Verify by clicking the play button. You should hear audio. Save the muxed file.

It's really that easy man.
DJ DisGrace 3:54 PM - 20 January, 2009
^^^
this is assuming the audio and video files are the same length, correct?
a-swift 5:28 PM - 20 January, 2009
no. the files do not need to be the same length but they should be. why would you mux a video file with an audio that are different lengths. something is probably broken in this case. but yes, they can be different sizes and black or silence padding is added.

i use mpegstreamclip to mux 100's of mpg files. it works like a champ.
DjBlaze 11:31 AM - 22 January, 2009
so i can re-name a mp4 or mov file .m2v and rename a wave file to .aiff and have them in the same folder when opening?

gonna give a go soon, did find a work around in quicktime in the meantime.

thanks a-swift
a-swift 3:07 PM - 22 January, 2009
no. you can not rename an mp4 file to m2v. you can demux a VOB file from a DVD to m2v (video) and aiff (audio).

remember, the whole idea behind mux only is to join video to different audio and not re-encode.
DjBlaze 3:14 AM - 27 January, 2009
remember, the whole idea behind mux only is to join video to different audio and not re-encode.


Yea man I got that, thats what this is all about. Got it working in quicktime pro believe it or not, if i paste audio over an existing video and export to mp4, it allows me to "VIDEO PASSTHROUGH" therby muxing the streams. It's all done like this


EXPORT AUDIO FROM MP4 OR MOV FILE, CLEAN UP OR REPLACE SAID AUDIO.

PLAY THIS AUDIO THROUGH QUICKTIME PLAYER, IF YOUR QUICKTIME PLAYER IS YOUR DEFAULT PLAYER FOR WHATEVER FILE TYPE YOU HAVE (WAV OR MP3) IT WILL AUTOMATICALLY PLAY. IF ITUNES IS YOUR DEFAULT PLAYER THEN YOU NEED TO SELECT "OPEN WITH" AND QUICKTIME FROM THE FINDER MENU.

WHEN AUDIO IS OPEN IN QUICKTIME PRO, SELECT THE WHOLE THING WITH THE MARKERS AND PRESS APPLE-C

THEN PLAYBACK THE ORIGINAL VIDEO FILE IN QUICKTIME PRO. STOP PLAYBACK AND PRESS THE BACK ARROW TO ENSURE THE PLAY CURSOR IS AT THE BEGINNING.

HIT EDIT IN THE MENU IN QUICKTIME PRO AND CHOOSE "ADD TO SELECTION AND SCALE"

EXPORT THE PASTED AUDIO AND VIDEO WITH USING THE SAME EXTENSION AS THE ORIGINAL MOVIE (MOV, MP4) AND YOU CAN CHOOSE "VIDEO PASSTHROUGH" IN QT AND ENCODE THE AUDIO TO AAC 320

THIS ENSURES NO GENERATION LOSS THE VIDEO BY REPLACING THE AUDIO


THREAD CLOSED

HOPE THIS HELPS ANYONE IN THE FUTURE

ROCK ON

DJBLAZE.COM
a-swift 5:35 PM - 27 January, 2009
Also very easy with ffmpeg, requiring only a few characters to explain (none of them in caps)

ffmpeg -i video.mp4 -i audio.aac -vcodec copy -acodec copy newvideo.mp4
nik39 2:18 PM - 28 January, 2009
Quote:
Also very easy with ffmpeg, requiring only a few characters to explain (none of them in caps)

ffmpeg -i video.mp4 -i audio.aac -vcodec copy -acodec copy newvideo.mp4

Holy moly... that's brilliant. I never thought of that.

And I was struggling and fighting with mp4box. Doh!
a-swift 2:21 PM - 28 January, 2009
I don't know if the command actually works. Should though. Guess I should have tried it before I posted it. I was no where near a computer when I posted it though.
nik39 2:24 PM - 28 January, 2009
Hm, okay, this doesn't seem to work here. But probably ffmpeg chokes on VFR files. Gotta try with CFR.
a-swift 2:26 PM - 28 January, 2009
I'll test it out later today. I may be missing something.
DJ DisGrace 4:48 AM - 1 April, 2009
Quote:
remember, the whole idea behind mux only is to join video to different audio and not re-encode.


Yea man I got that, thats what this is all about. Got it working in quicktime pro believe it or not, if i paste audio over an existing video and export to mp4, it allows me to "VIDEO PASSTHROUGH" therby muxing the streams. It's all done like this


EXPORT AUDIO FROM MP4 OR MOV FILE, CLEAN UP OR REPLACE SAID AUDIO.

PLAY THIS AUDIO THROUGH QUICKTIME PLAYER, IF YOUR QUICKTIME PLAYER IS YOUR DEFAULT PLAYER FOR WHATEVER FILE TYPE YOU HAVE (WAV OR MP3) IT WILL AUTOMATICALLY PLAY. IF ITUNES IS YOUR DEFAULT PLAYER THEN YOU NEED TO SELECT "OPEN WITH" AND QUICKTIME FROM THE FINDER MENU.

WHEN AUDIO IS OPEN IN QUICKTIME PRO, SELECT THE WHOLE THING WITH THE MARKERS AND PRESS APPLE-C

THEN PLAYBACK THE ORIGINAL VIDEO FILE IN QUICKTIME PRO. STOP PLAYBACK AND PRESS THE BACK ARROW TO ENSURE THE PLAY CURSOR IS AT THE BEGINNING.

HIT EDIT IN THE MENU IN QUICKTIME PRO AND CHOOSE "ADD TO SELECTION AND SCALE"

EXPORT THE PASTED AUDIO AND VIDEO WITH USING THE SAME EXTENSION AS THE ORIGINAL MOVIE (MOV, MP4) AND YOU CAN CHOOSE "VIDEO PASSTHROUGH" IN QT AND ENCODE THE AUDIO TO AAC 320

THIS ENSURES NO GENERATION LOSS THE VIDEO BY REPLACING THE AUDIO


THREAD CLOSED

HOPE THIS HELPS ANYONE IN THE FUTURE

ROCK ON

DJBLAZE.COM


Blaze - thanks for the walk thru, but all this seems to do is add the audio (acapella for example) on top of the existing audio.

I had to export as video only (passthru), then "add to selection and scale", then export with the audio as above

Otherwise this works perfectly.

Did I miss something? Do you demux the original MP4 first?

I'm trying to avoid having to re-rip DVDs as VOB to de-mux and re-mux...
a-swift 1:30 PM - 1 April, 2009
Demux then remux
DJ DisGrace 3:45 PM - 1 April, 2009
what program would you suggest to demux mp4? mpegstreamclip only does VOB as far as I can tell
a-swift 1:51 AM - 2 April, 2009
Quote:
what program would you suggest to demux mp4? mpegstreamclip only does VOB as far as I can tell


did you try quicktime?
DjBlaze 10:23 AM - 2 April, 2009
I missed something in my earlier post

"THEN PLAYBACK THE ORIGINAL VIDEO FILE IN QUICKTIME PRO. STOP PLAYBACK AND PRESS THE BACK ARROW TO ENSURE THE PLAY CURSOR IS AT THE BEGINNING."

I forgot to mention you need to export the video in quicktime using video passthrough but export it without the audio, then play the VIDEO only file and do the add to selection and scale.

My mistake DisGrace,

Let me know

BLAZE
a-swift 3:54 PM - 2 April, 2009
yeah that's what i was trying to say. open the file in quicktime, delete the audio track and save only the video. now it's demuxed.
DJ DisGrace 4:14 PM - 2 April, 2009
ok... that's what I ended up doing...

I was hoping for a "demux" button lol
SUBSTANCE 1:10 PM - 3 April, 2009
I'd like to do this to un-censor a lot of my videos.
I know matching CD audio to music videos will be tricky, especially with all the intros/cameos/outros/switches that music vids have.
I even have music videos straight off CD singles with terrible audio quality that needs replacing.
Does Quicktime allow you to at least shift your audio start point?
a-swift 4:40 PM - 3 April, 2009
Quote:

Does Quicktime allow you to at least shift your audio start point?


yes.

but it's easier to demux the audio and make your replacement audio the exact same length, start point as the original audio from the video file. then remux the replacement audio with the video file. don't try shifting the start point, you'll run into problems. just add or remove silence from the new audio to make it exact. this is easy to do in an audio editor.
Dj Ace 6:42 AM - 10 April, 2009
sticky!
Dj TopDonn 11:07 PM - 10 April, 2009
Thanks for the tips folks, used Quicktime Pro and it worked pretty well.
DjBlaze 7:49 AM - 11 April, 2009
You're quite welcome kind sir.
DJMuErTe 3:17 AM - 21 May, 2009
any other program besides quicktime to mux mp4 files?
Please update
a-swift 1:04 AM - 22 May, 2009
ffmpeg
marx 1:20 AM - 22 May, 2009
yamb for you non commanders
Funkytownstopsix 6:25 PM - 22 May, 2009
I looked up ffmpeg and demux in the dictionary and saw A picture of A-Swith. : 0)