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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th May 2017, 01:32   #1  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Weird prob with AVIs containing x264 video

When I open one of these in VirtualDubMod 1.5.10.2 it gives a warning: "Couldn't locate decompressor for format 'H264' (unknown). VirtualDub requires a Video for Windows (VFW) compatible codec to decompress video. DirectShow codecs, such as those used by Windows Media Player, are not suitable. Only 'Direct stream copy' is available for this video."

x264vfw is in fact installed and used quite happily by TMPGEnc Video Mastering Works 6.

So AVIs can be cut etc. and saved using direct stream copy using VDubMod, only prob being video is not displayed.

VirtualDub FilterMod 38919 can open and display AVIs with x264 video, but is unable to use direct stream muxing: "The source video stream uses a compression algorithm which is not compatible with AVI files. Direct stream copy cannot be used with this video stream."

Truly weird.

I recently migrated from WinXP to Win10. In WinXP, VDubMod with x264vfw worked without probs. It could display/decode videos with x264/h264 video and cut them etc. using direct stream copy or full processing mode etc.

Any suggestions? (no I do not want to convert these AVIs to MKV)
JimmyBarnes is offline   Reply With Quote
Old 17th May 2017, 07:35   #2  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,212
Quote:
Originally Posted by JimmyBarnes View Post
VirtualDub FilterMod 38919 can open and display AVIs with x264 video, but is unable to use direct stream muxing: "The source video stream uses a compression algorithm which is not compatible with AVI files. Direct stream copy cannot be used with this video stream."
That is actually true: although h.264 has been shoehorned into AVI before, it is not recommended. VdubFM is saving you from yourself

Quote:
Originally Posted by JimmyBarnes View Post
Any suggestions? (no I do not want to convert these AVIs to MKV)
Given the preconditions, Nope, none at all.
raffriff42 is offline   Reply With Quote
Old 17th May 2017, 11:53   #3  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by raffriff42 View Post
That is actually true: although h.264 has been shoehorned into AVI before, it is not recommended. VdubFM is saving you from yourself
So its an administrative constraint?

In the past 7 years I have backed-up hundreds of blu-rays to AVI/x264. Those backups invariably play without problem.
JimmyBarnes is offline   Reply With Quote
Old 17th May 2017, 12:54   #4  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by raffriff42 View Post
That is actually true: although h.264 has been shoehorned into AVI before, it is not recommended. VdubFM is saving you from yourself
Also VDubFM offers x264 as a compression type.

x264 10-bit - H.264/MPEG-4 AVC codec
x264 8-bit - H.264/MPEG-4 AVC codec
JimmyBarnes is offline   Reply With Quote
Old 17th May 2017, 13:56   #5  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,212
OK I was wrong. I found an x264 AVI on my end that can not be stream-copied in VirtualDub FM with the native decompressor, but can when forced into using the x264vfw decompressor (via File, Open, files of type, AVIFile input driver).
raffriff42 is offline   Reply With Quote
Old 17th May 2017, 14:17   #6  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by raffriff42 View Post
OK I was wrong. I found an x264 AVI on my end that can not be stream-copied in VirtualDub FM with the native decompressor, but can when forced into using the x264vfw decompressor (via File, Open, files of type, AVIFile input driver).
File, Open, files of type, AVIFile input driver doesn't see AVI files but it does see AVS, so I tried this with an avs containing the single line:

DirectShowSource("x264 AC3 Hugo 1360x768.avi")
where x264 AC3 Hugo 1360x768.avi is x264 video, AC3 audio 27,740,160 bytes.

The AVS opens and displays in VDFM OK using File, Open, files of type, AVIFile input driver and will even Direct Stream Copy without error, but the result is an AVI of 2,278,020,244 bytes, clearly some form of uncompressed video.

If you got a Direct Stream Copy AVI result almost identical in size to your input AVI, please tell me what you did.
JimmyBarnes is offline   Reply With Quote
Old 17th May 2017, 14:44   #7  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,212
AVIFile input driver does not see AVI files? Hmmm yeah. What I did was copy & paste a path without even trying to browse (I had to search for a suitable AVI)

An Avisynth file appears as a raw, uncompressed stream, so copying it will result in a huge file.

EDIT and the copied video stream has exactly the same size and other properties. Audio copying failed, but that is another story...

Last edited by raffriff42; 17th May 2017 at 14:48.
raffriff42 is offline   Reply With Quote
Old 17th May 2017, 15:04   #8  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by raffriff42 View Post
AVIFile input driver does not see AVI files? Hmmm yeah. What I did was copy & paste a path without even trying to browse (I had to search for a suitable AVI)
In VDFM, "AVIFile input driver (compat.)" lists the files it can open as (*.avs, *.vdr, *.vpy) - simply doesn't list any AVIs.

