VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 39
  1. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    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?
    Quote Quote  
  2. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    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.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by jagabo
    MKV handling in most programs is very immature and full of bugs.
    It seems so.

    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.
    Quote Quote  
  5. 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!
    Quote Quote  
  6. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by jagabo
    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.
    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.

    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!
    Only saw the additions after my first comment.

    It looks as if directshowsource is pretty immature too.
    Quote Quote  
  7. 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.
    Quote Quote  
  8. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by jagabo
    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.

    On several MKV files I tried, it failed to read the right aspect ratio.
    Quote Quote  
  9. Originally Posted by carlmart
    Originally Posted by jagabo
    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?
    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
    On several MKV files I tried, it failed to read the right aspect ratio.
    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).
    Quote Quote  
  10. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by carlmart
    On several MKV files I tried, it failed to read the right aspect ratio.
    Why is that a problem? You can override that in most viewers, doesn't matter if you're encoding to MPEG.
    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?
    Quote Quote  
  11. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by jagabo
    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).
    Well, not really. Or not as I expected it might do things.

    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.
    Quote Quote  
  12. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by AlanHK
    Originally Posted by carlmart
    On several MKV files I tried, it failed to read the right aspect ratio.
    Why is that a problem? You can override that in most viewers, doesn't matter if you're encoding to MPEG.
    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?
    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.
    Quote Quote  
  13. Originally Posted by carlmart
    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.
    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.
    Quote Quote  
  14. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by carlmart
    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.
    I make AVS scripts and feed them to HCEnc to make DVDs as well.

    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
    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.
    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.
    Quote Quote  
  15. 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.
    Quote Quote  
  16. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by AlanHK
    I make AVS scripts and feed them to HCEnc to make DVDs as well.

    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.
    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.

    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.
    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.

    Maybe you could make some screenshots to show exactly what the problem is.
    Next time I have another I will certainly show them.
    Quote Quote  
  17. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by jagabo
    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.
    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.
    Quote Quote  
  18. Originally Posted by carlmart
    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.
    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.
    I have never seen DirectShowSource() add borders. You can be pretty sure the black borders were in your MKV file.

    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.
    Quote Quote  
  19. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by jagabo
    I have never seen DirectShowSource() add borders. You can be pretty sure the black borders were in your MKV file.
    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.

    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.
    Quote Quote  
  20. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    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.


    Quote Quote  
  21. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    You could see the right and left borders, right?

    Now look at the same mkv file, now demuxed to h264 video and using AVCsource.

    Quote Quote  
  22. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    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:



    Quote Quote  
  23. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Thinking again, I believe I shouldn't need the resize line, because HCEnc is doing the 16:9 resizing and this is actually a 16:9 video. Isn't that so?
    Quote Quote  
  24. 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.
    Quote Quote  
  25. Member
    Join Date
    Jun 2004
    Location
    Ferrara-Italia
    Search Comp PM
    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
    Quote Quote  
  26. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by jagabo
    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.
    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.

    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.
    That I would like to do, to see what might be happening and understand things better.
    Quote Quote  
  27. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by midnightsun
    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.
    Totally agreed on the resizing. It was a distraction, a not so serious one.

    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)
    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?
    Quote Quote  
  28. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by midnightsun
    (Most likely you have ffdshow resizing and pillarboxing to fill the screen resolution or something like that)
    When you install ffdshow, you should get an "ffdshow configuration" utility installed.
    It has settings under "Resize and aspect", or maybe "Crop" that might have that effect.
    Quote Quote  
  29. Member
    Join Date
    May 2004
    Location
    Brazil
    Search Comp PM
    Originally Posted by AlanHK
    Originally Posted by midnightsun
    (Most likely you have ffdshow resizing and pillarboxing to fill the screen resolution or something like that)
    When you install ffdshow, you should get an "ffdshow configuration" utility installed.
    It has settings under "Resize and aspect", or maybe "Crop" that might have that effect.
    On my first check in ffdshow configuration there's nothing marked to change, apparently, in encoder or decoder.
    Quote Quote  
  30. As midnightsun said, you don't want or need the Colormatrix line in the script.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!