VideoHelp Forum




+ Reply to Thread
Results 1 to 21 of 21
  1. How mux mpg format (MPEG-2 codec) and ac3 format (AC3 codec) in AVI container.


    SOLUTION:
    Better is make DVD (mpeg2 (HCEnc) & ac3/dts (eac3to)) with DVDAuthorGUI.
    Last edited by Mark22; 16th May 2015 at 09:23.
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Thou shalt not abuse.

    You may be able to multiplex MPEG-2 video into AVI (despite the AVI container not supporting some features of MPEG-2 videos, like B frames), but you won't easily find a VfW codec or DirectShow filter recognizing this format in AVI, because it is very uncommon. MPEG-2 video belongs in an MPEG Program Stream or Transport Stream. Maybe in Matroska, because this is a universal container supporting a lot of different formats.

    What kind of reason would there be to multiplex MPEG-2 video in AVI? Would you try to edit it in VirtualDub? ... Wrong decision. Editing MPEG-2 video requires different tools, not VirtualDub.
    Quote Quote  
  3. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by Mark22 View Post
    How mux mpg format (MPEG-2 codec) and ac3 format (AC3 codec) in AVI container.
    ffmpeg can do that, but as LigH said, that's not a recommended practice.

    FWIW, MPEG-1 and MPEG-2 can be wrapped in MP4. Just be careful and make sure you don't feed MP4Box with broken /non-compliant video streams (which are not difficult to find or to create, unfortunately).
    Quote Quote  
  4. ffdshow includes both DirectShow and VFW "MPEG in AVI" decoders.

    Here's an example ffmpeg batch file that can remux MPEG2+AC3 from a MPG file into an AVI file:

    Code:
    "c:\program files\ffmpeg\bin\ffmpeg" -i %1 -vcodec copy -acodec copy "%~d1%~p1%~n1.avi"
    You can just drag/drop an MPG file onto that batch file to get a quick remux.

    The bigger issue is why you want to do this as MPEG2 video in an AVI container is somewhat unusual and many programs can't handle it.
    Quote Quote  
  5. Member
    Join Date
    Mar 2011
    Location
    Nova Scotia, Canada
    Search Comp PM
    I wonder why you'd do this ... well, considering the previous responders all know a lot more than I do, I should be wondering too.

    Do you have some device that says it accepts .avi files? Just putting mpeg2 and ac3 streams in an avi file won't work in that case. Avi is just a container. It's the audio/video formats that are important. Unfortunately the docs for devices often aren't clear on this. If a device wants .avi files you should use divx or xvid video and mp3 audio generally.
    Quote Quote  
  6. I found a solution it's MPEG format which support a large number of devices.
    Quote Quote  
  7. Yes, the MPEG Program Stream container (normally named with ".MPG") is pretty widely supported.
    Quote Quote  
  8. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Originally Posted by jagabo View Post
    ffdshow includes both DirectShow and VFW "MPEG in AVI" decoders.
    Well, ffmpeg uses neither VfW nor DirectShow (both are APIs built in Windows). Instead, it uses libavformat to handle containers and split their contents.
    Quote Quote  
  9. Originally Posted by LigH.de View Post
    Originally Posted by jagabo View Post
    ffdshow includes both DirectShow and VFW "MPEG in AVI" decoders.
    Well, ffmpeg uses neither VfW nor DirectShow (both are APIs built in Windows). Instead, it uses libavformat to handle containers and split their contents.
    I offered him two separate things: Using ffmpeg to remux MPEG2/AC3 into AVI files and using ffdshow to give VFW and DirectShow based programs the ability to decode/play those files.
    Quote Quote  
  10. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Ah, sorry, I misread ffdshow for ffmpeg...
    Quote Quote  
  11. How to mux .mpg and .ac3 to .vob or .mpg? - Simple stream copy video and audio to container
    Which program to use?
    Quote Quote  
  12. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Not to *.vob, as that is reserved for DVD-Video authoring. But to mux to *.mpg from MPEG1/MPEG2 video+AC3/MP2 audio is what every mpg muxer does. Try TMPGEnc, Imago, Manzanita...

    Scott
    Quote Quote  
  13. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    To be picky: AC3 in an MPEG Program Stream would possibly not be recognized if it wasn't usual on DVD Video. Without the additional DVD specs, it would just be a substream in the "Private Stream 2" and thus be ignored by software which only and strictly supports MPEG specs, as Dolby Digital does not belong to MPEG. But now that DVD Video is so common, most MPEG PS demuxers will check for PS2 substreams, even if there is no whole DVD structure.

    I'd like to add ProjectX.jar and the "ancient" bbMpeg to software which possibly does that. But even IfoEdit could be used to "author" a minimalistic DVD, if the material is mostly DVD Video compliant (IfoEdit doesn't check it very reliably).
    Quote Quote  
  14. Originally Posted by Cornucopia View Post
    Not to *.vob, as that is reserved for DVD-Video authoring. But to mux to *.mpg from MPEG1/MPEG2 video+AC3/MP2 audio is what every mpg muxer does. Try TMPGEnc, Imago, Manzanita...
    When mux with TMPGEnc (MPEG-2 Program (VBR)) on PC work ok but on DVD player play only video not audio.
    Imago do not support .mpg input.
    Quote Quote  
  15. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    "DVD players" are only supposed to play "DVD Video" discs. They are not expected to play anything else; if they do, you are lucky.

    Regarding "an application not supporting a format": First learn to separate a filename extension from a file format. Files with the same format may have several different extensions. Files with the same extension may have different formats. Of course, Imago supports MPEG-2 video. It may support it only as elementary stream though, not already multiplexed, which may be solved by demultiplexing it before multiplexing. And it may support it only with one extension, but not another, which could be solved by simply renaming the filename extension.

    Only the filename extension tells you nothing about the file format. MediaInfo does, instead.
    Quote Quote  
  16. Sorry, I have home theater:
    When play only .ac3 file work ok full duration
    When play only .mpg (MPEG-2) file work ok full duration
    When mux this two files: play only video no audio (TMPGEnc) or play only 10min. of movie (Imago)

    Is there anything else I can try?
    Quote Quote  
  17. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Author a real DVD structure using IfoEdit, if the MPEG-2 video is DVD compliant.

    And why are you afraid of telling us which player you have?
    Quote Quote  
  18. No problem, I have LG LH-T250SC
    Last edited by Mark22; 2nd Feb 2015 at 03:53.
    Quote Quote  
  19. Member
    Join Date
    Nov 2014
    Location
    Montenegro
    Search PM
    Originally Posted by Mark22 View Post
    How to mux .mpg and .ac3 to .vob or .mpg? - Simple stream copy video and audio to container
    Which program to use?
    You can do it with MPEG Video Wizard DVD 5.0.
    Quote Quote  
  20. Originally Posted by LigH.de View Post
    Author a real DVD structure using IfoEdit, if the MPEG-2 video is DVD compliant.
    This good work but output files is 2gb bigger than input files. If I reduce video and audio bitrate, movie loss quality.
    I use 4.7gb DVD disc.
    Last edited by Mark22; 30th Nov 2014 at 07:56.
    Quote Quote  
  21. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    I don't understand. Simply authoring a DVD Video structure with IfoEdit cannot produce output files 2 GB bigger than the input, because IfoEdit does not recode, only multiplex. There are no controls to reduce bitrates.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!