HOW did you "copy & paste a path without even trying to browse". Into WHAT did you paste this path?
JimmyBarnes is offline   Reply With Quote
Old 17th May 2017, 15:16   #9  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,212
I ran a search for *.avi, picked one at random, shift-clicked it (Win 8/10), "copy as path", clicked in the box directly above Files of type, right-click, Paste.
raffriff42 is offline   Reply With Quote
Old 17th May 2017, 22:08   #10  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 3,425
For the standard VirutalDub, "Audio/Video Interleaved" is included in the drop down list when opening files. "AVIFile input driver" doesn't include AVIs. Try the standard version if you're using the modded version, but it probably works the same way as the standard version with the ffmpeg input driver plugin installed and you need to select "Audio/Video Interleaved". For the standard VD, without the ffmpeg input driver plugin, it should open AVIs in the usual way. If the plugin is present, it'll probably default to opening the files so you won't be able to use directstream copy unless you select "Audio/Video Interleaved". Even if VD complains about not being able to find a codec for decompression, you should still be able to use direct stream copy if you open them that way.

https://www.videohelp.com/software/Virtualdub
https://sourceforge.net/projects/vir...eginputplugin/

Last edited by hello_hello; 17th May 2017 at 22:15.
hello_hello is offline   Reply With Quote
Old 18th May 2017, 00:16   #11  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by raffriff42 View Post
I ran a search for *.avi, picked one at random, shift-clicked it (Win 8/10), "copy as path", clicked in the box directly above Files of type, right-click, Paste.
"Copy as path" is not available to me, how did you get it?
JimmyBarnes is offline   Reply With Quote
Old 18th May 2017, 00:25   #12  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by hello_hello View Post
For the standard VirutalDub, "Audio/Video Interleaved" is included in the drop down list when opening files. "AVIFile input driver" doesn't include AVIs. Try the standard version if you're using the modded version, but it probably works the same way as the standard version with the ffmpeg input driver plugin installed and you need to select "Audio/Video Interleaved". For the standard VD, without the ffmpeg input driver plugin, it should open AVIs in the usual way. If the plugin is present, it'll probably default to opening the files so you won't be able to use directstream copy unless you select "Audio/Video Interleaved". Even if VD complains about not being able to find a codec for decompression, you should still be able to use direct stream copy if you open them that way.

https://www.videohelp.com/software/Virtualdub
https://sourceforge.net/projects/vir...eginputplugin/
Thanks for your reply, but see the OP.

I would like a SINGLE app which can both open AVIs and view them (so I can select regions to cut etc.) AND do Direct Stream Copy. At the moment I have to use VDM and VDFM.
JimmyBarnes is offline   Reply With Quote
Old 18th May 2017, 02:34   #13  |  Link
mariush
Registered User
 
