It's become very difficult to understand why sometimes I can load a file for avisynth processing and why sometimes I can not.
Sometimes I can use directshowsource, sometimes I can't and avcsource works instead.
Now I can't make avcsource to get me load a dga file.
What I did was go through TSmuxer with the MKV file to get a TS file. Then through DGAVCindex to get a dga file, then loading that on the script. So in the end it would be:
AVCSource("d:\file.dga")
When I load that in AvsP and hit F5 I get the message:
AVCsource could not load one of the input files.
What can I try to make it work?
+ Reply to Thread
Results 1 to 30 of 39
-
-
Well, in the meantime I discovered how to make things work.
What I did was demux the H264 from the mkv, load that into DGAVCIndex and do dga project with that info.
That file was accepted with avcsource and things run well. Now I am converting to m2v with HCencGUI.
But I still don't quite get the logic of it all. It would be great if someone would explain it.
BTW: the reason I went this crooked way is because if I load the original mkv file with directshowsource I am not getting the correct aspect ratio. -
MKV handling in most programs is very immature and full of bugs.
Do you have the right path to the DGA file?
AVCSource("d:\file.dga")
It's in the root of drive D? Did you move the TS files after creating the DGA file? You can't do that because the files are read from their original location. The DGA file points to them. -
It seems so.Originally Posted by jagabo
To start with demuxing to h264 seemed to work better than demuxing to TS. Can you tell me why?
In any case both demuxings got me a correctly shaped file. -
Note some additions to my earlier post. I would also add that TS and h.264 handling is pretty immature and full of bugs too!
-
No, no. The directions were absolutely right. I have done several conversions using the same directory and practically the same script, so I only change the name of the dga file.Originally Posted by jagabo
I did try to see if I was doing something wrong, just in case. But it only clicked when I changed to the H264 file insttead of the ts file.
Only saw the additions after my first comment.Note some additions to my earlier post. I would also add that TS and h.264 handling is pretty immature and full of bugs too!
It looks as if directshowsource is pretty immature too. -
DirectShowSource() asks DirectShow to do all the file handling and decompression. You're at the mercy of whatever Directshow readers, splitters, and decoders you have installed.
-
OK, which should I have to make things right? Tell me so and I will certainly install them.Originally Posted by jagabo
On several MKV files I tried, it failed to read the right aspect ratio. -
Unfortunately, there is no solution for every case. You'll probably end up using some version of Haali Media Splitter (file reader and splitter combined) and the h.264 decoder of your choice. I have a few, CoreAVC Pro and ffdshow. CoreAVC works better for some sources, ffdshow for others.Originally Posted by carlmart
DirectShowSource() will give the storage aspect ratio of the source (for example, 720x480 for NTSC DVD, 1440x1080 for a HDV camcorder). It's up to you to set the pixel aspect ratio or display aspect ratio in the encoder (eg, 4:3 or 16:9 DAR).Originally Posted by carlmart -
Why is that a problem? You can override that in most viewers, doesn't matter if you're encoding to MPEG.Originally Posted by carlmart
I've never tried to get the aspect ratio out of an AVS script, I don't know if you can. (You can get the size in pixels, which is not the same thing.)
What are you doing with your AVS scripts? -
Well, not really. Or not as I expected it might do things.Originally Posted by jagabo
To process avisynth files I use two things: AvsP to check the scripts HCgui 0.23 to process it to m2v.
On some MKV files I noticed that using directshowsource the aspect ratio was not right, and after processing that image turned out shorter in height than what it should be.
The second thing was that when I loaded the file in AvsP with no correction for aspect ratio or border, the video DID show borders when it shouldn't.
We tested the MKV files with Media Player Classic and they did show the file as it should, with no borders. So the files were fine. I say files because there were several files that behaved like that.
So I started a different procedure, suggested by a friend, to demux the video file to TS or H264. Then loading that into DGAVCindex and doing a dga project. Then I wrote that into the script, using avcsource, and things became "normal" again, with no borders. Then resized things with spline and added the right borders. Never had any problem again.
If you have a different suggestion to work things out, it will be welcome. -
I am doing things as I describe above, and it seems to work out fine. I don't want to correct things on any viewer, as I make DVDs out of this material and it should play as any other 16:9 video, with no further adjustments of any kind and the black stripes if it's cinemascope.Originally Posted by AlanHK
-
If your source is 16:9 all you have to do is tell your MPEG encoder the AVS video is 16:9 and you want a 16:9 MPG file.Originally Posted by carlmart
-
I make AVS scripts and feed them to HCEnc to make DVDs as well.Originally Posted by carlmart
HC doesn't detect the aspect ratio, you have to specify either 4:3 or 16:9
(Other ratios can be set, but not for DVD output.)
It will default to whatever you used last, so that may be why you think it's not working correctly.
AVSP does not create borders when it displays a preview, unless you have explicit "AddBorders()" commands in the script. Not that I've ever seen, anyway, and I've been using it for over a year.Originally Posted by carlmart
Maybe you could make some screenshots to show exactly what the problem is. -
For DVD, if your source is wider than 16:9 you will have to add letterbox bars top and bottom to fill out the 16:9 frame.
-
Of course you have to set several things manually on HCEnc, like aspect ratio, bitrate and pulldown, depending on several factors. That I learnt to do.Originally Posted by AlanHK
Certainly not. AvsP shows what you feed to it. I didn't say it was creating the borders, I said it showed them. Directshowsource was creating them, apparently, when dealing with the MKV 720p or 1080p files.AVSP does not create borders when it displays a preview, unless you have explicit "AddBorders()" commands in the script. Not that I've ever seen, anyway, and I've been using it for over a year.
Next time I have another I will certainly show them.Maybe you could make some screenshots to show exactly what the problem is. -
Yes, of course. But it's certainly a relief to now deal with a real 16:9 TV screen and waste less space than on a 4:3 TV.Originally Posted by jagabo
-
I have never seen DirectShowSource() add borders. You can be pretty sure the black borders were in your MKV file.Originally Posted by carlmart
For example, a 2.40:1 movie on Blu-ray will have black bars at the top and bottom of the frame. The movie will occupy 1920x800 and there will be 125 lines of black at the top, 125 lines at the bottom to fill out the 1050 line frame. Some people remove the black bars when making MKV files from a source like this, some don't. -
I don't know WHAT does add the borders, but someone does. And you can be pretty sure that the borders disappear when you mux the mkv file onto H264 or when I play the mkv on VLC.Originally Posted by jagabo
Please wait half an hour until I show you an MKV file I just downloaded and you will see what happens. I will write a few scripts and show what happens on AvsP. -
OK. I captured six images from the file: three with directshowsource and three with avcsource.
The original file was 1826 KBps, 720:480, with aspect ratio roughly around 1.85:1. 23.976. The aspect ratio, in fact, it's not 1.85 and I will take the up and down borders out for the final conversion. I think I don't need them and are cutting things away, even if small.
Apparently I have to feed just one image at the time, right? So here goes the first image, entered in AvsP with directshowsource.
-
You could see the right and left borders, right?
Now look at the same mkv file, now demuxed to h264 video and using AVCsource.
-
As you can see, I did not cut anything. Only loaded differently.
Why is that happening I don't know. The Matroskasplitter is the latest version.
This the final script I will be using:
-
In the last image the frame is 720x480 with a 16:9 DAR image. All you have to do is tell the encoder your source is 16:9 and encode 16:9. The player will stretch the video during playback.
Something does appear to have added pillarbox bars to your earlier DirectShowSource() sample. When using DirectShowSource() you are at the mercy of whatever DirectShow file readers, file splitters, and decoders you have installed. It looks like one of them is screwing up. You could use GraphStudio to examine what DS filters are in use when DS opens your file. -
HcEnc doesn't do any resizing (and it doesn't need to, as you already have 720x480 16:9 video, which is 100% spec compliant with dvd). Leave it as is, I don't understand why you're trying to complicate your life when what you have is already ok. Besides, you sure you need the colormatrix line? SD video *should* be 601 colorimetry already.
PS the black borders in your directshow image can be caused by anything, i.e. you're depending on the ds filterchain to deliver the pictures and if you don't know exactly what's doing what, you could end up with sub-optimal quality. (Most likely you have ffdshow resizing and pillarboxing to fill the screen resolution or something like that)Sorry, I had to go see about a girl -
Yes, that was what I said after I had already wrote my comment above. It was automatic really, as very rarely do MKV files come in 720:480. They usually need resizing.Originally Posted by jagabo
That I would like to do, to see what might be happening and understand things better.Something does appear to have added pillarbox bars to your earlier DirectShowSource() sample. When using DirectShowSource() you are at the mercy of whatever DirectShow file readers, file splitters, and decoders you have installed. It looks like one of them is screwing up. You could use GraphStudio to examine what DS filters are in use when DS opens your file. -
Totally agreed on the resizing. It was a distraction, a not so serious one.Originally Posted by midnightsun
About the colorimetry I am not so sure. But I will do some trimmed tests to see if there's any change when playing.
OK. So please tell me how can I put some order in my house. There's not much information around on codec matters, particularly on what can be conflicting with what. Is there some list around with the codecs that should be installed and why?PS the black borders in your directshow image can be caused by anything, i.e. you're depending on the ds filterchain to deliver the pictures and if you don't know exactly what's doing what, you could end up with sub-optimal quality. (Most likely you have ffdshow resizing and pillarboxing to fill the screen resolution or something like that) -
On my first check in ffdshow configuration there's nothing marked to change, apparently, in encoder or decoder.Originally Posted by AlanHK
-
As midnightsun said, you don't want or need the Colormatrix line in the script.
Similar Threads
-
Avisynth source loading?
By yugurya in forum EditingReplies: 5Last Post: 22nd Jan 2012, 14:57 -
General Resizing HEIGHT/Avisynth understanding
By Krelmaneck in forum Newbie / General discussionsReplies: 27Last Post: 25th Nov 2011, 01:46 -
Understanding MKV files
By carlmart in forum Video ConversionReplies: 41Last Post: 13th Oct 2011, 14:56 -
Loading m4v in Avisynth
By AlanHK in forum Video ConversionReplies: 7Last Post: 16th Sep 2009, 23:51 -
Loading H264 onto avisynth script
By carlmart in forum Blu-ray RippingReplies: 21Last Post: 10th May 2009, 14:22



Quote