Would like to change audio codec, but keep video settings with ffmpeg

Posted by Craig Tataryn on Super User See other posts from Super User or by Craig Tataryn
Published on 2010-11-26T20:40:00Z Indexed on 2011/01/01 3:55 UTC
Read the original article Hit count: 253

Filed under:

I have a video for which I'd like to convert the audio codec to AAC 320 kbps / 44.100 kHz. What would I use for ffmpeg switches such that all the video settings and codec remain the same, but only the audio codec and settings change?

Here's my video:

$ ffmpeg -i Winnipeg.rb\ Scala-Talk.mov FFmpeg version SVN-r25375, Copyright (c) 2000-2010 the FFmpeg developers
  built on Oct  6 2010 13:02:41 with gcc 4.2.1 (Apple Inc. build 5664)
  configuration: --enable-libmp3lame --enable-shared --disable-mmx --arch=x86_64
  libavutil     50.32. 2 / 50.32. 2
  libavcore      0. 9. 1 /  0. 9. 1
  libavcodec    52.92. 0 / 52.92. 0
  libavformat   52.80. 0 / 52.80. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.48. 0 /  1.48. 0
  libswscale     0.12. 0 /  0.12. 0

Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 10.00 (10/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Winnipeg.rb Scala-Talk.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 537199360
    compatible_brands: qt  
  Duration: 01:10:53.00, start: 0.000000, bitrate: 283 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 800x598, 94 kb/s, 10 fps, 10 tbr, 1k tbn, 2k tbc
    Stream #0.1(eng): Audio: adpcm_ima_qt, 22050 Hz, 1 channels, s16
    Stream #0.2(eng): Audio: adpcm_ima_qt, 22050 Hz, 1 channels, s16
At least one output file must be specified

Many thanks in advance! One with with ffmpeg I've never been able to grok is how to just "tweak" files without having to regurgitate every little setting for things you don't want changes.

© Super User or respective owner

Related posts about ffmpeg

  • how to install ffmpeg in cpanel

    as seen on Super User - Search for 'Super User'
    i'm using dedicated server(linux) so i need to install ffmpeg in cpanel so here ffmpeg i found in Main Software Install a Perl Module but i writing script in php so how can i install ffmpeg phpperl when i'am trying to install ffmpeg in perl module i get this response Checking C compiler… >>> More

  • FFMpeg-PHP Installation Error

    as seen on Server Fault - Search for 'Server Fault'
    While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function) /usr/downloads/ffmpeg-php-0… >>> More

  • git problems installing stuff [closed]

    as seen on Super User - Search for 'Super User'
    root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~#… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    Hi, I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More