VideoHelp Forum




+ Reply to Thread
Results 1 to 24 of 24
  1. Can anyone help me figure out how to encode to MPEG2 with AAC? I have FFMPEG, FCP, MPEG Streamclip, Etc. and I just can't figure it out.
    Quote Quote  
  2. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    What format are your source files?
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 11 Professional, QNAP NAS TS851
    Quote Quote  
  3. Well, I have options there, too, as I can capture into various formats, so if you have suggestions, let me know. But, I thought I would capture to NTSC SD DV format using FCP.
    Quote Quote  
  4. Anyone? Is it even possible?
    Quote Quote  
  5. clarify your requirements - do you mean mpeg2 video in a mpeg2 program stream, with AAC audio (not AC3 audio) ?

    A more typical format is mpeg2 video with AC3 audio in a mpeg2 program stream or transport stream

    It might help if you described what this is for and some background information
    Quote Quote  
  6. Thanks for your reply.

    To be honest, I am not exactly sure what type of stream I need, but if you are able to advise, that would be great. I guess the big question is:

    Is it possible to put MPEG2 video and AAC audio together in a single digital file?

    I do not intend to burn to DVD.

    I will read up on transport stream vs program stream and such in the meantime.
    Last edited by daave; 28th Feb 2012 at 17:55. Reason: Clarificatio
    Quote Quote  
  7. Originally Posted by daave View Post

    Is it possible to put MPEG2 video and AAC audio together in a single digital file?
    Yes it is, for example .mkv container supports this . But the question is WHY? This is a very bizzare combination - there are many more negatives than positives - lower quality video compression, poor compatiblity among them
    Quote Quote  
  8. To further clarify, I have a project to capture Umatic and Betacam tapes to digital files. The spec is for MPEG2/AAC files. It seems like an unusual combination to me too, so I am just trying to understand it. I have Googled and such, and there just seems to be little info on how to get those two formats to stand together. Should I be asking for a better specification?
    Quote Quote  
  9. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Originally Posted by daave View Post

    Is it possible to put MPEG2 video and AAC audio together in a single digital file?
    Yes it is, for example .mkv container supports this . But the question is WHY? This is a very bizzare combination - there are many more negatives than positives - lower quality video compression, poor compatiblity among them
    I'm puzzled by this too along with why there seems to be an explosion in the number of people who deliberately want AAC audio, even if they have to re-encode and potentially lose quality to get it.

    MPEG-2 is actually capable of excellent quality provided the bit rate is high enough. And AAC is fine, but there's no advantage to it over AC3 or DTS and if anything there are some playback disadvantages to using it.
    Quote Quote  
  10. Originally Posted by daave View Post
    To further clarify, I have a project to capture Umatic and Betacam tapes to digital files. The spec is for MPEG2/AAC files. It seems like an unusual combination to me too, so I am just trying to understand it. I have Googled and such, and there just seems to be little info on how to get those two formats to stand together. Should I be asking for a better specification?
    Yes. There must be a mistake somewhere in your project parameters - I would get clarification
    Quote Quote  
  11. Thanks for the replies.

    So, I am going to take it back, and ask WHY the strage spec...

    BUT, for the sake of this thread (because there is little info on this), can we pursue the goal of encoding a file with MPEG2 and AAC?

    Specifically, I have tested poisondeathray's suggestion of encoding to MKV:

    Code:
    ffmpeg -y -i sample.dv -vcodec mpeg2video -sameq -acodec libfaac -sameq sample.mkv
    That created a file in which both audio and video play, but when I inspect the file using MPEG Streamclip, it says:

    Code:
    Stream: sample.mkv
    Path: /Volumes/VHStoDVD/Internal/Test/sample.mkv
    
    Duration: 0:02:18
    Data Size: 246.56 MB
    Bit Rate: 14.96 Mbps
    
    Video Tracks:
    MPEG-2, 720 × 480, 29.973 fps, 9.87 Mbps
    
    Audio Tracks:
    MPEG-4 Audio stereo, 48 kHz, 44 kbps
    
    Stream Files:
    sample.mkv (4.02 MB)
    The audio shows as MPEG-4. The faac library has a flag that I can use to force the version:

    Code:
      --mpeg-vers X	Force AAC MPEG version, X can be 2 or 4
    How do I pass that flag through from ffmpeg to the faac library?


    BTW: It doesn't have to be ffmpeg; any tool you can suggest that will put MPEG2 and AAC together will be fine with me.
    Last edited by daave; 28th Feb 2012 at 18:45. Reason: Spelling.
    Quote Quote  
  12. eg. mkvtoolnix, there is a mac version available

    or tsmuxer, if you wanted a transport stream (mac version available as well)
    https://www.videohelp.com/tools/tsMuxeR
    Quote Quote  
  13. Banned
    Join Date
    Oct 2004
    Location
    Freedonia
    Search Comp PM
    Originally Posted by daave View Post
    Thanks for the replies.

    So, I am going to take it back, and ask WHY the strage spec...

    What does that even mean? OK, so you don't want to answer our questions about why. That's your right. I'll just assume you're a moron. That works for me.


    Originally Posted by daave View Post

    The audio shows as MPEG-4. The faac library has a flag that I can use to force the version:
    AAC is MPEG-4 audio, so is there some reason you think this is wrong? I'm really not understanding what MPEG-4 audio would be if not AAC.
    Quote Quote  
  14. Originally Posted by jman98 View Post
    What does that even mean? OK, so you don't want to answer our questions about why. That's your right. I'll just assume you're a moron. That works for me.
    No, jman98, I am not a moron. The fact is, I did not create the spec, so I cannot answer your question immediately. I have simply been asked to do this, and I am trying to learn what I can.

    Originally Posted by jman98 View Post
    AAC is MPEG-4 audio, so is there some reason you think this is wrong? I'm really not understanding what MPEG-4 audio would be if not AAC.
    MPEG-2 Part 7 defines AAC as part of MPEG-2, so I don't think it is "by definition" MPEG-4 audio. While it may be true that all MPEG-4 audio is AAC, that doesn't mean that all AAC is MPEG-4 audio. I thought that MPEG Streamclip would report AAC there if it were AAC. I could be wrong...
    Quote Quote  
  15. Originally Posted by poisondeathray View Post
    eg. mkvtoolnix, there is a mac version available

    or tsmuxer, if you wanted a transport stream (mac version available as well)
    https://www.videohelp.com/tools/tsMuxeR
    Much appreciated, poisondeathray.
    Quote Quote  
  16. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Okay, just my 1.99 cents

    Even though AAC was born in the MPEG-2 world so to speak, today most of us automagically think of it as an MPEG-4 thing.

    Now, the boring part:

    The specs say it's possible to wrap AAC in a program stream, however I'm afraid most muxers and splitters were not designed to deal with that.

    Currently it's "safe" to wrap MPEG-2 video plus AAC in the following containers:

    --- Matroska

    --- Transport Stream

    --- MP4 / MOV

    --- Gabest's DSM

    --- AVI (NOT Recommended)

    --- ASF (NOT Recommended) (NOT Recommended)

    Now, choose your destiny
    Quote Quote  
  17. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by daave View Post
    To further clarify, I have a project to capture Umatic and Betacam tapes to digital files. The spec is for MPEG2/AAC files. It seems like an unusual combination to me too, so I am just trying to understand it. I have Googled and such, and there just seems to be little info on how to get those two formats to stand together. Should I be asking for a better specification?
    I'll bet that it's a typo or misunderstanding.

    MPEG2 + AC3 is standard. AAC is a different generation of codec.

    People have responded with ways that you might be able to create this hybrid format, but I think your clients would be dumbfounded if you actually gave them what they asked for.
    Quote Quote  
  18. All very helpfulinfo, El Heggunte, thanks.

    AlanHK, you may be right!
    Quote Quote  
  19. MPEG container or MPEG video codec? AAC is a part of MPEG-2 standard (http://en.wikipedia.org/wiki/MPEG-2#MPEG-2_Part_7)

    AAC can be stored without problems in TS container or Program Stream (MPG) container http://en.wikipedia.org/wiki/MPEG_program_stream
    Quote Quote  
  20. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    @ daave
    Hi
    I'm not sure you're using that "-sameq" option properly.
    It's been renamed "same_quant" in modern FFmpeg builds because it means "same quantizer" NOT "same quality".
    The change is documented here ---> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?p=ffmpeg.git;a=blobdiff;f=doc/avconv.te...83e13dba99480d


    -same_quant
    Use same quantizer as source (implies VBR).

    Note that this is NOT SAME QUALITY. Do not use this option unless you know you
    need it.
    So maybe (when you've discussed it with the client) your command needs to be something like this:-
    Code:
     ffmpeg -y -i sample.dv -c:v mpeg2video -b:v 4000k -c:a libfaac -b:a 128k sample.mkv
    Change the bitrates to suit.
    Quote Quote  
  21. Originally Posted by bat999 View Post
    So maybe (when you've discussed it with the client) your command needs to be something like this:-
    Code:
     ffmpeg -y -i sample.dv -c:v mpeg2video -b:v 4000k -c:a libfaac -b:a 128k sample.mkv
    Change the bitrates to suit.
    Code:
    ffmpeg version 0.7.11, Copyright (c) 2000-2011 the FFmpeg developers
    Input #0, dv, from 'sample.dv':
      Duration: 00:08:16.02, start: 0.000000, bitrate: 28771 kb/s
        Stream #0.0: Video: dvvideo, yuv411p, 720x480, 28771 kb/s, PAR 8:9 DAR 4:3, 29.97 tbr, 29.97 tbn, 29.97 tbc
        Stream #0.1: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Unrecognized option 'c:v'
    ...?
    Quote Quote  
  22. Member bat999's Avatar
    Join Date
    Feb 2008
    Location
    United Kingdom
    Search Comp PM
    "Unrecognized option 'c:v'"
    ffmpeg version 0.7.11 uses old syntax.
    Try this instead:-
    Code:
    ffmpeg -y -i sample.dv -vcodec mpeg2video -b 4000k -acodec libfaac -ab 128k sample.mkv
    Quote Quote  
  23. To follow up, I was able to put mpeg2 and aac together in a MKV file as above, suing ffmpeg. But, I explained the situation to the client and gave them 2 samples: mpeg2 with mpeg2 audio, and mpeg4 with aac.
    Quote Quote  
  24. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I would have given them a 3rd option: MPEG2 video + Ac3 audio in Mpeg2 Program stream (aka "DVD-ready"). That's most likely the kind of input they would find useful for various projects.

    Scott
    Quote Quote  



Similar Threads

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