VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    Hi, I have a problem with audio delay. I split the channels from a 5.1 movie track. Extract the center channel, make some VST adjustments and then remerge all channels back into the 5.1 movie track. The problem is that those VST changes add a 51 miliseconds delay to the center channel which remerged with the other audio channels sounds like echo or delay. How can I make an adjustment/recompensation for that in ffmpeg? I need to cropp the first 51ms. So he starts reading the center channel not from 0 but first after 51 miliseconds.

    using
    Code:
    -ss 51ms -i "K:\out.wav"
    fixed the echo, but this introduces the first half second of the video to sound weirdly, you can hear like the audio is swtiching. So this isn't a perfecect solution. When I cropped the audio manually this wasn't the case.

    -itsoffset isn't working on audio

    This is my script.
    Code:
    -i "K:\out.wav"
    is the center channel track that needs this delay adjustment.

    Code:
    ffmpeg ^ 
    -i "%~n1.mkv" -i "K:\out.wav" ^ 
    -lavfi "[0:a:m:language:ger]pan=stereo|c0=c2+0.6c0+0.6c4+c3|c1=c2+0.6c1+0.6c5+c3[a1];[0:a:m:language:ger]channelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR];[FL][FR][FC][LFE][SL][SR][1][1]amerge=8,channelmap=0|1|7|3|4|5:5.1,pan=stereo|c0=c2+0.6c0+0.6c4+c3|c1=c2+0.6c1+0.6c5+c3[a2];" -map 0:v:0 -map [a1] -map [a2] -c:v copy -c:a ac3 -b:a 160k -ar 44100 -sn -dn ^ 
    "G:%~n1.mkv"
    Thank you for any help
    Quote Quote  
  2. Try
    Code:
    ffmpeg -i center_channel.wav -ss 0.051 -c copy -output_ts_offset 0 output.wav
    Then merge the channels
    Quote Quote  
  3. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    adelay seems to add delay, a need the opposite of that like hasten
    Quote Quote  
  4. delay OTHER channels then - also it should be possible to perform negative delay (i.e. advance audio) but it will be performed in similar fashion i.e. by introducing delay on other channels.

    This can be useful too https://ffmpeg.org/ffmpeg-filters.html#setpts_002c-asetpts
    Last edited by pandy; 24th May 2024 at 10:11.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!