Log in

View Full Version : .wmv -> .avi?


SirCanealot
26th August 2004, 13:46
Hi all.

I'm basically encoding some anime for a fansub group, but the raws are .WMV; WMV9 video, with some sort of WMA audio.

Of course, these don't open in VirtualDub, and AVISynth's DirectShowSoruce gives me the following error:

"Avisynth open failure:
DirectShowSource: I can't determinte the frame rate of the video; you must use the "fps" parameter"

I was told to use something like:
DirectShowSource("[RAW] GreenGreen Character DVD (Futaba&Chigusa) (640x480 WMV9).wmv", fps=29.97)
(swaping 30fps for 24fps when I actually discovered what the frame rate actually is -_-)
This opens in VirtualDub, but it throws in the error:
"Avisynth read error: Avisynth: caught an access violations at 0x00ed1f20, attempting to read from 0x00000004" blah blah blah

The next thing I tried was GraphEdit, which didn't work properly either.
It seemed to be able to open the video aspect of the file fine, but it complained that it couldn't find the correct audio codec (yes, I have the correct audio codec: as far as I know it's WMA, and I've specifically tried downloading the codec for that with no success).
So, I could probably write the video to .avi, but that's a little useless without the audio.

I'm not sure what else to try. Maybe there is a simple program that can be used for demuxing .wmv? Or maybe I can kick GraphEdit into finding the write audio codecs?

Any help would be great.

Thanks all.

stephanV
26th August 2004, 14:13
the corrrect audio codec (it needs to be an acm for VDub, not a directshow filter!!!) should be included with the divx 3.11 alpha install.

if you want to re-encode the audio you can also choose to extract the audio as wav with graphedit. remove you audio output device from the filter graph and connect the WMA DMO decoder (if you have WMP9, you should have this one also) with a wav dest and file writer filter, then press play. (i believe both filters are in the directshow category)

im afraid directshowsource might not work. i believe WMV9 is VFR by nature, but neither avisynth or AVI is. so you could get some desynch problems... or not. :)

