LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Changing a video's audio codec from one to another on ffmpeg (https://www.linuxquestions.org/questions/linux-desktop-74/changing-a-video%27s-audio-codec-from-one-to-another-on-ffmpeg-4175711710/)

BudiKusasi 05-05-2022 11:58 AM

Changing a video's audio codec from one to another on ffmpeg
 
How is definitively changing a video's audio codec from one to another as specified by ffmpeg

in short, ffmpeg gives specs on a video's audio stream
Code:

Stream #0:1[0x2](und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 47 kb/s (default)
which must be another that ffmpeg has given a specs on another video's audio stream
Code:

  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
How the correct way of solution ?

ondoho 05-05-2022 10:36 PM

Quote:

Originally Posted by BudiKusasi (Post 6350920)
How is definitively changing a video's audio codec from one to another as specified by ffmpeg

in short, ffmpeg gives specs on a video's audio stream
Code:

Stream #0:1[0x2](und): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 47 kb/s (default)
which must be another that ffmpeg has given a specs on another video's audio stream
Code:

  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 64 kb/s (default)
How the correct way of solution ?

So you want to transcode the audio stream without touching the video stream?
Code:

ffmpeg -i badaudio.video -v:c copy -v: a <insert_audio_codec_stuff_here> goodaudio.video
Take care that you choose a compatible container for the final output.

More info: https://www.startpage.com/sp/search?...ode+audio+only


All times are GMT -5. The time now is 03:10 AM.