Join Date: Dec 2008
Posts: 552
virtualdub can do that but can only cut at specific frames (keyframes), not at any point.
Sometimes there's only a keyframe every 10-15s (250-300 frames is common default in encoders), so you wouldn't be able to cut such series of frames in the middle.
You can cut at exact frames with some supported codecs if you use "smart recompress" mode (or whatever it's called) instead of direct stream copy.
virtualdub would copy segments outside cut points directly (like direct stream copy) and decode segments which have cut point inside and recompress the portion you still want in video.

but h264 in avi is already such a hack i wouldn't be surprised if "smart recompress" won't work.
Really, stop using avi and use mp4 or mkv

Last edited by mariush; 18th May 2017 at 02:49.
mariush is offline   Reply With Quote
Old 18th May 2017, 04:07   #14  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by mariush View Post
virtualdub can do that but can only cut at specific frames (keyframes), not at any point.
I mainly do downstream cuts which VDM can do at any given frame, unlike in an MKV where even a downstream cut occurs at a KF.

As I say I have done hundreds of AVI/x264 rips without problem, that's the bottom line...

I could convert AVI to MKV at any time, but not the reverse, another thing I dislike about MKV.
JimmyBarnes is offline   Reply With Quote
Old 18th May 2017, 04:07   #15  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,212
Quote:
Originally Posted by JimmyBarnes View Post
"Copy as path" is not available to me, how did you get it?
I did say "shift-click", which I admit could have been clearer. Should have been "shift-RIGHT-click" anyway.
For a better explanation, Google Windows X copy as path. (where X = your Windows version)
raffriff42 is offline   Reply With Quote
Old 18th May 2017, 04:24   #16  |  Link
mariush
Registered User
 
Join Date: Dec 2008
Posts: 552
Quote:
Originally Posted by JimmyBarnes View Post
I mainly do downstream cuts which VDM can do at any given frame, unlike in an MKV where even a downstream cut occurs at a KF.

As I say I have done hundreds of AVI/x264 rips without problem, that's the bottom line...

I could convert AVI to MKV at any time, but not the reverse, another thing I dislike about MKV.
MKV is just a container, just like AVI.

It packs one or several video streams, one or several audio streams, one or several subtitles and their related data (fonts, various resources) and chapter information into a single file.

AVI is worse, it supports only 2 audio streams (good luck storing original audio and multiple commentary tracks in one avi file), it has problems with large sizes (some players can't play AVI files larger than 8 GB or crap like that), there's index at the end so if you don't have the complete AVI file you can have problems playing the video... it's crap container.

The limitation of cutting just at a keyframe with MKV is probably just some lazyness from the developer's part - it's easier that way, it's like i said direct stream copy and just editing the "index" of the MKV file (a collection of seek points which tell video players to jump to specific keyframes in the video).

MKVToolnix is a popular tool to mux streams in matroska containers or to extract segments from matroska files and it only cuts at keyframes. So it's quite a high possibility the software you're using relies on this tool in the background to edit MKV files.

x264 in AVI is done as a HACK. Even XVID when it was popular was implemented in AVI as a hack, because AVI as a movie container has some limitations and couldn't normally support all the "features" of modern video codecs like XVID or h264.

You would most likely get better quality or more quality per bitrate if you'd encode some video to a raw h264 stream or to MKV or MP4 (x264vfw codec even let's you output the encoded data to a separate file in a format it supports and return some fake video back to Virtualdub) , and then mux that video-only file with the audio compressed separately to MP3 or AAC or Opus or FLAC (or whatever you prefer) and mux both into MKV or MP4.

You can't do MP4 to AVI or MKV to AVI most likely for the reason that the bitstream of the video would have to be specially crafted to fit inside AVI, and there's no guarantee the stream that's in MP4 or MKV was produced like that originally. And no developer cares to somehow find a hack or some way to put that h264 data from mkv or mp4 to AVI because as you've been told already, it wasn't meant to be used with AVI and AVI should just die.

Last edited by mariush; 18th May 2017 at 04:31.
mariush is offline   Reply With Quote
Old 18th May 2017, 04:48   #17  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by raffriff42 View Post
I did say "shift-click", which I admit could have been clearer. Should have been "shift-RIGHT-click" anyway.
For a better explanation, Google Windows X copy as path. (where X = your Windows version)
Hmm.. interesting, I got the above to work as you say but the only response in VDFM was "Couldn't locate decompressor for format 'H264' (unknown)" and the file doesn't load at all.
JimmyBarnes is offline   Reply With Quote
Old 18th May 2017, 05:26   #18  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by mariush View Post
MKV is just a container, just like AVI.
I understand that dude, it's a wrapper..

The advantages of MKV, I don't use:
* Never use 2 audio streams
* Don't use files sizes above 8 GB (mostly under 4 GB)
* Never use chapters

Even embedded subtitles which is something I find appealing haven't worked well last time I looked. There is a marked "judder" when turning subtitles off and on which does not occur (in MKV or AVI) with external subtitles.

Being able to cut at a given downstream frame is a big deal to me, so sorry MKV...

I had this discussion with a leading MKV proponent (moderator) before. In the end he admitted there was no absolute reason I should leave AVI given what I want and how AVI is performing.
JimmyBarnes is offline   Reply With Quote
Old 18th May 2017, 06:52   #19  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 4,564
Quote:
Originally Posted by JimmyBarnes View Post
but see the OP.
What is the supposed to see in the start post about vanilla VirtualDub not being an option?

Is the decoder component of x264vfw deactivated? Which version/from where? Tried to install it again? Did you try ffdshow vfw?

Quote:
Originally Posted by JimmyBarnes View Post
I would like a SINGLE app which can both open AVIs and view them (so I can select regions to cut etc.) AND do Direct Stream Copy. At the moment I have to use VDM and VDFM.
H.264-in-AVI is a bit special but softwares like SolveigMM Video Splitter, VideoReDo and AviDemux are supposed to handle cutting H.264 correctly. (Including in MKV container.)
sneaker_ger is offline   Reply With Quote
Old 18th May 2017, 14:59   #20  |  Link
JimmyBarnes
the Interrogator
 
JimmyBarnes's Avatar
 
Join Date: Oct 2001
Location: DownUnder
Posts: 648
Quote:
Originally Posted by sneaker_ger View Post
Is the decoder component of x264vfw deactivated? Which version/from where? Tried to install it again? Did you try ffdshow vfw?
Yes.
x264vfw_full_43_2694bm_43159_fix
Not yet but TMPGEnc Video Mastering Works 6 is quite happy with x264vfw as installed.
No.

Quote:
H.264-in-AVI is a bit special but softwares like SolveigMM Video Splitter, VideoReDo and AviDemux are supposed to handle cutting H.264 correctly. (Including in MKV container.)
I have tried some in the past when I contemplated switching from AVI to MKV. Ones I tried then which claimed to be able to cut an any downstream (or maybe given) frame did so by recoding a small section around the cut frame.
JimmyBarnes is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.