I have captured many videos (my performances mostly) through my DV camcorder into moviemaker, using the High Quality 2.1Mbps CBR settings. (The resulting WMV file is WMV3 encoded with WMV2 audio). In the same time I would also have my digital audio recorder turned on to capture a better quality sound (through a better quality mic etc). This would result in a 44.1KHz 16-bit stereo WAV file.
Now I have a challenge. I have correctly trimmed my good quality WAV file to match exactly what is inside the WMV file and what I need to do is
-GET RID OF the audio stream inside the WMV file, and
-REPLACE IT WITH this good quality audio.
**Since the quality of WMV file is already subpar (I didn't have much disk space to do the full DV quality), I need a solution that does not require re-compression. (I think one should call it re-muxing? Maybe not)
There are a number things I have tried (including going through the GraphEdit, making WMV into Matroska and then opening the file in VirtualDubMod and then trying to Save it with the new audio stream as direct stream without re-encoding, but 2 problems with that:
1) The video file loses the aspect ratio information (so my 720x480 1:1.3333 footage starts to look stretched)
2) The audio gets way out of sync as the video progresses (with video frames being shown way ahead of the audio).
I do not know how exactly WMV (ASF) files are constructed, but I am assuming that someone out there must know where inside one such file the audio resides, and, therefore, it seems likely that there is a tool in existence that would allow changing out the audio stream just like I have described.
Would anyone know of such tool, or, for that matter, any other way to achieve my objective?
Appreciate any ideas,
a1
+ Reply to Thread
Results 1 to 18 of 18
-
-
Have you tried Windows Media Stream Editor that is included in Windows Media Encoder 9 ?
Windows Media Stream Editor. Use the stream editor to split or combine streams in existing Windows Media files to create files. -
Perfect. Thanks for this tip. I wasn't aware of WME9.
I had to convert my WAV file to WMA (but luckily I have the audio editor that is capable of doing it).
Unfortunately, after creating my new WMV a minute ago I discovered that I still get the same audio-video sync drift issue as I was having before.
I'll investigate what's going on and report once I understand. (Will need to compare the original in WMV audio and my WAV inside the audio editor).
The only thing I can think of at the moment is that I had a "frame drop" somewhere that resulted in this sort of thing. -
Ok, first of all I think this thread could be closed, as you have answered my original question quite well - yes Windows Media Stream Editor could be used to combine video from a .WMV file with audio from a .WMA file.
Here is what I have learned about the sync problem - it is not a "frame drop issue", but a gradual thing.
Somehow the WMV file's audio, when examined side by side with my Portable Audio Recorder's file in an audio editor, is "losing time".
Specifically, it is a gradual loss that results in the same sound event happening about 1.8 seconds earlier after about an hour into the file.
I made the calculation and resampled my "good quality" audio file as follows - set the sampling rate to 41122 (from the original 44100), then resampled back to 44100 (now the file is just slightly shorter), and then re-muxed it as before, and got a perfect sync. Of course, this results in an imperceptably higher pitch, but that's ok.
I will need to run some more tests to determine what exactly is going on. Will do the same capture, but this time no WMV compression, and see what happens to the audio then.
Curious if anyone else has ever noticed this type of problem before. -
Windows Media Audio and the ASF container yes can give you that kind of headache sometimes.
The sync problem you met is of the easy type. I and some other members have already met the worst types.
My suggestion: drop WMM --- you may like it, but it's a very limited tool. If you really have to stick to the WMV file format, use WME, WMNicEnc or WMVmuxer for converting your DV files. HTH. -
Thanks for pointing out that this is a common problem.
Ok. I am happy to do anything that is correct and not ever use WMM again for capture.
But what would be another good program that will convert on the fly my video stream from my non hi-def DV camcorder (firewire) to a high quality compressed file (like WMV), while being limited by the 1.8GHz maximum output of my T42, and could be played on computers (and DVD players, remember WMV is supported on most DVD players nowadays) of most people?
I haven't found one that works well yet. Perhaps, you know one?
Additionally, I still need to process all the different files I have already captured in WMM (there is nothing about it that I particularly like, other than it is free, and it does work for capturing video in compressed format). For RAW DV capture I usually use dvio.exe. (which tells me if a frame was somehow dropped - I have built a script to tell me when that happens - and damn it, it happens often enough that it annoys).
Did I understand correctly that you think that using WME and the other WME-based tools you mentioned is superior to using WMM?
I'll be checking them out anyway, while processing the other WMVs I already have.
Thanks for the feedback. -
Another thing that I thought would be worth reporting is that while listening to my new WMV file (with good audio) after that WMSE process, I suddenly heard a (repeatable) glitch with audio in one spot. It was as if the audio data suddenly went missing for no good reason.
So, I checked my original .wma stream that was used in the muxing and found that it was absolutely fine - or at least it has no missing data showing up in the audio editor.
So, not sure what that means - buggy muxing by wmstreamedt.exe, perhaps?
That was 14:51 into this 1:15:15 long wmv file. Maybe I'll be finding more. -
Well, yes there were other glitches. But then I thought, what if perhaps I need to match the bit rate of the original audio as well. The original audio was 160kbps (I tried muxing with a file that I encoded as 320kbps).
Sure enough, after I re-encoded my WAV file as wma 160kbps, and muxed the whole thing again, these "dropped audio" glitches disappeared.
Is that a known issue that somehow the video strea, (wmv) "knows" what bit rate the audio stream should be? Or is it simply the case that 320 is way too much?
(I will be trying 256 to see if that works, or not). -
Ok, update on 160kbps: the glitches disappeared in those spots, but appeared in others.
This just sucks. I don't know what the problem is: WMSE or WMV format.
I'll post another question related to this in another thread, I think. -
First of all, apologies for the long delay.
I didn't have much disk space to do the full DV quality--- seriously. Try VirtualDub and save your video captures as
DV .AVIs, or even better, use a lossless video codec. Later you can use the other applications
for converting into WMV.
As for the audio part itself: lossy audio compression can produce noticeable artifacts
even at very-high bitrates, depending on the original source files and/or the encoding application
or method. As I said before, Windows Media Audio can be extremely annoying at times ---
--- perhaps because of the ASF container itself, maybe because of the inferior quality of its algorithms;
and more importantly, you won't get decent support from Microsoft regarding any issues with their proprietary scheme for audio compression.
P.S.: You said you'd prefer a video format supported by "everyone's PCs" and by
standalone DVD-players as well. That makes me wonder how many people still have computers
uncapable of playing back XviD videos -
Yes, you are right about Microsoft not giving any decent support for their own products. (But then, there are very few companies that have good support for their products).
Regardless of all that, I have already done "the wrong thing" by capturing hours and hours of video using WMV compression, and now I want to generate the best possible viewing experience from all those files. That's my struggle in this thread. I think that chances are someone else has had a similar struggle and they have come up with an answer. The point is - there are no audible "dropped audio samples" in the original WMV file, so I don't see why it shouldn't be possible to encode just the right type of .wma stream (with whatever software) and then mux it correctly with the .wmv video (hopefully using WMSE, what else).
@capture:
I believe I did once try to use VD to capture video and it failed for me.
I haven't tried it with the recent updates, but I will. If I can set it up to convert my DV stream on the fly into XviD (I have some kind of XviD encoder, which I have used before - what is this "Koepi" XviD I keep hearing about?), then I will be more than happy to make that transition.
I'll seriously think about acquiring more hard drive space, but perhaps I will have to first seriously consider upgrading my computer. -
Originally Posted by a1s2d3f4
Windows Media files and streams.
As a "last resource", you could also try the Solveig Asf Muxer for getting a non-WMA stream (an MP3 one, for example) in a WMV file.Even Windows Media Player should have no problem
with the resulting file, but I suspect it would be refused by most/all Windows-Media~capable standalones. HTH. -
@AsfBin
Yes, I had a look at it but did not find an option to mux a video and an audio stream together into one file. I have read through its help and just sent an email to the author. Have you used if for muxing? If so, what do I need to do - what am I missing?
@SolveigAsfMuxer
The only download I could fine was from a link you provided in a different forum thread:
http://www.solveigmm.com/files/SMMASF_2006_03_02.zip
I tried it (TestMuxerApp.exe) and when I try to load in my input file - wmv - a dialog box comes up that says "Fail to build DirectShow filter graph", which suggests that something isn't working. -
The only way I have found to minimize the audio glitch (i.e. once in a while there would be a slight "click", but not "Dropped audio") is by encoding my "good WAV" as VBR Lossless using wmenc.exe. Then Mux that with wmstreamedt.exe.
Bottom line is: Video editing sucks due to competing formats and poor support for existing ones. -
Originally Posted by a1s2d3f4
You could do this project more easily if you used the original DV or chose another format or container -
That is my next challenge - figure out what format/software to use for when I need to capture something but don't have GBs to spare.
I think it is understandable why I did what I did, considering I have Win XP.
What, in your opinion, is the superior format to go with? -
The problem is that the superior formats require more G - either GHz (in which case you need new computer) or GB (only another HDD).
-
Yeah, like MP4, I heard is very good as far as file size and image quality, but requires a lot from the CPU.
Similar Threads
-
How to stretch longer audio stream to a shorter video stream ?
By ralf07 in forum AudioReplies: 9Last Post: 31st Aug 2011, 22:42 -
Problem with WMV files with longer audio than video
By Jumpe in forum Video ConversionReplies: 2Last Post: 26th Jun 2009, 13:00 -
Does PS3 play DTS Audio Stream in Video Files on Harddisk (not via DVDs)
By Alterego in forum Media Center PC / MediaCentersReplies: 1Last Post: 5th Oct 2008, 08:41 -
Some WMV files won't stream, but play fine if downloaded
By DVantrease in forum Newbie / General discussionsReplies: 1Last Post: 2nd Jan 2008, 13:49 -
Convert DVDs to WMV files while Maintaining DVD 5.1 Audio and Video Quality
By JBredensteiner in forum DVD RippingReplies: 3Last Post: 18th May 2007, 17:58