VideoHelp Forum
+ Reply to Thread
Results 1 to 23 of 23
Thread
  1. Hello.
    I have a large WMV file (7 GB), with the audio sample rate of 48000 Hz.
    I want to change that rate to 44100 Hz, as quickly as possible (without recoding the video file - the image is perfect and I want to remain like this).
    And I have another reason (not to recode the video file): the file is huge (7 GB) and my PC is not so fast !

    Therefore, I want to know if there is a program that modify ONLY the audio file of the movie (in order to resample the rate)

    Thanks and best regards.
    Quote Quote  
  2. Try WMVMuxer , select "direct stream copy" for video and one of the 44KHz profiles for audio. You need WME installed

    Another method is to use Windows Media Encoder + Windows Media Stream Editor should be able to do it . Basically you encode a new version of your audio then swap it combining it with the original video

    Another method is to use avisynth to resample using SSRC(), wmnicenc to encode audio , and asfbin or WMV stream editor to swap the audio - this last method is the most convoluted but will work for sure
    Quote Quote  
  3. "Try WMVMuxer , select "direct stream copy" for video and one of the 44KHz profiles for audio. You need WME installed
    "

    Regarding this first choice, I already installed both programs, but I don't know which is the "main" program and which is the "aditional" program.

    When I click on "wmvmuxer.exe", I received a meesage like that : "Cannot continue. This program requires HDTV Dump Filter Version 1.2 or later"...
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    HDTV Dump is included in WMVMuxer. Just extract the Filters folder from the WMMuxer.zip and run the Register-HDTVDump.bat.
    Quote Quote  
  5. You have to register HDTVDump.ax ; it's in the instructions in the readme.txt file

    There should be a "filters" subfolder, and inside that there is a .bat file to register the filter ("Register-HDTVDump.bat"), double click it.

    EDIT: Baldrick too fast
    Quote Quote  
  6. Thanks a lot, guys.
    I manage to use the program, but unfortunatelly I don't succeed to resample the rate.
    Any combination I choose (containing 44100 Hz) does not work (I received a message with "catastrophic error").
    The only combination that works is with 48000 Hz, which is not convenient for me.
    Maybe I should extract the wav file first.

    BTW, cand you indicate me a program fr this ? A program which allows you to extract a WAV from WMV ?
    Thanks.
    Quote Quote  
  7. If it's WMA3 (not WMA PRO or 5.1) , You could use vdub with the wmv plugin or avidemux to save audio as wav, then resample to 44KHz in an audio editor (e.g. audacity), then reencode to WMA, the mux using WM stream editor . You can use mediainfo (view=>text) to view information about the file


    The 3rd option will definitely work as well (i've done it myself before) , but it might be difficult for you. This will handle everything including WMA Pro
    Quote Quote  
  8. According to the WINDOWS MEDIA PLAYER, audio codec is "Windows Media Audio 9 Professional 768 kbps, 48 kHz, 5.1 channel 24 bit 1-pass CBR"
    And one more thing : there are 6 channels.
    Quote Quote  
  9. Those "simple" options won't work for you then, the audio isn't supported by them

    You can try WME to see if it will work , or the avisynth route which work for sure (but requires some simple scripting)


    EDIT: actually the newest vdub with WMV plugin does seem to work now with WMA PRO 5.1 .... file=>save wav works. I just tested it (the old plugin didn't work, and file=>file information will say missing codec, but it seems to work ok). Try it out, it will be easier than learning how to use avisynth

    http://fcchandler.home.comcast.net/~fcchandler/
    Last edited by poisondeathray; 10th Jan 2011 at 12:34.
    Quote Quote  
  10. I tried VIRTUAL DUB with WMV Plugin. I load the file, than I choose the desired options regarding the audio parameters, but when I want to save the file, I received : "No audio decompresor could be found to decompress the source audio format".
    Quote Quote  
  11. Do you have WMP11 /12 installed ?

    maybe something is peculiar with your file ?

    can you post the mediainfo text view (view=>text) copy & paste the information back here , or cut a piece with asfbin and upload a sample here ?

    It's NOT supposed to work with vdub (WMA PRO 5.1 isn't supposed to be decodable by that method, but when I upgraded the plugin it seems to work for some reason - at least I think that's why)

    Can you try this test file below with vdub and use file=>save wav ? (It's VC-1 so you need enable VC-1 in the ffdshow VFW configuration -the yellow icon - to see the video, but for the purposes of this test, you don't need to see the video)

    If you use file=>file information it will say "missing codec" for the audio, but it will still convert to wav properly (at least for me it did)




    If you can't get it to work, I can walk you through the avisynth method

    edit : and here it is




    1) install avisynth

    2) open a text file in notepad in the same directory as the video, write the following, change the filenames to match, save it (doesn't matter what name), then change extension from .txt to .avs

    DirectShowSource("video.wmv")
    SSRC(44100)

    3) Open that .avs file in wmnicenc in the input avs file box , uncheckmark use video, checkmark use audio, select the option

    You probably want "WMA 10 Pro , 384kbps, 44Khz, 5.1 channel, 16bit CBR" , enter an output filename, push encode

    The resampling is actually done in the script by SSRC()

    4) Next, swap the audio out by using windows media stream editor, or asfbin

    Cheers
    Image Attached Files
    Last edited by poisondeathray; 11th Jan 2011 at 08:09.
    Quote Quote  
  12. Somehow, I manage to resample the audio rate, but know I realize that is not what I want !
    To be more specific, I have a LED TV Samsung, where I can play movies directly from HDD, using USB port.
    I have a movie with 44100 Hz 2 channels and works OK. I have another movie (that file with 7 GB) that has 48000 Hz and 6 channel.
    This second file does not play at the TV with sound (I can only see the video).

    I think that the problem is to switch from 6 channel to 2 channel (stereo).
    I already tried with VirtualDub, choosing "Stereo" at the SOUND CONVERSION. But when I proceed with this changes, I received a message like this : "Cannot convert audio : the source channel count is not supported (must be mono or stereo)".
    Or even worst (when I used some tricks), I received a video file with no sound. Maybe because the computer does not know which channels must remain and which must be erase.
    Anyway, I think that some channels (in my 7 GB file) are for sound, others are for voices, others are for environment sounds etc.

    Does anybody help me with a clue ?
    Thanks.
    Quote Quote  
  13. You have to downmix 5.1 to 2.0 and probably use wma3 2.0 instead of wma pro 2.0

    You have to be able to load the file into vdub inorder to downmix it , but it seems you can't load it even

    You can downmix in avisynth . Same instructions, just copy & paste , but change "video.wmv" to your filename

    a=DirectShowSource("video.wmv").SSRC(44100)

    fl = GetChannel(a, 1)
    fr = GetChannel(a, 2)
    c = GetChannel(a, 3)
    lfe = GetChannel(a, 4)
    sl = GetChannel(a, 5)
    sr = GetChannel(a, 6)
    l_sl = MixAudio(fl, sl, 0.2929, 0.2929)
    c_lfe = MixAudio(lfe, c, 0.2071, 0.2071)
    r_sr = MixAudio(fr, sr, 0.2929, 0.2929)
    l = MixAudio(l_sl, c_lfe, 1.0, 1.0)
    r = MixAudio(r_sr, c_lfe, 1.0, 1.0)
    MergeChannels(l, r)


    In wmnicenc, I would use something like Windows Media Audio 9.2 , 192kbps, 44Khz, stereo, CBR

    Before wasting time, check with mediainfo on the file that plays, to see what profile works

    Cheers
    Quote Quote  
  14. Thanks a lot. It works almost 90% !!!
    The file that works has the following audio codec : WMA 44100 Hz stereo 96kbps.

    After I recode the 7 GB file, the audio codec is PCM 44100 Hz stereo 1411 kbps.
    The only complain is that the sound can be heard with small interruptions (a few hundredths of a second every half a second). Something like a staccato sound.
    Quote Quote  
  15. Did you follow the instructions exactly? or what method did you use? Go back and double check. It looks like you did something wrong if it came out as PCM audio (you didn't select correct option)

    I'm fairly confident 128kbps 44.1Khz CBR stereo should play, 96 is getting pretty low quality but go ahead and try
    Quote Quote  
  16. Listen what I did :
    I put that script in NOTEPAD, than I save the file with *.avs extension.
    Than, I load this file in VIRTUAL DUB. I selected from the VIDEO codec the Xvid codec (if I choose "Direct Stream Copy", I obtain a 100 GB file), and for audio I selected "Direct Stream Copy" or "Conversion" with Mpeg Layer 3 Stereo.
    I can manage to obtain a good audio and video file, except that the audio is not sincronised with the video file. I mean, at the beginning, there is not problem, but as the movie plays I obtain a delay between the video and the audio and at the end of the movie I have a delay for about 10 seconds (between video and audio).

    The video parameters of the result file are : Xvid 1280 x 720 23.98 fps [Stream 00]
    The audio parameters of the result file are : PCM 44800 stereo 1536 fps [Stream 01]
    Quote Quote  
  17. the script decompresses audio to uncompressed , so you need to select a compression, otherwise it's PCM wav. wmnicenc encodes as wmaudio, so you save a couple steps (faster) .You're also re-encoding the video (losing quality and wasting time) ; I thought you wanted to keep original video ? You don't need vdub for this. You can copy the video (swap out the old audio as mentioned above with either windows media stream editor or asfbin)

    You can't use direct steram copy in vdub using a script (because video is uncompressed as well) , hence the huge filesize. Use the original video and swap out the audio; this way it's faster, same quality, smaller filesize

    as an alternative to directshowsource, use ffmpegsource which will index your file, and is more accurate (unzip and place the .dll in avisynth/plugins folder) . Directshowsource can be problematic because it depends on system installed codecs and filters
    http://code.google.com/p/ffmpegsource/

    change the script a bit

    aud=ffaudioSource("video.wmv").ssrc(44100)
    vid=ffvideoSource("video.wmv")
    a=audiodub(vid,aud).assumefps(24000,1001)

    fl = GetChannel(a, 1)
    fr = GetChannel(a, 2)
    c = GetChannel(a, 3)
    lfe = GetChannel(a, 4)
    sl = GetChannel(a, 5)
    sr = GetChannel(a, 6)
    l_sl = MixAudio(fl, sl, 0.2929, 0.2929)
    c_lfe = MixAudio(lfe, c, 0.2071, 0.2071)
    r_sr = MixAudio(fr, sr, 0.2929, 0.2929)
    l = MixAudio(l_sl, c_lfe, 1.0, 1.0)
    r = MixAudio(r_sr, c_lfe, 1.0, 1.0)
    MergeChannels(l, r)

    What is the frame rate supposed to be? Post the mediainfo text view of the original file. If it's 23.976 film, use the assumefps values in the script above (24000,1001)

    Some WMV are VFR (variable frame rate) , this will cause problems as well . I would need more information on the source file
    Last edited by poisondeathray; 12th Jan 2011 at 14:21.
    Quote Quote  
  18. The parameters of the source file are as follows :

    FROM MEDIA PLAYER CLASSIC
    Video : Windows Media Video 9 1280x720 23.98 fps 7200 kbps [Raw video 1]
    Audio : Windows Media Audio 48000 Hz 6ch 768 kbps [Raw audio 0]


    FROM WINDOWS MEDIA PLAYER
    Length : 02:09.23
    Bit rate : 7.96Mbps
    Video size : 1280 x 720
    Aspect ratio : 16:9
    Audio codec : Windows Media Audio 9 Professional 48kHz, 768 kbps, 5.1 channel 24 bit 1-pass CBR
    Video codec : Windows Media Video 9 Professional


    I am not sure, but I think that the problem with my TV is not the sample rate (48000 Hz), but those 6 channels.
    Quote Quote  
  19. Listen what I have done :
    1. I load the new script in VIRTUAL DUB and I extract the wav file. The parameters are : PCM 44100 Hz Stereo 1411 Kbps. The lenght of the wav is 129 min 21 sec, the file size is around 1400 MB. If I choose a codec (ex. Mpeg Layer 3, in order the reduce the file length), the duration of the wav is just 129 min (by the way, the video file has 129 min and 23 sec)

    2. I load the source file in virtual dub, I choose XVID video codec and than I choose AUDIO from other file (the extracted wav).

    Even so, I obtain a delay between the video and audio, the delay that become larger as the movie goes to the end.

    Then, I proceed with 2bis.

    2 bis. I load the script again in VIRTUAL DUB, I choose "Direct stream copy" for video, and than AUDIO from other file.
    The same result.

    I don't know what should I do more. Maybe I should use Windows Media Video 9 Professional CODEC in Virtual Dub to be exactly codec like in the source file (instead Xvid), but I don't see such a codec in Virtual Dub.
    I am close to succeed, but unfortunatelly, the delay problem still persists.
    Last edited by turbo20010; 13th Jan 2011 at 05:36.
    Quote Quote  
  20. Did you try the suggestions? wmnicenc ? asfbin ? wmse ?


    You cannot encode WMV Pro in vdub, but you can in wmnicenc

    Xvid/MP3 will be CFR, but there is a chance your wmv is VFR, hence another reason to follow the suggestions with wmse. AVI doesn't support VFR.

    VFR means there is data and timestamps that tells the player to play at different frame rates (speeds up , slows down in sections) , so even though the audio/video is different lengths, the audio is in sync. So if you use wmnicenc and wmse, it should keep the container timestamps (just swaps out the audio)

    You can check to see if the original is vfr, but using ffms2 and ffinfo() and checking in vdub for example. If the CFR and VFR times differ, you cannot use AVI container.



    There is a chance that you can shrink/expand either the video or audio to match lengths (if it's NOT vfr). e.g. the frameright not be correct for the video. Check video in gspot to see what reported frame rate is (it scans the file, not just reads header)

    Small fps increments or decrements for the video is the easiest way. e.g. 23.975 fps, 23.973fps etc... AVIfrate can do this or vdub for AVI. If you wanted to change the audio , any audio editor can do this.

    Eitherway there is something wrong when you encode wav=>mp3 (even though the wav is shorter, the mp3 is even shorter than the wav). Did you use CBR ?

    Good Luck
    Last edited by poisondeathray; 13th Jan 2011 at 09:41.
    Quote Quote  
  21. I did it !!!
    But don't ask me how I did it, because I don't remeber !
    Now I have a movie with the same video codec, and just 2 channels (stereo) instead of 6. And it looks great on my Samsung TV.

    THANKS A LOT, Poisondeathray !

    Just one more thing: supposed that I want to change the video codec from "Windows Media Video 9 1280x720 23.98 fps 7200 kbps" to "FFDshow H.264", what should I do ? Which is the most reliable and faster program ?

    Once again, thanks.
    Quote Quote  
  22. haha , at least something worked

    you can decode with ffdshow, don't ENcode with it (horrible quality) . Use x264 or one of the GUI's e.g. ripbot, handbrake, xvid4psp, megui. Use a faster, low quality preset if you want speed over quality. Beware encoding h.264 is very slow on old computers (you need multicores for fast encoding) .

    or in vdub you can use x264 vfw
    http://sourceforge.net/projects/x264vfw/
    Quote Quote  
  23. Thanks a lot.
    I just check in VirtualDub, and the estimated time for the whole project on my PC is 11 hours .
    Maybe I will let my PC to work over the night.
    Once again, thanks.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!