V
V
Vladimir2016-11-29 21:32:53
linux
Vladimir, 2016-11-29 21:32:53

How to replace audio track in mp4 container (sound aiff video avc )?

How to replace audio track in mp4 container (sound aiff video avc ) ?
I try like this
ffmpeg -i video.mp4 -i video.aiff -codec copy -shortest video1.mp4
Here is the output, as a result there is only one track in the file, the old one. Ideally I need to remove the old one and add the new one

Stream #1:0: Audio: pcm_s16be, 48000 Hz, 2 channels, s16, 1536 kb/s
[mp4 @ 0x127f960] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0x127f960] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'treningNatasha1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 19529864
    compatible_brands: mp42isom
    encoder         : Lavf56.40.101
    Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 15150 kb/s, 25 fps, 25 tbr, 12800 tbn, 25 tbc (default)
    Metadata:
      creation_time   : 2016-11-29 14:12:01
      handler_name    : Video Media Handler
      encoder         : AVC Coding
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 192 kb/s (default)
    Metadata:
      creation_time   : 2016-11-29 14:12:01
      handler_name    : Sound Media Handler
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=14725 fps=4000 q=-1.0 Lsize= 1103443kB time=00:09:49.00 bitrate=15347.0kbits/s    
video:1089304kB audio:13810kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.029805%

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Shumkin, 2016-12-08
@ashumkin

https://www.google.ru/search?q=ffmpeg+replace+audio+mp4
first link
superuser.com/questions/602662/how-do-i-replace-th...

ffmpeg.exe -i input_video.mp4 -i replacement_audio.m4a -vcodec copy -acodec copy -map 0:0 -map 1:0 output.mp4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question