5

I'm trying to add the audio of a video to another one so I can have multiple tracks for my media service (Jellyfin).

The issue is the new track doesn't have any sound, it's just there with the proper metadata but it's just mute.
I tried playing it with Jellyfin and with VLC.
The original audio tracks play fine.

This is my command.

ffmpeg -i .\3.english.mkv -i .\3.french.mp4 -c copy -map 0 -map 1:a:0 -y .\3.mix.mkv

I also already tried adding -c:a:1 ac3 since this is the format of the audio in the mkv file.

The data of the original audio of the mkv is

Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
    Metadata:
      title           : English
      BPS-eng         : 384000
      DURATION-eng    : 02:21:42.176000000
      NUMBER_OF_FRAMES-eng: 265693
      NUMBER_OF_BYTES-eng: 408104448
      _STATISTICS_WRITING_APP-eng: mkvmerge v25.0.0 ('Prog Noir') 64-bit
      _STATISTICS_WRITING_DATE_UTC-eng: 2018-07-23 09:18:58
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

The data of the file I'm trying to inject from the mp4 is

Stream #0:1[0x2](fre): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s (default)
    Metadata:
      creation_time   : 2014-04-17T18:14:55.000000Z
      handler_name    : movie.track_2.aac
      vendor_id       : [0][0][0][0]

do you guys have any idea of what might be the issue?

I also tried extracting the audio to a file and the aac file works fine, it's just when adding it to the mkv which doesn't work.

top 2 comments
sorted by: hot top controversial new old
[-] quinkin@lemmy.world 1 points 1 year ago

What happens if you try with -map 1:a

[-] pe1uca@lemmy.pe1uca.dev 1 points 1 year ago

It copies all the tracks from the mp4 and they get no sound.
The mkv has 3 tracks, the mp4 has 2, so the output has 5 tracks, the original 3 working and the added 2 without sound.

this post was submitted on 26 Oct 2023
5 points (100.0% liked)

FFmpeg

64 readers
3 users here now

A community to discuss the multimedia framework FFmpeg

founded 1 year ago
MODERATORS