VideoHelp Forum




+ Reply to Thread
Results 1 to 12 of 12
  1. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    Hello,

    In continuation of the https://forum.videohelp.com/topic330906.html#1713009 thread, I am having a problem with DGMPGDec. I need to make an AVISynth AVS script for an MPEG file with audio. I have to use the DGMPGDec plugin for my MPEG1 or MPEG2 files since they have sound, as MPEGDecoder.dll cannot do sound. The function for DGMPGDec is mpeg2source() whereas for MPEGDecoder it is mpegsource(). The problem is that when I use the DGIndex program to open the MPEG file (since I have to make a d2v project file for the AVS script), it too reads the video yet cannot read the audio of my MPEG file. When I make the d2v project and load it from the AVS script in a program like the old Windows Media Player, I get video but no sound. This is essentially giving me the exact same problem as I had with MPEGDecoder (which doesn't support sound at all); however, unlike MPEGDecoder, the DGIndex program does have audio options, but it's just failing to read the AC3 audio stream.

    I have attached an image of the file info window in DGIndex when my MPEG file is loaded in case it helps. Thanks for your help

    dgindexmpeginfowindow.bmp
    Quote Quote  
  2. Member
    Join Date
    Aug 2004
    Location
    United States
    Search Comp PM
    There is nothing wrong with DGIndex. The audio is saved separately. It won't be a part of the frameserve in the d2v file. I don't usually load audio into the avisynth script so I dunno the command to load an ac3 source.
    Quote Quote  
  3. Member
    Join Date
    Sep 2006
    Location
    United States
    Search Comp PM
    Use the NicAudio plugin for AviSynth. It will decode your AC3 stream. If you need to transcode your audio into another format, the SoundOut plugin is all you need.
    Quote Quote  
  4. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    So you're saying that for a single MPEG file, I can use one plugin to decode the audio and another plugin to decode the video, and output them both in the same AVS? That would be great!

    If this is the case, would I might as well use MPEGDecoder.dll for the video portion rather than DGMPGDec.dll since the mpegsource() function is easier to use (don't have to make an intermediary d2v project file)?

    Could you please post a sample AVS script?

    Edit: I just tried:
    --------------------
    NicAC3Source("mympeg.mpg")
    --------------------
    in an AVS script. It said that it isn't a valid AC3 file.

    Thanks for your help
    Quote Quote  
  5. Member
    Join Date
    Aug 2004
    Location
    United States
    Search Comp PM
    Originally Posted by Mark001
    Edit: I just tried:
    --------------------
    NicAC3Source("mympeg.mpg")
    --------------------
    in an AVS script. It said that it isn't a valid AC3 file.
    your file extension should read .ac3 not .mpg.

    http://avisynth.org.ru/docs/english/externalfilters/nicaudio.htm

    Just use the demuxed audio DGIndex gives you when you run your project
    Quote Quote  
  6. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    How do I get the demuxed audio from DGIndex when DGIndex doesn't play or output any sound? When I run the AVS script, the program playing the file detects that the file is video-only; there is no audio stream.
    Quote Quote  
  7. Member
    Join Date
    Aug 2004
    Location
    United States
    Search Comp PM
    Originally Posted by Mark001
    How do I get the demuxed audio from DGIndex when DGIndex doesn't play or output any sound?
    When you set dgindex to demux all audio tracks



    and then save project......you DON'T see the demuxed audio in the same folder as your d2v file??


    Then create a script using d2v for video and NicAC3Source for audio

    Code:
    LoadPlugin("NicAudio.dll")
    LoadPlugin("c:\dgdecode.dll")
    mpeg2source("d:\movie.d2v")
    NicAC3Source("d:\movie.AC3")
    Quote Quote  
  8. This is essentially giving me the exact same problem as I had with MPEGDecoder (which doesn't support sound at all);

    Geez, 1) why open another thread for the exact same thing, and 2) did you not read my link in the other thread which answered your audio questions quite clearly, and would have prevented the other problems you've been having (like the DGDecode.dll not matching the version of DGIndex you're using)?

    http://neuron2.net/dgmpgdec/QuickStart.html
    Quote Quote  
  9. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    You may also have audio delay to think about.
    When dgindex demuxes audio, in the file title, audio delay is reported (positive or negative).
    e.g. "test T02 3_2ch 448Kbps DELAY -192ms.ac3'

    Code:
    LoadPlugin("path\NicAudio.dll")
    LoadPlugin("path\dgdecode.dll")
    v = mpeg2source("path\movie.d2v")
    a = NicAC3Source("path\movie .... DELAY XXXms.AC3")
    Audiodub(v,a).DelayAudio(0.XXX)
    gl
    Quote Quote  
  10. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    Awesome!! It worked! It did demux and output the AC3 file, and the filename did have a delay reading (0 ms). I was able to write the script just like 45tripp said, and it re-muxed the d2v and ac3 file into the AVS!

    However, too bad there's no way to get both the audio and the video in the small d2v file; it looks like for every MPEG file I have, in order to edit it in Adobe Premiere Pro CS3 Preview and not take up space with converted video from MPEG, I will at least have to demux the MPEG audio from every MPEG video. So it will take up a bit more space, but at least not as badly as converting them all to AVIs for editing (which amounted to gigabytes per video).

    BTW I read that page to get started with DGIndex, but if it has the answer to this I missed it, sorry.

    Thanks
    Quote Quote  
  11. Originally Posted by Mark001
    BTW I read that page to get started with DGIndex, but if it has the answer to this I missed it, sorry.
    From the QuickStart Guide:
    LoadPlugin("...\DGDecode.dll")
    video=MPEG2Source("myvob.d2v")
    audio=WAVSource("myvob.wav")
    AudioDub(video,audio)

    Now when you open this script in VirtualDub, you will have video and audio.

    We saw processing for a ".wav" audio file above. You need the corresponding source filter for the type of audio you have. Use WAVSource() for ".wav", MPASource() for ".mpa", AC3Source() for ".ac3", etc. WAVSource() is built into Avisynth. The others can be found here: Avisynth Filter Collection.
    Quote Quote  
  12. Member
    Join Date
    Jun 2007
    Location
    United States
    Search Comp PM
    Oh, I'm using NicAC3Source. I guess they're just 2 different plugins.
    Quote Quote  



Similar Threads

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