alternatively you could convert to avi with TMPGEnc (which would handle/correct the VFR, but doing this losslessly requires quite some diskspace...

BTW - can you play this file in WMP?

SirCanealot
26th August 2004, 18:25
Originally posted by stephanV
the corrrect audio codec (it needs to be an acm for VDub, not a directshow filter!!!) should be included with the divx 3.11 alpha install.


I'm not sure what you mean about this...
The audio is WMA, so what does the audio codec that comes with DivX311 have to do with it?
I already have DivX311 installed anyway ^^

And wav output would be great, since I use WinLame for most of my audio re-encoding (manz is lazy x n, and WinLame is simple x n :P), so I'll try that a little later.

And Hmm, about VFR: I'm not really willing to use TMPGEnc unless I really have to, but how about muxing into a .mkv with GraphEdit? That'd at least mean I can open the file in VirtualDub, or does AVISynth/VirtualDub not open VFR mkvs? (never tried)
Or perhaps I could write to .avi and then try and figure out the 120fps hack, to which I could later decimate, or go to VFR .mkv?

I'm wondering what is the best thing to do :/

Thanks all

stephanV
26th August 2004, 18:35
I'm not sure what you mean about this...
The audio is WMA, so what does the audio codec that comes with DivX311 have to do with it?

DivX 3.11 is microsoft hack... audio tag 0161 right? you said you couldnt find any codec for the audio? i find this weird IF you have installed WMP9 (and divx3)


Or perhaps I could write to .avi and then try and figure out the 120fps hack, to which I could later decimate, or go to VFR .mkv?

not that kind of VFR, i mean dropping frames VFR. the encoder drops frames if it finds two frames look a lot like each other. matroska will not solve the problem... IF there is one, there might not be. but in my case conversions were always of with directshowsource.

AVISynth does not do VFR of any kind, neither does VirtualDub(Mod)

SirCanealot
26th August 2004, 20:41
Sorry, I meant I was wondering what the best method would be from GraphEdit(not AviSynth(, as I know I can mux .mkv from there.
Or, I'm not even sure what would happen if I wrote a VFM .wmv video to .avi, heh.

Liisachan
31st August 2004, 12:51
Originally posted by SirCanealot
I'm not sure what else to try. Maybe there is a simple program that can be used for demuxing .wmv? Or maybe I can kick GraphEdit into finding the write audio codecs? You can demux your WMV into vid + audio using Windows Media Stream Editor, which is officially released by MS, as a part of Windows Media Encoder 9 Series. (free)

as for converting WMA in GraphEdit, maybe something like this:

WMA file -> WM Audio Decoder -> WAV Dest -> File Writer -> WAV File

Yusaku
31st August 2004, 17:48
The only option I've found so far is transmuxing to matroska in graphedit.

Then you can use this utility from haali: http://haali.cs.msu.ru/mp_rel.exe to get vfr timecode file and AVI output.

Use the VFR file obtained to get the video to mkv at the end of editing; as it is indeed mkv and cannot be treated as avi for final muxing with sound.

Liisachan
1st September 2004, 14:53
TMPGEnc can read WMV and can transmux it into AVI
at least in my test.

SirCanealot
2nd September 2004, 00:37
Originally posted by Yusaku
The only option I've found so far is transmuxing to matroska in graphedit.

Then you can use this utility from haali: http://haali.cs.msu.ru/mp_rel.exe to get vfr timecode file and AVI output.

Use the VFR file obtained to get the video to mkv at the end of editing; as it is indeed mkv and cannot be treated as avi for final muxing with sound.

Sorry, I'm back with more no-understanding.
How do I use that program? I suck at command line stuff, and typing the name of the .exe followed by randomish commands (based on what it was telling me) follow by the filename of the file just got it to tell me the same thing over and over again ("Usage: mp matroska_file avi_file vfr_file").

Currently I'm going from:
.WMV -> .MKV (GraphEdit) -> End result = VFR hardsubbed .mkv file
I've also happaned to have tried encoding with Decomb521VFR1.0, and after muxing the timecodes.txt with MKVMerge, I get serve audio/video synch issues (well, the subtitles aren't showing up in the right places at any rate :/), and I am unable to seek in the file at all.
The script I used for that was:
DirectShowSource("cm.mkv", fps=29.97)
Decimate(mode=4,threshold=1.0,progress=true,timecodes="timecodes.txt",vfrstats="video.vfrstats")

Does anyone have any other easily put advise on how to make this into a VFM .mkv?
Should I try encoding to TMPGEnc to .avi first using something luke Huffy? (yes, that does work, but it takes bloody 40 minutes for a short file...)

Thanks again all... ^^

starship
2nd September 2004, 10:02
I wanted to make a question related to .wmv -> avi.

I have used windows media encoder 9 to screen capture a computer animation to .wmv. I want to get maximum quality and a divX final .avi so configured wme9 to capture with no video compresion. All was OK and can play video file in windows media player but can´t load it in any other software I´ve tried (graphedit, tmpegenc, avisynth).

I have captured with compresion a .wmv and have no problem transcoding it to divX with avisynth. Quality is good but not maximum of course because of 2 secuential mpeg4 encoding.

¿Anyone have an idea to use the uncompress file?

Cyberman
2nd September 2004, 10:08
Has there been any error message?

Perhaps the "uncompressed" uses a color encoding the other programs don´t know.
Try to compress it with Huffyuv - no loss of quality, yet smaller than uncompressed.

starship
2nd September 2004, 11:11
Vitualdub error is "Avisynth open failure.Unrecogniced exception"

I can´t choose compression in windows media encoder, but microsoft mpeg4 codecs, so HUFFYUV is not an option. If I could would tried to capture to divX.

Yusaku
2nd September 2004, 13:10
SirCanealot: Eeeeh. Forget decomb, you do not want to recompress video.

Anyway - first remux wmv to mkv (open wmv in graphedit, delete everything but codec outputs, put muxer there.....
eh, skip it - I found a more BFU-friendly way

download ASF2MKV from gabest, put in your file in notation file://c:\my\directory\structure\and_my_file.wmv and press record.

Save the file to e.g. root of C: drive as test.mkv

put MP_REL in root of C: drive

start>run>cmd.exe

c:

cd \

mp_rel test.mkv test.avi test.txt

that's it. Now you have avifile to edit and txt file with timecodes (which frame interval of AVI has what framerate)

SirCanealot
3rd September 2004, 15:35
Okay, I'm having MORE problems :/
First off, I tried asf2mkv, and this had problems recording one of my files: It'd work fine till about 90%, then it'd get VERY jerky, seem to miss a key frame, and then video is recorded corrupt untill the next key frame. The same thing also happened to someone else I asked to try this, so it wasn't just my file that was broken. However, asf2mkv works with another of the files, and I tried it with mp_rel, doing what was suggested above. However, now I've got the error from mp_rel: "Can't open Matroska file: Invalid first byte of EBML ID: 02"

I also tried one of the MKVs I'd muxed from .wmv->.mkv with GrapdEdit, but this gave the same error.

Does anyone have any idea what's wrong this time?

And Yusaku, I WILL be recompressing the video, as the subs used will be hard (some of these are music videos with flashy karaoke, so it's not about 500000mhz requirement for real time playback, haha). So, would decomb be handy if I say, converted to .avi using TMPGEnc to huffy or something? (I'm assume that'd give me 30fps output)
I'd be happy with TMPGEnc -> Huffy avi -> use VFR Decomb/XVid if it'd be easier, heh :)

Thanks again, everyone, but...
*still very confused* ^^

Yusaku
3rd September 2004, 16:25
Originally posted by SirCanealot
It'd work fine till about 90%, then it'd get VERY jerky, seem to miss a key frame, and then video is recorded corrupt untill the next key frame. The same thing also happened to someone else I asked to try this, so it wasn't just my file that was broken.

error in file, try to remux using some M$ utils or get the file anew. It uses standard DirectShow, so if it "misses" a keyframe it most likely means it is not there or is corrupted - thing that original splitter might be quite good at masking, but inhibiting any remuxing. Or try graphedit way of connecting WMV splitter to matroska muxer - but I guess results will be similar. Otherwise GIGO applies (garbage in, garbage out)
Originally posted by SirCanealot

However, asf2mkv works with another of the files, and I tried it with mp_rel, doing what was suggested above. However, now I've got the error from mp_rel: "Can't open Matroska file: Invalid first byte of EBML ID: 02"

well... the program (mp_rel) was just a quick fix and not publicly released, I think... and gabest's mkv muxer has also quite a lot to catch up to mkvtoolnix. Try to remux it in some older version of mkvtoolnix 1:1 (0.9 would be about right I guess).
Originally posted by SirCanealot

And Yusaku, I WILL be recompressing the video, as the subs used will be hard (some of these are music videos with flashy karaoke, so it's not about 500000mhz requirement for real time playback, haha). So, would decomb be handy if I say, converted to .avi using TMPGEnc to huffy or something? (I'm assume that'd give me 30fps output)
I'd be happy with TMPGEnc -> Huffy avi -> use VFR Decomb/XVid if it'd be easier, heh :)
etoo... well, at the moment you enter VFR boat, you have a problem that nothing except directsow supports it correctly... and DS is quite bad system for anything but playback. You can try to do all your encoding in graphedit (probably by applying avisynth filters through ffdshow) or other evil thing, but plainly speaking these approaches are untested, bad quality and mostly time consuming.

I suggest you try the easy way out - just open the WMV in TMPGEnc, frameserve and use - it will be jumpy, worst quality possible - but it will work and won't break avi applications.

holden
14th September 2004, 11:16
the easy way out - just open the WMV in TMPGEnc, frameserve and use
Although I've done that successfully, I gather all that goes out window when trying anything with WMV/HD DRM thingies? If I were to drop WM9 binary code onto my machine, would it decode the DRM for me and continue to allow my use of the above method? (I ask before doing because I'm hesitant to pollute my machine with M$ code that doesn't seem likely to work. So, do you know?)