VideoHelp.com Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member
    Join Date: Nov 2009
    Location: Canada
    I'm sure that this has been requested before, however, I'm looking for a Linux based command line app that will strip out the 5.1 AAC audio channel. I have some recommendations to use MP4Muxer, however, I'm looking for something that will run on Linux. My primary reason for doing this is so that I can run these MP4 files on my xbox 360. I scanned the forums and couldn't find anything. Any help or links would be greatly appreciated.

    thanks!

    Eric
    Quote Quote  

  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date: Aug 2000
    Location: Sweden
    Quote Quote  

  3. Member
    Join Date: Nov 2009
    Location: Canada
    thanks for the reply baldrick, I had a feeling that ffmpeg would do this. I've been scanning for the last hour for a tutorial to demux the 5.1 ac3 audio track out of this mp4 container and have not come up with much. Do you have any tutorials for this or could someone tell me the command to run this?
    Quote Quote  

  4. Member
    Join Date: Sep 2007
    Location: Canada
    Try this.

    Code:
    ffmpeg -i input.mp4 -vn -acodec copy output.ac3
    Quote Quote  

  5. Member
    Join Date: Nov 2009
    Location: Canada
    ok thanks I will try this, based on the documentation though:

    `-acodec codec'
    Force audio codec to codec. Use the copy special value to specify that the raw codec data must be copied as is.

    so if we used '-acodec copy', how would ffmpeg know which track is the correct one? Documentation doesn't say anything about demuxing audio tracks. I'll give this a go though and see what happens.

    thanks.
    Quote Quote  

  6. Member
    Join Date: Nov 2009
    Location: Canada
    ok, I see what your saying now.. I think that my initial request was incorrectly stated. I'm looking for a way to strip out the ac3 track and be left with the 2.1 channel audio track and the video file in my mp4 container. This is the only way that the xbox 360 can apparently play this type of formate, avi allows for ac3 5.1, however mp4 only allows for 2 channel. I'm looking for a command line based demuxer to rip out the ac3 channel and be left with the video + 2 channel audio. Thoughts?

    Many thanks, learning ffmpeg regardless
    Quote Quote  

  7. Member
    Join Date: Sep 2007
    Location: Canada
    If you want to strip audio, and you can map channels
    http://howto-pages.org/ffmpeg/#strip

    But that's probably NOT what you want to do. You probably want to downmix 5.1 => 2.1 audio with the proper coefficients. The problem with what you were suggesting, is that you don't use information from the other 4 channels. So dialog or ambient sound might be completely missing, for example. A proper downmix incorporates all the channels.

    Easy to do on windows, I don't know how to do on linux

    Edit - You could use avidemux's audio channel downmixer, but I don't know how to use the CLI (only GUI). This way you could copy the video, and just convert the audio (stereo downmix) in 1 step.
    Quote Quote  

  8. Member
    Join Date: Nov 2009
    Location: Canada
    thanks again for the response poison. The file has two audio tracks:

    Format: AAC
    Audio #1: AAC = 128 kbps (2 Channel)
    Audio #2: AAC = 313 kbps (6 Channel)
    Sample Rate: 48000Hz

    I want to rip out Audio#2 as the 2 channel is already in the container. I don't think that downmixing is necessary.

    cheers.

    Eric
    Quote Quote  

  9. Member
    Join Date: Sep 2007
    Location: Canada
    OK now it makes sense. I'm a dummy. You have 2 audio tracks.

    BTW it's not really "ripping out" , it's more like copying the audio & video into a new container, but leaving 1 track out.

    You can copy video track, and audio #1 then using -map, -vcodec copy, and -acodec copy
    http://howto-pages.org/ffmpeg/#map

    And welcome to the forum
    Quote Quote  

  10. Member
    Join Date: Nov 2009
    Location: Canada
    hey thanks man, this is a sweet forum.. very helpful indeed and I can say now that I'm much more in tune with ffmpeg.. pretty sweet little app.

    cheers.. again.
    Quote Quote  

  11. Member
    Join Date: Nov 2009
    Location: Canada
    For those curious, I did

    Code:
    ffmpeg -i movie.mp4 -map 0:0 -map 0:1 -vcodec copy -acodec copy outtest.mp4
    and this worked great, thanks for the help again poison.
    Quote Quote  




Similar Threads

  1. Streaming MP4 using VLC and ffmpeg on Linux?
    By bobc02 in forum Video Streaming
    Replies: 2
    Last Post: 24th Sep 2011, 11:02
  2. Extracting timecodes from an mp4/h264 under linux
    By asbonasty in forum Video Conversion
    Replies: 0
    Last Post: 13th May 2010, 09:19
  3. CLI to mux/merge MP4 video and AAC audio?
    By RogerTango in forum Video Conversion
    Replies: 3
    Last Post: 9th Nov 2009, 20:53
  4. Converting video of any format to MOV or MP4 Linux/Debian
    By lordshadow in forum Newbie / General discussions
    Replies: 11
    Last Post: 31st Aug 2008, 10:35
  5. ffmpeg on Linux Error - .avi to mp4
    By coolboarderguy in forum Video Conversion
    Replies: 10
    Last Post: 5th Nov 2007, 09:10
Search   Contact us   About   Advertise   Forum   RSS Feeds   Statistics   Tools