VideoHelp Forum




+ Reply to Thread
Results 1 to 11 of 11
  1. 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
    Search Comp PM
    Quote Quote  
  3. 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. Try this.

    Code:
    ffmpeg -i input.mp4 -vn -acodec copy output.ac3
    Quote Quote  
  5. 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. 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. 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. 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. 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. 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. 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

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