VideoHelp.com forum archive
http://www.supermediastore.com/



Forum Archive Home -> User guides -> How to open MP4,MKV,WMV,RM,MOV,OGM with any editor,encoder



How to open MP4,MKV,WMV,RM,MOV,OGM with any editor,encoder
Baldrick posted 2005 Nov 11 13:39
How to open/import MP4,MKV,WMV,RM,MOV,OGM with any editor,encoder like Virtualdub, Tmpgenc, Windows Media Encoder, etc using Avisynth. It may not work for all above formats, it depends what kind of audio and video codec that is used.

Be sure that you can play the video in Windows Media Player.
Install Windows Media Player 10 for WMV9.
Install haali media splitter for MP4, OGM, MKV.
Install xvid codec or divx codec for MP4,MKV with divx,xvid.
Install ffdshow for MP4,MKV with h264/x264.
Install Real Alternative for RM,RMVB,RAM video.
Install Quicktime Alternative for MOV video.

Install avisynth, http://prdownloads.sourceforge.net/avisynth2/Avisynth_256.exe?download
Start notepad.
Type

DirectShowSource("c:\locationto\video.mp4")

replace c:\locationto\video.mp4 with the location to your video file.

File>Save as
Select Save as type: All files
Save as video.avs


Open the video.avs with Windows Media Player and it should play.

You can now import the video.avs file in for example Virtualdub, Tmpgenc, Windows Media Encoder or most other editors. When you import the file in your tool select All files under Files of type to see the .avs file.



dipstick posted 2005 Nov 18 08:11
Great!

And it works for the MOV out of my Digital Camera in conjunction with Quicktime Alternative. Now I can finaly edit them in Virtualdub.



BJ_M posted 2005 Nov 18 18:22
doesnt seem to work with premiere, vegas, avid ....


dipstick posted 2005 Nov 19 13:41
Probably because they don't support AVS. I know Premiere Pro does'nt.

Wax2 handles AVS just fine.



gastorgrab posted 2005 Nov 19 14:46
:
doesnt seem to work with premiere


