Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
24th May 2015, 23:31 | #1 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
AVI vs MKV
Okay i have been wondering, which container is to be preferred for the use with Avisynth if both can be used (Format wise)?
I myself have always used AVI for many reasons. First off, Avisource, very simple and works with both audio and video. Secondly it just seems to be the most efficient made container when it comes to reading it as it's extremely simply made, some interleaving here and there etc. But as i have no idea how MKV rly works, and have no clue if what AVI is actually has a real world benefit i just decided to ask here. Thanks! |
25th May 2015, 00:28 | #2 | Link |
Registered User
Join Date: Jul 2010
Location: Germany
Posts: 357
|
As an intermediary format while editing it doesn't really matter - unless you use e.g. x264vfw in VirtualDub(Mod) to put an h.264 video stream into an AVI file. IIRC, when using AVISource to open that file the first frame will be black.
AFAIK, AVI can't store a VBR MP3 stream either. |
25th May 2015, 00:39 | #3 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I (almost) always convert to AVI first because it avoids all kinds of issues that can happen with various videos.
MKV, however is a container, not a video format. MKV is useful because it has no restriction as to which video formats it contain. So, I'm processing MPEG videos from old VCDs, converting them to AVI, opening with AviSource, re-encoding with x264, then I merge the MP4 output with the original MP2 audio into a MKV container. If I try to use a MP4 container for a x264 video format and a MP2 audio, some media players don't read it properly. With MKV, since there are no restrictions, I can keep the original audio untouched.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 24th June 2015 at 06:08. |
25th May 2015, 03:08 | #4 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
I know AVI and MKV are containers, wrote that. Just mentioned Formats in the way that x264 in AVI isn't that great (as creaothceann said).
But hows the difference performance wise, i mean there must be something right? One uses Avisource, which i guess uses some internal Splitter? The other is Directshow or LAV/FFMPEG, DDS2 and audiodub stuff. MKV seems to have so much "roundabout" ways to do what Avisource does. I am not even sure if Avisource or Directhow etc follows Audio Delay things correctly (like some Audio/Video don't always start at the same time and needs a Delay to be in sync). |
25th May 2015, 04:31 | #5 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Converting to AVI takes time, and AVI format has much more data to process, so it for sure is slower. But with AviSynth, the time to read the video file compared to running the operations is usually less than 1% (depending what script you run).
With AVI, utvideo provides better performance but requires this additional codec http://www.digital-digest.com/softwa...dec_Suite.html I convert videos like this ffmpeg -i "source" -vcodec utvideo -an "destination"
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 24th June 2015 at 06:08. |
25th May 2015, 14:53 | #6 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
So you are saying, if i had AVI and MKV with, let's say PCM / UTVideo.
The difference reading the containers and the file will be pretty much identical, even though one has to use DSS2 with AudioDub or something?;O (I am not talking about converting from AVI to MKV here, just wondering the performance of reading and decoding from both containers (decoding should be identical as it's the same format though)). |
25th May 2015, 19:57 | #8 | Link |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
Interesting and good news a guess.
How is the accuracy for A/V syncing. the things i stated before, like at times A/V don't start at the same time, so audio perhaps has like +127ms delay. I am guessing Avisource take that into account at AVI has that built in. MKV also has it of course, but i don't know if DSS2 with AudioDub DS will use that, as you use to separate methods for Video and Audio. |
25th May 2015, 22:11 | #10 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
For sync, it depends on which of the many bodged-in AVI extensions you've used, but generally AVI has no delay (you can zero-fill with padding frames to simulate it) and no sync (you drop a frame and you're just out of luck). If anything, DirectShowSource is significantly worse! But native ffms2 and LSMASH are much better for mkv, barring the occasional small bug.
If you want to more easily keep delay or detect corruption, using MKV is a better option. AVI is nice when it just works with everything out there, but if you use nothing but AviSynth then that doesn't matter. For lossless, the overhead difference is minuscule. |
25th May 2015, 22:51 | #11 | Link |
47.952fps@71.928Hz
Join Date: Mar 2011
Posts: 940
|
The only input I've found that works for me is that for AVC/MPEG2/VC1, I use MKV and index with DGdecNV.
Otherwise, for somethign like UtVC (or any lossless intermediate), I use Avi (via VirtualDub; mostly likely indexed from MKV with DGdecNV). I don't really use any other formats. Tbh, the only formats I initially work with are from bluray/dvd sources. I don't do much in the way of video recording (cell phone, digital camera, etc). And I don't really do any screencaptures, either (Fraps, etc). My workflow is also different. The only time I use AudioDub() is when I want to watch a movie downscaled to 720p in MPC-HC & SVP (ffdshow). For instance, DGdecNV + AudioDub: Code:
SetMemoryMax(512) LoadPlugin("C:\AVS\dgdecnv2049\DGDecodeNV.dll") v=DGSource("E:\MakeMKV\Dracula.dgi", crop_t=20, crop_b=28, crop_l=24, crop_r=24) a=DirectShowSource("E:\MakeMKV\Bram Stoker's Dracula.mkv", audio=true, video=false) v=v.Spline36Resize(1280, 720) a=a.Dmix6Stereo() AudioDub(v, a) That aside, I do everything separately. Video first and then audio once I'm satisfied, I'll work on the audio last and then mux them altogether. For indexing, DGdecNV, it's recently implemented indexing from MKV's. If I ever want to use FFMS2, I remux to MKV and index with that. I think I only ever use AVI for lossless intermediates.
__________________
Win10 (x64) build 19041 NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4) NTSC | DVD: R1 | BD: A AMD Ryzen 5 2600 @3.4GHz (6c/12th, I'm on AVX2 now!)
|
26th May 2015, 04:20 | #13 | Link | |
Registered User
Join Date: Jul 2011
Posts: 1,121
|
Quote:
Great to have this cleared up, was pretty much as i assumed though, but it's always better to get a more technical explanation from ppl instead of grasping at straws |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|