VideoHelp Forum




+ Reply to Thread
Results 1 to 10 of 10
  1. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    Hi I have a issue with mapping the audio tracks. In my case I want to
    1. copy video from "%~n1.mkv" --> video 0 (copy video)
    2. copy audio from "audio1.mka" (it has only one audio track) -->audio 0 (clean copy audio)
    3. run "-filter_complex-deesser" on the "audio1.mka" --> audio 1 (deesser audio)

    So I want the 1 audio track (or zero from ffmpeg logic) to be clean copy "audio1.mka" and the 2nd audio track (1 from ffmpeg logic) with the deesser

    When I run my code the clean track is 2nd and the deeser is 1st, I want to switch them. I hope this makes sense.
    Please help I can't figure this out, I tried everything ^^
    Thank you


    Code:
    ffmpeg ^
    	-i "%~n1.mkv" -i "audio1.mka" ^
    	-map 0:v:0 -c:v copy -map 1:a:0 -c:a copy -filter_complex "[1:a]deesser=i=1:f=0" -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
    	"%~p1%~n1_mp4.mkv"
    Quote Quote  
  2. Try this:
    Code:
    ffmpeg ^
    	-i "%~n1.mkv" -i "audio1.mka" ^
    	-map 0:v:0 -c:v copy -map 1:a:0 -c:a copy -map 1:a:1 -filter_complex "[1:a]deesser=i=1:f=0" -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
    	"%~p1%~n1_mp4.mkv"
    Quote Quote  
  3. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    Thanky you for your reply. There is an error "Stream map ´1:a:1´ matches no streams."
    Quote Quote  
  4. Originally Posted by geextah_2 View Post
    Thanky you for your reply. There is an error "Stream map ´1:a:1´ matches no streams."
    Of course, it must be -map 1:a:0
    Quote Quote  
  5. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    Okay I'm not sure if this is what you meant
    Code:
    ffmpeg ^
        -i "%~n1.mkv" -i "audio1.mka" ^
        -map 0:v:0 -c:v copy -map 1:a:0 -c:a copy -map 1:a:0 -filter_complex "[1:a]deesser=i=1:f=0" -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
        "%~p1%~n1_mp4.mkv"
    This gives me 3 audio tracks
    1. deeser
    2. clean
    3. clean
    Quote Quote  
  6. Ok, then try this:
    Code:
    ffmpeg ^
    	-i "%~n1.mkv" -i "audio1.mka" ^
    	-map 0:v:0 -c:v copy -map 1:a:0 -c:a copy -filter_complex "[1:a]deesser=i=1:f=0[a]" -map "[a]" -codec:a ac3 -b:a 160k -ar 44100 -sn -dn ^
    	"%~p1%~n1_mp4.mkv"
    Quote Quote  
  7. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    Thank you that worked This was really driving me crazy ^^

    Do I have to close the thread or marked it as solved? Or just leave it as it is?
    Quote Quote  
  8. Leave it as it is. I am glad that it worked
    Quote Quote  
  9. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    Me too, awesome xD
    Quote Quote  
  10. Member
    Join Date
    Mar 2024
    Location
    germany
    Search Comp PM
    Okay new issue ^^


    How do I say: copy video, and make this to ger:audio and map as 1st audio track

    Code:
    -af "pan=stereo|c0=c2+0.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3" -map 0:v:0 -c:v copy -map 0:a:m:language:ger -codec:a ac3 -b:a 160k -ar 44100
    and do this to ger:audio and map as 2nd audio track

    Code:
    -lavfi "[0]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.6*c0+0.6*c4+c3|c1=c2+0.6*c1+0.6*c5+c3" -c:a ac3 -b:a 160k -ar 44100 -q:a 4 -y
    Last edited by geextah_2; 22nd Mar 2024 at 18:01.
    Quote Quote  



Similar Threads

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