I'm trying to convert several videos from H.264/6 channel AAC to a lower resolution XVID with stereo MP3 audio. VirtualDub doesn't have reliable H264 support that I've been able to find. I tried AviDemux but it either crashes or has the audio out of sync. I've searched for a tool that will do this in a single step, but haven't yet found one. The closest is ffmpeg, but I get the following error when trying to down-sample from 6-channel audio to 2-channel:
I'm currently converting the video with ffmpeg, then converting the audio to MP3 with AviDemux, then joining the two with VirtualDub using direct stream copying. The audio and video are in perfect sync and I achieve the quality that I'd like. However, needless to say this is a very slow process and a pain when ffmpeg could be doing it all in one pass.Code:Resampling with input channels greater than 2 unsupported. Can not resample 6 channels @ 24000 Hz to 2 channels @ 48000 Hz
After googling for a while, I found a post on the ffmpeg-devel mailing list that contains a patch to enable ffmpeg to down-sample from 6 to 2 channels. There was one response from somebody suggesting a function call change and saying that tabs aren't allowed in ffmpeg. Other than this, I don't know why it wasn't integrated with ffmpeg. (To me, they seem like silly reasons to reject a patch that would improve functionality.) OK, so I just have to incorporate this patch into the ffmpeg source and compile a custom version for myself. Can't be that big a deal, right? Just download a compiler (since M$ didn't include one as *nix does), ./configure, make, copy the executable somewhere, uninstall the compiler, and all is well, right? Nope.![]()
From reading the ffmpeg documentation on this, it sounds like I'll be spending more time getting everything working just to get it to compile without patching than it takes to jump through the 3 hoops I currently am doing to convert videos. Plus, I don't foresee needing to compile ffmpeg again in the future, so it's strictly a 1-shot deal.
I'm assuming that somebody here has their system set up to compile ffmpeg on windoze. I was wondering if somebody would be nice enough to download/apply the small patch from Jan 2008 to enable this, compile ffmpeg.exe with static libraries, and post it somewhere so that I might download it.
I would certainly appreciate it if somebody is willing to help me out. I will probably try to do it myself if nobody can; just hoping to save several hours of frustration for a one-time compile if somebody can do it easily in a few minutes.
On a side-note, does anybody know why this ability isn't in ffmpeg already? Both VirtualDub and AviDemux can resample 6 channel to stereo - this is truly the first time I've noticed that either has a conversion capability that ffmpeg lacks.
+ Reply to Thread
Results 1 to 6 of 6
-
Nobody is perfect. I am nobody. Therefore, I am perfect.
-
I hope someone can do it for you because that would save you a lot of time.
But if this doesn't happen then here's a complete guide to compile your own FFmpeg.
http://ffmpeg.arrozcru.org/wiki/index.php?title=Main_Page -
I'm pretty sure you could do this all in an Avisynth script, then load that in VirtualDub and save as XVid.
Will take you a while to get up to speed on that though, but it is a very useful tool to know.
I use it to downmix 5 or 6 channel to stereo, as I only have two speakers and no desire for more. -
Thanks for the link Chris. That happens to be one of the guides I was looking at after posting this and made me glad I posted. Looks very complex to me, especially so since I don't have a C/C++ compiler on my machines, much less the specific one that's required. (I personally HATE the languages... have ever since I was forced to use them in college.)
Alan, do you know of a way to import the H.264 MP4 into a AviSynth script? I've used AviSynth before and love the power it provides, but haven't been able to load such videos without using DirectShowSource(), which invariably has ended up with sync problems whenever I've used them in the past.Nobody is perfect. I am nobody. Therefore, I am perfect. -
Originally Posted by Ruler2112
For DirectShowSource, a few options that lock the fps and keep audio in sync:
Code:DirectShowSource("video.mp4", fps=25, ConvertFPS=True) EnsureVBRMP3sync()
Or, use FFmpegSource2. That seems to be able to digest anything. Main drawback is that it creates a large audio cache file.
As for the downmix, I use the functions from http://forum.doom9.org/showthread.php?p=1243880#post1243880
Also see Serving AAC sound through AviSynth if you have problems with getting audio.
Similar Threads
-
help - how to compile latest "nightly" ffmpeg for win32 (XP) with mingw
By hydra3333 in forum ProgrammingReplies: 32Last Post: 20th May 2017, 00:33 -
FFmpeg on Win only - FAQ can ffmpeg realize screen capture
By feelart in forum Capturing and VCRReplies: 1Last Post: 14th Feb 2012, 04:11 -
solved = struggling to get ffmpeg-php to compile
By richiedood in forum Video ConversionReplies: 30Last Post: 12th Jul 2011, 20:39 -
FFmpeg Win64 static trunk build with libfaac request
By astrosyn in forum Video ConversionReplies: 0Last Post: 14th Jan 2011, 16:37 -
FFMPEG QUESTION :How do I take one frame and make a jpeg with FFMPEG?
By goheadtry in forum Newbie / General discussionsReplies: 1Last Post: 18th Sep 2007, 02:55