1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Compressing audio in video files. help.

Discussion in 'Audio, Video & Home Theater' started by ste2425, Apr 3, 2013.

  1. ste2425


    May 27, 2008
    3,577 (1.03/day)
    Thanks Received:
    Huddersfield, uk

    Ive got all my dvd's ripped onto my hard drive to play back through my xbox, dam wireless is terrible (awful virgin media thing wireless keeps dropping out). Anyhoo im assuming its the terrible speakers in my tv but when i play it back i find the quiet parts of the video are excessively quiet compared to the loud parts meaning i have to constantly turn the volume up and down.

    I need to compress the audio so the dynamic range between loud and quiet is smaller, i have no issue doing this with Audacity however i have no idea how to extract the audio then recombine it in time with the video without loosing any video quality.

    How would you guys go about this? Is there a utility that will do the whole lot for me or just extract insert the audio?

    Many thanks guys n gals
  2. jihadjoe


    Oct 26, 2011
    419 (0.19/day)
    Thanks Received:
    fmpeg will do that.

    you'll end up running something like this from the command line:
    ffmpeg -i "videosource.avi" -i "audiosource.wav" -vcodec copy -acodec copy "out.mp4" -map xx -map yy

    you can leave the audio source as uncompressed and use ffmpeg to encode the audio:
    ffmpeg -i "videosource.avi" -i "audiosource.wav" -vcodec copy -strict -2 -acodec aac "out.mp4" -map xx -map yy

    xx/yy = the stream mappings for your video and audio streams. you can get the stream numbers mappings by running ffmpeg without an output file:
    ffmpeg -i "videosource.avi" -i "audiosource.wav"

    in the muxing steps, replace xx with the stream number for the video, and yy with the stream number for the audio file.

    I'm sure there's a GUI for this somewhere, and someone else will point that out but I tend to do almost everything with a CLI so here's my 2c.
    ste2425 says thanks.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)