Results 1 to 8 of 8

Thread: How convert mp4/mkv file with AAC audio to AC3?

  1. #1
    Join Date
    Jan 2007
    Location
    Santiago, Chile
    Beans
    218

    How convert mp4/mkv file with AAC audio to AC3?

    Hi
    Some time ago i used a script to perform that task.
    It didn't touch the video. It just changed the audio format. From AAC to AC3.
    Now i'm watching MKV/MP4 files which have the audio in the AAC format. Format that my receiver doesn't decode.
    So, what can i do?
    Where do i find an updated version of the old AAC2AC3 script?
    Thanks for your time and interest.

  2. #2
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: How convert mp4/mkv file with AAC audio to AC3?

    jf do this with your mkv

    Code:
     time ffmpeg -i inputvideowithaacaudio.mkv -c:v copy -c:a ac3  outputmkvwithac3audio.mkv
    replace ffmpeg with avconv if you have not got ffmpeg
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  3. #3
    Join Date
    Jan 2007
    Location
    Santiago, Chile
    Beans
    218

    Re: How convert mp4/mkv file with AAC audio to AC3?

    The command you provide doesn't process the video, right?
    The following line, should it work?
    time ffmpeg -i inputvideowithaacaudio.mp4 -c:v copy -c:a ac3 outputmkvwithac3audio.mkv
    Processing a mp4 file?

  4. #4
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: How convert mp4/mkv file with AAC audio to AC3?

    The command will copy the video stream and convert the audio stream and store the result in the Matroska container.

    You don't need the "time" command at the beginning either. That just tells the OS to report how long the task took. ffmpeg will report that itself anyway.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Jan 2007
    Location
    Santiago, Chile
    Beans
    218

    Re: How convert mp4/mkv file with AAC audio to AC3?

    So, for mkv files with AAC audio, i just need to run this
    time ffmpeg -i inputvideowithaacaudio.mkv -c:v copy -c:a ac3 outputmkvwithac3audio.mkv
    And for mp4, the following
    time ffmpeg -i inputvideowithaacaudio.mp4 -c:v copy -c:a ac3 outputmkvwithac3audio.mkv
    Am i right?

  6. #6
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: How convert mp4/mkv file with AAC audio to AC3?

    yes you are right ¡totalmente! the time thing is good to see how long it takes
    good luck should be quick!


    but your second line should read

    Code:
     time ffmpeg -i inputvideowithaacaudio.mp4 -c:v copy -c:a ac3  outputvideowithac3audio.mp4
    since you are keeping the same video -c:v copy = codec video copy is what this means
    Last edited by shantiq; September 2nd, 2015 at 07:47 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  7. #7
    Join Date
    Jan 2007
    Location
    Santiago, Chile
    Beans
    218

    Re: How convert mp4/mkv file with AAC audio to AC3?

    Thanks!

  8. #8
    Join Date
    Jun 2007
    Beans
    14,788

    Re: How convert mp4/mkv file with AAC audio to AC3?

    but your second line should read ... mp4
    ffmpeg would still copy the video and encode audio to AC3. It would then mux them into a Matroska container (instead of MPEG4 container).
    So it probably doesn't matter, unless the OP intends to play the video on a device/system that can't handle a Matroska container. I guess there could be some differences in the container (chapter markers, tag information), but ffmpeg is usually smart enough to copy those things from one container to another.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •