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. -
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!
-
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.
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.
-
Originally Posted by jagabo
On several MKV files I tried, it failed to read the right aspect ratio. -
Originally Posted by carlmart
Originally Posted by carlmart -
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? -
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. -
Originally Posted by AlanHK
-
Originally Posted by carlmart
-
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.
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.
-
Originally Posted by AlanHK
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.
Maybe you could make some screenshots to show exactly what the problem is. -
Originally Posted by jagabo
-
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. -
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 -
Originally Posted by jagabo
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. -
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.
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) -
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, 13:57 -
General Resizing HEIGHT/Avisynth understanding
By Krelmaneck in forum Newbie / General discussionsReplies: 27Last Post: 25th Nov 2011, 00:46 -
Understanding MKV files
By carlmart in forum Video ConversionReplies: 41Last Post: 13th Oct 2011, 13:56 -
Loading m4v in Avisynth
By AlanHK in forum Video ConversionReplies: 7Last Post: 16th Sep 2009, 22:51 -
Loading H264 onto avisynth script
By carlmart in forum Blu-ray RippingReplies: 21Last Post: 10th May 2009, 13:22