Would something like this work? (i'm not a Premiere user)
http://videoeditorskit.sourceforge.net/

It appears to be an attempt to update this project;
http://neuron2.net/www.math.berkeley.edu/benrg/avisynth-premiere.html
.



Gi-Ma-Mi posted 2005 Nov 19 15:22
if it said: I can't determine the frame rate of the video, you must use the "fps" parameter...
what should i do?



Baldrick posted 2005 Nov 19 15:31
vfapi reader ->open avs -> premiere?

gimami: try DirectShowSource("F:\test.rmvb", fps=24, convertfps=true)



Gi-Ma-Mi posted 2005 Nov 19 16:23
do i need to install vfapi reader?


BJ_M posted 2005 Nov 20 16:10
yes vfapi works always with premiere and vegas - BUT it really cripples speed and also also forces a color conversion in most cases ...

but it is a worthwhile option in many cases ...



Safesurfer posted 2005 Nov 20 18:06
FFDSHOW also comes with a program called MakeAVIS for creating dummy AVI files, but it's dependent on using FFDSHOW for decoding.


veloslacker posted 2005 Dec 26 02:27
I'm a relative newbie at this, so maybe someone could answer a question for me. I tried this out on a wmv HD file. I could open up the file and edit it fine with virtualbub. The problem comes when I try to save the edited file. I go to "Save as AVI" and then change the file type to "All files", then specify the file name as ****.wmv. It proceeds to save but starts creating a huge file... many times bigger than the original. I have the video options in virtual dub set to "direct stream copy" that normally works fine for avi files. I tried other video options too, but couldn't get it to work.
Can anyone tell me the procedure to save the wmv file without creating an enormous file?

Thanks



Baldrick posted 2005 Dec 26 03:17
you can't use direct stream copy(no reencoding) for wmv files or avisynth frameserved files. use a compression under video->compression.


kschang posted 2005 Dec 26 03:45
veloslacker :
I'm a relative newbie at this, so maybe someone could answer a question for me. I tried this out on a wmv HD file. I could open up the file and edit it fine with virtualbub. The problem comes when I try to save the edited file. I go to "Save as AVI" and then change the file type to "All files", then specify the file name as ****.wmv...


Wow, hold it.

Your mistake is trying to 'force" a filetype by renaming the extension. AVI is NOT WMV, so that by itself would have already messed you up, as the result will NOT be readable.

:

It proceeds to save but starts creating a huge file... many times bigger than the original. I have the video options in virtual dub set to "direct stream copy" that normally works fine for avi files.
Thanks[


VDub by default saves an AVI file as "Uncompressed RGB" which results in a huge file size. Direct Stream Copy only works when you are NOT using AVISynth to trick VDub into accepting other formats. If you are using AVISynth, you pretty much HAVE to use full processing and select a codec for compression. I've found that the Microsoft MPEG4 V3 codec seems to work well enogh, as well as DIVX5.1 codec. Of course, generating those files through codecs will take time.



veloslacker posted 2005 Dec 27 01:51
Thank you everyone for the replies to my question. Ok I think I sort of understand you... the virtualdub/avisynth method won't work for editing wmv files without compressing/re-encoding, right? Is there another tool that can be used for editing wmv that is reasonably user-friendly, and does it in as few steps as possible. I usually just need to remove a few sections from the files.

Thanks in advance



Baldrick posted 2005 Dec 27 03:45
you can try asfbin if you want to cut wmv.


tbfl posted 2005 Dec 27 19:25
This method worked to get Virtualdub to play the file, but the video has a severe delay behind the audio.....


kschang posted 2005 Dec 28 03:31
If you let VDUB do the full render to a file the file should play fine.


tbfl posted 2005 Dec 28 20:15
Still no luck with MP4 video (Diggnation epsidoes in m4v to be exact)....I've tried Graphedit, Virtual Dub, and Canopus - all process with the audio way out of sync - evn though they all show the total time of the audio and video to be the same. I tried doing the cideo seperate from the audio - they both show the same time...but both end up wildly out of sync.....


kschang posted 2005 Dec 29 04:02
M4V? That thing may be using AAC audio codec. You may need to turn that back into MP3 or even PCM, then mux them back. Use VideoDetective on the file first...


baconharvester posted 2005 Dec 30 11:48
I've tried doing this with a real media file but it doesn't seem to work, I keep getting an error that says Avi synth open failure: Script error: (C:\Documents and Settings\baconharvester\Desktop\video.avs, line 1, column 1) Someone also recommended that I add in the frame rate, but how would I find it? And is it ok if I use wordpad instead of notepad, because I don't have notepad on this computer anymore.


kschang posted 2005 Dec 31 23:58
baconharvester :
I've tried doing this with a real media file but it doesn't seem to work, I keep getting an error that says Avi synth open failure: Script error: (C:\Documents and Settings\baconharvester\Desktop\video.avs, line 1, column 1) Someone also recommended that I add in the frame rate, but how would I find it? And is it ok if I use wordpad instead of notepad, because I don't have notepad on this computer anymore.


Here's my version, replace the bolded section with your own filename

:
#ASYNTHER DirectShow_NTSC, just a comment
DirectShowSource("C:\My Documents\SomeVideoName.rmvb", fps=29.97, convertfps=true)


Note the fps parameter, and the convertfps parameter. This is for NTSC 29.97 fps, so that's why the setting. If you are outputing to some other fps then you'll need to change it.

As long as you use TEXT/ASCII format you're fine, but how can you NOT have Notepad on your machine? Download a replacement like EDITPAD or something. You can't live without it!



jimmalenko posted 2006 Jan 11 21:08
kschang :
... but how can you NOT have Notepad on your machine?

I'm sure I've seen a number of apps of similar ilk to TweakXP that allow you to uninstall a lot of Windows "optional" features and accessories. Heck, even Add/Remove Programs > Windows Components would probably let you uninstall it too.

kschang :
You can't live without it!

... the minute you start doing any scripting/coding, that's for sure !



BJ_M posted 2006 Jan 12 18:25
freeware version of notepad

http://www.flos-freeware.ch/notepad2.html



lordsmurf posted 2006 Jan 17 02:19
Good guide. :thumbs_up:


FulciLives posted 2006 Jan 18 01:23
I have a MKV video file that plays back A-OK with MEDIA PLAYER CLASSIC but it will not play with WMP 10 or BSPlayer or anything else.

I tried this (rather simple) AviSynth script but I get a "no-go" trying to open it up in VirtualDubMod as well as TMPGEnc Plus.

Any ideas?

- John "FulciLives" Coleman



gastorgrab posted 2006 Jan 18 04:51
Two ideas :idea:

1. MPC has filters built into it doesn't it?

The file might play with MPC even though your system doesn't have a DirectShow decoder for it.

2. Occasionally, multiple audio streams appear in Matroska files. I've had trouble in the past using AviSynth with them. Remux to a single Audio/Video stream.
.



FulciLives posted 2006 Jan 18 06:38
I installed MKVtoolnix and then MKVEXtractGUI

This combo allowed me to take that MKV file and demux it into what became 3 files. An AVI video file, a MP3 audio file and a SRT subtitle file.

The AVI file is strange though and I only got it to load into VirtualDubMod and TMPGEnc Plus using the following:

DirectShowSource("C:\video.mkv", fps=23.976, convertfps=true)

Only problem is I have no idea what the fps should be (it is a downloaded anime file).

Anyways it ain't the biggest deal that I convert this to DVD format but it was something I was fooling around with and then I saw this thread so I figured "oh a new project to work on" LOL ... see I've never worked with MKV files before so ...

It looks like it will work now. I just have to use VobSub or TextSub or whatever to burn the subs in as I find that easier than trying to author with selectable subs. If I run into problems I will report back otherwise I assume it is A-OK now. I just have to remember how to add the subs via AviSynth (it's been a while).

- John "FulciLives" Coleman



gastorgrab posted 2006 Jan 18 09:25
:
Only problem is I have no idea what the fps should be (it is a downloaded anime file).


MKVToolnix package has another tool, command line usually, but it has a hidden GUI.

If you make a shortcut to it, then edit it like so;

:
In the package MKVToolnix is a command line tool "mkvinfo.exe" that HAS a hidden GUI built in. To access the GUI use a "-g" at the command line or make a shortcut with;



...it should give all the specs of the file.
.



OutSiderBR posted 2006 Jan 18 11:47
Baldrik,
Just one simple question : I read all the DirectShowSource help part in AVISynth help file and I could not find any citation on parameter convertfps. Can you please tell me how you got to know the existence of this parameter and what it does ? Is there a program that shows all the parameters in AVISynth filters.
Regards



Jim44 posted 2006 Jan 18 13:04
OutSiderBR :
Baldrik,
Just one simple question : I read all the DirectShowSource help part in AVISynth help file and I could not find any citation on parameter convertfps.


Hmm, I found it right on this page:
http://www.avisynth.org/DirectShowSource
6th item under "Description".

Jim



FulciLives posted 2006 Jan 18 16:54
OutSiderBR :
Baldrik,
Just one simple question : I read all the DirectShowSource help part in AVISynth help file and I could not find any citation on parameter convertfps. Can you please tell me how you got to know the existence of this parameter and what it does ? Is there a program that shows all the parameters in AVISynth filters.
Regards

You probably have an old version of AviSynth.

I had to upgrade myself to get the convertfps function to work.

It is documented on the AviSynth website as noted by Jim44.

- John "FulciLives" Coleman



OutSiderBR posted 2006 Jan 19 03:34
Thanks a bunch, Jim and FulciLives. I have to get used to reading online documentation. :oops:

I will upgrade it to 2.5.6a.



ramian posted 2006 Feb 04 09:42
I download a podcast and when I used this method, I'm able to open the file in VirtualDub. But VDub is unable to recognize the audio. I converted the original m4v file to mp4 first. GSpot doesn't seem to work with mp4 files very well and so can't read the audio info. Is there anyway I can read (and convert the audio) in VDub?


Thanks!



Baldrick posted 2006 Feb 06 11:53
try super 1, it supports everything.


ramian posted 2006 Feb 07 06:33
Thanks for replying.
SUPER is able to convert the video, but not the audio. The resulting video file doesn't have any audio. If I'm able to play the original file (with audio) in MPC, any of these programs should be able to recognize the audio right? I was hoping your method of using your DirectShowSource method to get the audio to be detected could be used.

Thanks!



Baldrick posted 2006 Feb 07 09:26
if super can't convert the audio give up...:)....it's based on mencoder,ffmpeg that can convert everything.

mpc has builtin codecs so it might not work with directshowsource. do you get any audio in wmp?

what does yamb say about the audio?



ramian posted 2006 Feb 12 13:04
I get audio in WMP10. Yamb 1.5 says the following about the video file:
:
* Movie Info *
Timescale 600 - Duration 00:14:52.021
Fragmented File no - 2 track(s)
File Brand MSNV - version 16777260

File has root IOD
Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
Visual PL: AVC/H264 Profile (0x15)
Audio PL: AAC Profile @ Level 2 (0x29)
No streams included in root OD

Track # 1 Info - TrackID 1 - TimeScale 29969 - Duration 00:14:52.021
Media Info: Language "und" - Type "vide" - Sub Type "avc1" - 26733 samples
MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
AVC/H264 Video - Visual Size 320 x 240
Self-synchronized

Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 00:14:52.010
Media Info: Language "und" - Type "soun" - Sub Type "mp4a" - 41813 samples
Unknown track type

Is there anything I can do to convert this video?



kschang posted 2006 Feb 12 16:40
As YAMB said, the sound track is in AAC, which very few integrated tools actually support. I think you have to separate the track and convert AAC separately.


ramian posted 2006 Feb 13 06:17
I looked through the guides on this site but didn't see any for extracting and converting AAC audio tracks from MP4 videos.
Anyone?



Baldrick posted 2006 Feb 13 06:48
extract with yamb and convert with belight.


Gi-Ma-Mi posted 2006 Feb 21 00:21
i can't open my rmvb files in these day with virtualdub, is it because my realaternative is not working anymore? 'cause i heard someone said that realaternative is not stable


kschang posted 2006 Feb 21 00:39
You are doing it through AVISynth template, right?

Check Gabest's site on SourceForge for latest Real Splitter.



Gi-Ma-Mi posted 2006 Feb 21 00:43
kschang :
You are doing it through AVISynth template, right?

Check Gabest's site on SourceForge for latest Real Splitter.

i write the script in Avisynth and then open the avs file with VirtualDub like i always did, but this time, VirtualDub crashed, i wonder why :cry:



webvideo posted 2006 Feb 22 21:33
Someone suggested I try total video converter by effectmatrix, but it did not work, and ended up crashing my system so many times I had to reformat and start again - this software is a nightmare!!


Selena21 posted 2006 Apr 15 11:45
I followed your tutorial of how to open an mp4 file and with your help I suceeded in open it in TMPGEnc to convert it to an mpeg file but unluckily there is no audio in the file.When I have an avi file and have this problem I use avi audio decompressor but with this kind of file it doesn't open. Can you help me pls?


kschang posted 2006 Apr 15 20:05
Look up a few messages, where Baldrick suggested two programs... Yamb, and BeLight. Use those.


Steve Walsh posted 2006 Aug 28 15:56
just found this guide :shock:

GENIUS !

used SDP MultiMedia to save streamed wmv and converted easily in VirtualDubMod (using x264 Video Codec)

Thanks :D



xxbenbenxx posted 2007 Feb 27 11:26
my thing says
"no video stream found."


but i've followed through the steps and the location of my thing is correct

DirectShowSource("C:\Documents and Settings\Ben\My Documents\Eternal_Summer2006.rmvb", convertfps=true)



xycer posted 2007 Mar 26 16:37
i have an mkv file, and using this guide, i am able to open the avs file with media player classic and it plays fine, however, when i open it with virtuadub and/or my encoders (tmpgenc or cce) the video flashes to a grey screen every second/split second.

any ideas?



themaster1 posted 2007 Jun 03 20:57
I wanna use avisynth to read rmvb files and it won't work since i've got a new computer..it's weird

I have installed avisynth 2.56 and of course real alternative

I get an error message in virtualdub saying:
"avisynth open failure , unexpected character "y"

and when i try with virtualdub mod it's the same thing

The avs script i use is as follows:

DirectShowSource("C:\path of the video",fps=25, convertfps=true)

Now you gotta be aware it used to work fine with my old computer, what am i missing???!!



marinaum posted 2007 Jul 23 15:54
I had the same "unexpecter character ÿ" problem, and searching on forums I found the answer.. you can't save the .avs file using unicode, just open it and "save as" using ANSI coding. It worked for me, i hope it helps ^^


themaster1 posted 2007 Jul 27 20:30
Well i did what u said and have an error still: "ACCESS VIOLATION" I don't understand
Someone help i'm lost on this one



F u r u y á posted 2008 Jan 27 22:53
Hi,

I tryied this method to use a h.264 movie as video source in TMPGEnc but with no sucess. I installed ffdshow and I can watch the h.264 movie.

The problem: when I try to open the .avs file in WMP or BSPlayer, I get only the audio stream. When I try VirtualDub, I get this error: "No video stream found". Also, when I try putting the .avs as video stream in TMPGEnc I get "File video.avs can not open, or unsupported".

I tryied also putting the commands "fps=23.976, convertfps=true", but the .avs file still shows only audio stream.

Anyone has a clue?



themaster1 posted 2008 Jan 28 11:10
Regarding your issue with tmpgenc+avs i think i know:

You must change the priority for "directshow multimedia file reader"
Set it to 1 & all the rest to zero

You can find this in: options>env. settings>VFAPI plugin

For the rest i have no clue



F u r u y á posted 2008 Jan 28 11:17
I tryied what you said but I got the same error message in TMPGEnc.


themaster1 posted 2008 Jan 28 18:13
Well that's rather strange because that work with me

Have u set the "Avi VFW compatibility reader" part to -2
(in: options>env. settings>VFAPI plugin)

Also check if in options the "option" "register tempgenc vfp to VFAPI" is validated.

with all this that should work



F u r u y á posted 2008 Jan 28 22:06
Yes, those settings was selected by default. I think the problem isn't with TMPGEnc, because the .avs isn't working neither with BSPLayer, VirtualDub and WMP.

I don't know what to do :/


I tryied others h.264 movies but got the same error. Still can't play in BSPLayer, VDub and WMP. I reinstalled all the package necessary one time. Maybe I need to use another h.264 codec?




Midzuki posted 2008 Jan 29 07:20
:
I installed ffdshow and I can watch the h.264 movie.


Is your ffdshow configured to (not) deal with .AVS files :?:



F u r u y á posted 2008 Jan 29 07:57
Midzuki :
:
I installed ffdshow and I can watch the h.264 movie.


Is your ffdshow configured to (not) deal with .AVS files :?:

I opened ffdshow video decoder configuration and scrolled down until I find avisynth unchecked. So I checked it, clicked Apply then Ok. But still getting the same error.



Midzuki posted 2008 Jan 29 10:49
The screenshot you posted says "filename.MOV".
Do you have QuickTime or QTAlternative :?:



F u r u y á posted 2008 Jan 30 01:20
I have QuickTime Alternative (just the browser plug-in, not the player). I tryied that .mov file just to see if the error was particularly with the .mkv file, but is not. For the .mov file, GSpot says "Codec Status Undetermined". For the .h264 (after I demux the .mkv file), GSpot says "Codec(s) are Installed". I don't know why I can't frameserve the .mkv file with Avisynth. Here is the specifications of the .mkv movie:
:
     SOURCE..............: NTSC DVD
     ViDEOCODEC..........: 2 Pass x264
     ViDEOBiTRATE........: 1094 Kbps
     AUDiO.BiTRATE.......: AC3 448 Kbps
     SUBTiTLES...........: -
     RES.................: 704 x 304
     SiZE................: 1/4 DVDR
     RUNTiME.............: 01:41:23



F u r u y á posted 2008 Jan 30 09:21
Thanks to Midzuki, who recommeded CoreAVC, now the frameserving of h.264 movies is working just fine!! Big thanks man! :thumbs_up:


bayme posted 2008 Feb 19 19:58
F u r u y á :
Thanks to Midzuki, who recommeded CoreAVC, now the frameserving of h.264 movies is working just fine!! Big thanks man! :thumbs_up:

Yeah right, like we're going to PAY for demuxing some x264 sources! Come on.



Midzuki posted 2008 May 24 20:01
bayme wrote:

:
Yeah right, like we're going to PAY for demuxing some x264 sources! Come on.



F u r u y á was NOT talking about "demuxing some H264 sources" ---
his problem was related to Avisynth and H264-decompression (because of the codec hell
he was going through, "y' know"). Come on. :P :P :P



bayme posted 2008 May 25 04:11
Midzuki :
his problem was related to Avisynth and H264-decompression (because of the codec hell
he was going through, "y' know").
Either way, CoreAVC is overly priced crap. It uses open source or GPL code to decompress x264 video, and then asks money for it.


frozoman posted 2008 Jul 24 12:48
Hi. I did your tutorial and it worked like a charm. The only problem I am having is when I try to play the video in VirtualDub, instead of the audio, there is this high pitched noise. I probably have messed up something in a codec...do you guys know how to fix this thing? Thanks



Login/Register to our forum to be able to post here.








About   Advertise   Forum Archive   RSS Feeds   Statistics