Compressing to DVD

Discussion in 'MPEG-1 and MPEG-2 encoding (AVI to DVD)' started by carlmart, Nov 8, 2005.

  1. carlmart

    carlmart Regular member

    Joined:
    Aug 1, 2005
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    26
    I need to find a way to fit 4 hours of DV taping onto one DVD disc. I have more than 20 twenty tapes to fit in.

    As these would be working copies, not final ones, I could get away with something similar to VHS SP quality. With no pixelations, please!

    The recorded stuff are mostly interviews, with a few musical playings, but very little movements. Most of the time the camera is static.

    So I was told I could get away with MPEG-1.

    The programs I usually to capture and burn, are WinDV (capture), Procoder (avi to mpeg-2 conversion), TMPGEnc Author (for DVD files), DVD Shrink (when DVD files do not fit in) and CloneDVD2 (burning).

    I need these DVD discs to play on any player.

    How should I got about it.
     
  2. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    If you want to Put 4 hours on a DVD I would suggest that you use the Half D1 DVD Standard because at 4 hours per DVD the Bitrate would be Far too low to produce acceptable Quality when useing the Full D1 resolution.....

    So to Put 4 hours on a DVD You should encode your DV AVI files to Mpeg-2 at 352x480 For NTSC or 352x576 for Pal useing a Video bitrate of about 2325kbs and a Mpeg-1 layer-2 audio bitrate of 192kbs......

    After you have encoded your AVI files to mpeg-2 useing the above settings you just Load the Mpeg-2 file into your DVD authoring program and add your menu"s and Chapters and Burn your DVD , If you use the Abobe Settings you should be able to Just Fit 4 Full hours on a single 4.38gb DVD-R.....

    You can even Fit more Video on a DVD at the expense of Quality if you used the 352x240/288-Pal Resolution and a Bitrate of about 1475kbs you could Fit 6 hours on a DVD , This is the DVD format that supports mpeg-1 but it is better to use Mpeg-2 because Mpeg-2 is a better quality format.....


    Cheers
     
  3. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    @Minion
    I don't think you'll get any better quality at SIF format with MPEG-2 because at low bitrates MPEG-1's smaller headers can make a noticeable difference (ie more bits for the actual picture). I've done a little experimenting with both at 352x240 and haven't found any advantage to using MPEG-2, but have found that MPEG-1 sometimes gives a slightly better picture at low bitrates (with the low resolution frames of course). I suppose the fact that DVD specs allow a higher peak bitrate for MPEG-2 is a theoretical advantage, but in reality 1,700kbps for SIF MPEG-1 is about as many bits per pixel as 7,500kbps for D1 MPEG-2.

    @carlmart
    I'd install AviSynth and use it to do a lot of the work for me. You can copy this script to a text file and make sure the file name has an AVS extension. AVS files can be read like AVI files.

    Use this script for NTSC:
    DirectShowSource("C:\Wherever\filename.avs",29.97)
    SeparateFields().SelectEven()
    BilinearResize(352,240)

    Use this script for PAL:
    DirectShowSource("C:\Wherever\filename.avs",25)
    SeparateFields().SelectEven()
    BilinearResize(352,288)

    Open TMPGEnc Plus and cancel the wizard because it doesn't have the appropriate settings for MPEG-1 DVD video. Use the browse button next to video source to locate your AVS file. You'll have to change the filetype to All Files because TMPGEnc won't automatically recognize it as an AVS file. Click the Settings button to and change the following encode settings

    -NTSC Settings

    Video Tab:
    Bitrate - 1700
    Motion Search Precision - Highest Quality (very slow)

    GOP Structure Tab:
    Source Aspect Ratio - 4:3 525 Line (NTSC)

    GOP Structure Tab:
    Output Interval Of Sequence Header - 1

    -PAL Settings
    Video Tab:
    Bitrate - 1700
    Motion Search Precision - Highest Quality (very slow)

    GOP Structure Tab:
    Source Aspect Ratio - 4:3 625 Line (PAL)

    GOP Structure Tab:
    Output Interval Of Sequence Header - 1


    If your audio isn't already sampled at 48kHz (standard miniDV cameras can also sample at 32kHz) make sure to go to the audio sampling frequency to 48kHz.

    Once you're done with the settings click on OK and make sure to select the output filename if you don't want to just save it with the same name as the source (with an MPG extension instead of AVS) and in the same directory. Then click the start button and wait for TMPGEnc to finish. You should be able to get about 5 hours of footage on a recordable DVD this way. You could increase the bitrate a little, but the maximum that's legal for MPEG-1 on DVD is 1,865kbps (1,821 in TMPGEnc) so you won't increase the quality very much.
     
  4. carlmart

    carlmart Regular member

    Joined:
    Aug 1, 2005
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    26
    Thanks to both Minion and Vurbal for your suggestions.

    Minion: I have already applied your settings on a test and it seemed to work fine. At least I could burn a DVD that plays with quite good quality on my TV. Better than VHS SP. I did this test with just one hour program, and it seems to take about 1/4 of the disc. So those settings look right for what I want. I loaded them on the Canopus Procoder, to convert the AVI to these compressed MPEGs.

    Vurbal: your suggestions seem a very interesting way to deal with these questions, but I need to learn a bit more to handle them well. I already installed Avisynth and I am trying to understand how it works. It doesn't seem too straightforward, but precise control seems much greater. I don't have TMPGEnc Plus, so I don't know if Author or Express will do the job you describe. I am trying to limit my variables to as few as possible, or I might mess it all. But if I can improve on the quality and still put the 4 hours on one disc I am certainly interested.

    Still open to ways to do things better.

    BTW: I am re-capturing the DV, but these time through the analog outputs, so I can get on-screen time-code. The firewire connection doesn't provide that.
     
    Last edited: Nov 9, 2005
  5. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    Actually the firewire connection will still give you the time/date code in the AVI. You just need something that will read it for you. You can use an AviSynth plugin called dvinfo for that: http://forum.doom9.org/showthread.php?t=61688&highlight=dvinfo

    If Minion's suggestion is giving you the quality you want at the correct size I'd definitely stick with them. Despite how my previous post may seem I agree that MPEG-2 is the better way to go in most situations, and it seems to fit your needs fine.
     
  6. carlmart

    carlmart Regular member

    Joined:
    Aug 1, 2005
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    26
    [bold]Actually the firewire connection will still give you the time/date code in the AVI. You just need something that will read it for you. You can use an AviSynth plugin called dvinfo for that: http://forum.doom9.org/showthread.php?t=61688&highlight=dvinfo[/bold]

    It's not very clear to me how do I achieve that. Will my program (Canopus Procoder) accept that command (plug-in) and show me the time-code window when transcoding to MPEG?


     
  7. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    I haven't used it myself, but it looks like you could modify the script above like this:

    Source="C:\Wherever\filename.avi"
    DirectShowSource(Source,29.97)
    DVInfo(Source,"rec_time")
    SeparateFields().SelectEven()
    BilinearResize(352,240)

    To further modify that script for 352x480 MPEG-2 it would look more like this:

    Source="C:\Wherever\filename.avi"
    DirectShowSource(Source,29.97)
    DVInfo(Source,"rec_time")
    SeparateFields().BilinearResize(352,240).Weave()

    Edit: You also need to make sure that the dll file for DVInfo is in your AviSynth plugins directory. I'll test this plugin when I get home to make sure that's how it works, but judging from that post that should be it.
     
    Last edited: Nov 9, 2005
  8. carlmart

    carlmart Regular member

    Joined:
    Aug 1, 2005
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    26
    The problem is still how to make this DVInfo script to work.

    Where do I put it in? It's already in the Avisynth's plug-in directory, but nothing seems to be happening when I just did a test with the Procoder. The timecode numbers did not appear on the screen.

    Of course I also loaded the DVInfo on the Procoder's plug-in directory, but I am not sure it will work with it.

    I have never used script files, so I don't really know how they operate. How do you make them to work? Using what program?

     
  9. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    AVS files just get loaded like a video file (just about any program that can read AVI files can open them). I'll be home in about an hour and a half. I'll try the filter out then and let you know for sure how to use it.
     
    Last edited: Nov 9, 2005
  10. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    Okay, here's the script I'd use to add the timecode (assuming 352x480 resolution):

    Source="C:\Wherever\filename.avi"
    DirectShowSource(Source,29.97)
    DVInfo(Source)
    SeparateFields().BilinearResize(352,240).Weave()

    You can also add different arguments to the DVInfo line to change the color of the text and add a halo (outline) around the characters.

    To use AviSynth you just need to download and install it. That will give you a directory on your C drive of C:\AviSynth 2.5\Plugins. To use DVInfo you need to download the zip file for it from this page: http://www.avisynth.org/warpenterprises/

    Put the dll from the zip file into the plugins directory for AviSynth and copy the lines above into a text file. Save the text file with an extension of .AVS and open that as your video source in ProCoder to encode.

     
  11. carlmart

    carlmart Regular member

    Joined:
    Aug 1, 2005
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    26
    [bold]Okay, here's the script I'd use to add the timecode (assuming 352x480 resolution):

    Source="C:\Wherever\filename.avi"
    DirectShowSource(Source,29.97)
    DVInfo(Source)
    SeparateFields().BilinearResize(352,240).Weave()
    [/bold]

    OK. Some questions.

    - Why put 352,240 if resolution is 352,480?
    - What exactly do I have to put after Source=? Capturing a DV tape makes a lot of avi files, so should I do an avs for every one of them?
    - Can you do a more specific and realistic example instead of such a generic one?

    [bold]You can also add different arguments to the DVInfo line to change the color of the text and add a halo (outline) around the characters. [/bold]

    Why should I do that? I want the time-code numbers to be just that.


    [bold]To use AviSynth you just need to download and install it. That will give you a directory on your C drive of C:\AviSynth 2.5\Plugins. To use DVInfo you need to download the zip file for it from this page: http://www.avisynth.org/warpenterprises/[/bold]

    Did that. It's installed and ready.


    [bold]Put the dll from the zip file into the plugins directory for AviSynth and copy the lines above into a text file. Save the text file with an extension of .AVS and open that as your video source in ProCoder to encode. [/bold]

    I need some more directions to make it right. Looking forward to it.




    Well, there seems to be a bit more to make this avs file work.

    Do I have to write one for each avi file I will be loading?

    No doubt there are words I have to change on that text you used, because it's not working as such. What do I fill in as "source"?

    Avisynth is already installed, with the dll dvinfo file on its plug-in directory.
     
  12. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    Before resizing the 2 fields of interlaced video have to be separated. That's what SeparateFields does. Since each one is half the height of the entire frame the entire frame is twice that height when put back together. That's what Weave does.
    Replace C:\Wherever\filename.avi with the path to the file you need to encode. Make sure to use the quotes just like I did. And yes you need 1 AVS file for each AVI file you're encoding.
    Put your own filename and path in like I described and you'll have the exact script. You can preview in VirtualDub or Media Player Classic to see the results.
    I'm not talking about changing the content, just the appearance. You can make the text any color you want and add a thick border. If you can see it fine without doing that you don't need to worry about this.
     
  13. Minion

    Minion Senior member

    Joined:
    Sep 28, 2003
    Messages:
    5,623
    Likes Received:
    0
    Trophy Points:
    116
    You know that when Captureing your DV AVI files you can capture the Files as a big file instead of a Bunch of 2gb or 4gb Files (that is if you are running XP with NTFS)...Most DV Capture software will have settings for File splitting...I personally use "Scenalyzer Live" which works very well and lets you capture in Type 1 or Type 2 DV and lets you capture to unlimited File sizes...
     
  14. carlmart

    carlmart Regular member

    Joined:
    Aug 1, 2005
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    26
    OK. Let's see if we can get to the right script.

    The dvinfo.avs file I wrote is like this:

    Source="D:\tapes\test\test1.avi"
    DirectShowSource("D:\tapes\test\test1.avi",29.97)
    DVInfo("c:\video\canopus\procoder\dvinfo.avs")
    SeparateFields().BilinearResize(352,240).Weave()

    I saved it on the Canopus directory and loaded it before the avi file.

    What I get is an error message saying:

    >Script error=there is no function named "dvinfo"<

    So I must be doing something wrong. What is it?
     
  15. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    Change it to this:

    Source="D:\tapes\test\test1.avi"
    DirectShowSource(Source,29.97)
    DVInfo(Source)
    SeparateFields().BilinearResize(352,240).Weave()

    This script uses source as a variable so DirectShowSource and DVInfo can both refer to it without having to retype the path for each one. Plus if you're using it as a template for more files you only have to change 1 line.
     
  16. carlmart

    carlmart Regular member

    Joined:
    Aug 1, 2005
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    26
    Still not working.

    I keep getting the error message at the beginning, and then the screen now becomes "slim": taller than wider. No numbers at all.

    So maybe the script is working, but not doing what it should.

    This time I saved a small test in MPEG.
     
  17. vurbal

    vurbal Administrator Staff Member

    Joined:
    Nov 30, 2002
    Messages:
    2,573
    Likes Received:
    1
    Trophy Points:
    66
    Sounds like you don't have the DVInfo plugin in your Avisynth plugins directory (C:/Program Files/AviSynth 2.5/Plugins). Make sure to download the DVInfo plugin (http://www.avisynth.org/warpenterprises/files/dvinfo_25_dll_20050811.zip) and unzip it. There will be a file called DVInfo.dll in one of the directories from that zip file. Copy that DLL file into the plugins directory listed above and try the script again.
     

Share This Page