Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Audio not working #2293

Closed
4 tasks done
jauling opened this issue Jan 11, 2025 · 4 comments
Closed
4 tasks done

Replace Audio not working #2293

jauling opened this issue Jan 11, 2025 · 4 comments

Comments

@jauling
Copy link

jauling commented Jan 11, 2025

The fewer issues I have to read, the more new features I will have time to implement, so I ask that you please try these things first

Operating System

MacOS 15

Steps to reproduce

I'm trying to replace the audio track of a mp4 video that was exported from Insta360 Studio.

  1. I first opened the mp3 music file in LosslessCut, and trimmed it down to the segment I want. I then exported it successfully.
  2. I then add the video track and disable its associated audio track. Files are slightly different lengths so I select "Shortest".
  3. Export

I've also tried closing LosslessCut, opening the video file first, then adding the audio file, disabling the audio track of the video file, and exporting. I've also tried selecting "Longest" for output file length.

image

Input audio ffmpeg info:

  Duration: 00:01:00.03, start: 0.011995, bitrate: 320 kb/s
  Stream #0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 320 kb/s
      Metadata:
        encoder         : LAME3.99r
      Side data:
        replaygain: track gain - -4.200000, track peak - unknown, album gain - unknown, album peak - unknown,

Input video ffmpeg info:

  Duration: 00:01:00.02, start: 0.000000, bitrate: 20132 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 1080x1920, 25072 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
      Metadata:
        creation_time   : 2025-01-08T11:29:10.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: mp3 (mp3float) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 320 kb/s (default)
      Metadata:
        creation_time   : 2025-01-08T11:29:10.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]

Expected behavior

Can hear audio!

Actual behavior

No audio.

Output file ffmpeg info:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'VID_20250108_132920_00_002(sunkissed)-00.00.00.000-00.00.57.424.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    creation_time   : 2025-01-08T11:29:10.000000Z
    encoder         : Lavf60.3.100
  Duration: 00:01:00.02, start: 0.000000, bitrate: 20132 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt709, progressive), 1080x1920, 25072 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
      Metadata:
        creation_time   : 2025-01-08T11:29:10.000000Z
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](und): Audio: mp3 (mp3float) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 320 kb/s (default)
      Metadata:
        creation_time   : 2025-01-08T11:29:10.000000Z
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]

Share log from developer tools

No response

@mifi
Copy link
Owner

mifi commented Jan 21, 2025

looks like you did it correctly. does it work if yo utry a different output format like mov or mkv?

@jauling
Copy link
Author

jauling commented Jan 23, 2025

Actually.. I just realized that only the MacOS Quicklook does not play the audio. If I open the exported video it plays audio in VLC and IINA just fine. Must be something funky with Quicklook plugin, not sure?

@mifi
Copy link
Owner

mifi commented Jan 24, 2025

A guess from my side is that maybe Quicklook doesn't support mp3. You could try with AAC audio and see if it works

@jauling
Copy link
Author

jauling commented Jan 24, 2025

You're absolutely correct. I converted the mp3 to aac and was able to use the same process in LosslessCut and Quicklook played the audio just fine. Sorry to bother you about this!

@jauling jauling closed this as completed Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants