hi,
I'm working on a mux beetween a dvd and a webdl fullhd.
the final result must have the webdl for the video and the audio from the dvd.
the webrip contains extra scenes which do not appear in the dvd..
so I've created a variable containing the extra clip, and I try to use it in another tab,
but I receive the message that avspmod doesn't knwn what "VARIABLENAME" means.
I'm using 3 tabs, the first for the webdl, the 2nd for the dvd and a stackvertical tab where i can see audio/video sync.
WEBDL script:
Code:VideoWeb=FFVideoSource("C:\PATH\.WEBRip.mkv", fpsnum=24000, fpsden=1001, threads=1) AudioWeb=FFAudioSource("C:\PATH,1) WEBFull=AudioDub(VideoWeb, AudioWeb) WEBAV1=Trim(WEBFull,19413,19599).Spline36Resize(706,388).Waveform(window=4, zoom=8, under=true)
DVD script:
Code:VideoDVD=FFVideoSource("C:\PATH\C1_t00.mk.mkv", fpsnum=25, fpsden=1, threads=1) AudioDVD=FFAudioSource("C:\PATH\C1_t00.mkv",1) AudioDub(VideoDVD, AudioDVD).AssumeFPS(24000,1001,sync_audio=true).Spline36Resize(706,388) Loop(0,0,573) Loop(0,605,605) Loop(2,3247,3247) Loop(2,3852,3853).Loop(2,3855,3855) Loop(2,4105,4105) DVD1=Trim(0,19412) DVD2=Trim(19413,0) Final=DVD1++WEBAV1++DVD2
The error is "I don't know what WEBAV1 means."
so, I will probably get some other problems about the audio has not the same bitrate or something,
but for the moment, how do I use that variable coming from another tab?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 15 of 15
Thread
-
-
You can't share variables across tabs, just use one tab:
Code:# WEBDL script: VideoWeb=FFVideoSource("C:\PATH\.WEBRip.mkv", fpsnum=24000, fpsden=1001, threads=1) AudioWeb=FFAudioSource("C:\PATH,1) WEBFull=AudioDub(VideoWeb, AudioWeb) WEBAV1=Trim(WEBFull,19413,19599).Spline36Resize(706,388).Waveform(window=4, zoom=8, under=true) # DVD script: VideoDVD=FFVideoSource("C:\PATH\C1_t00.mk.mkv", fpsnum=25, fpsden=1, threads=1) AudioDVD=FFAudioSource("C:\PATH\C1_t00.mkv",1) AudioDub(VideoDVD, AudioDVD).AssumeFPS(24000,1001,sync_audio=true).Spline36Resize(706,388) Loop(0,0,573) Loop(0,605,605) Loop(2,3247,3247) Loop(2,3852,3853).Loop(2,3855,3855) Loop(2,4105,4105) DVD1=Trim(0,19412) DVD2=Trim(19413,0) Final=DVD1++WEBAV1++DVD2
-
ok thx , i got it, but now, using this script:
Code:LoadPlugin("C:\PATH\MeGUI-2913-64\tools\ffms\ffms2.dll") #WEBDL VideoWeb=FFVideoSource("C:\PATH\WEBRip.mkv", fpsnum=24000, fpsden=1001, threads=1) AudioWeb=FFAudioSource("C:\PATH\WEBRip.mkv",1) WEBFull=AudioDub(VideoWeb, AudioWeb) WEBAV1=Trim(WEBFull,19413,19599).Spline36Resize(706,388) #DVD VideoDVD=FFVideoSource("C:\PATH\C1_t00_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1) AudioDVD=FFAudioSource("C:\PATH\C1_t00.mkv",1) AudioDub(VideoDVD, AudioDVD).AssumeFPS(24000,1001,sync_audio=true).Spline36Resize(706,388) Loop(0,0,573) Loop(0,605,605) Loop(2,3247,3247) Loop(2,3852,3853).Loop(2,3855,3855) Loop(2,4105,4105) DVD1=Trim(0,19412) DVD2=Trim(19413,0) Final=DVD1++WEBAV1++DVD2 Return Final #crop(8, 12, -8, -12) #Spline36Resize(706,388) #Waveform(window=4, zoom=16, under=true) Prefetch(7)
Splice: The audio of the two clips have different samplerate! Use SSRC()/ResampleAudio()
this is the audio of the webdl:
Code:Format : E-AC-3 Format/Info : Enhanced AC-3 Commercial name : Dolby Digital Plus File size : 165 MiB Duration : 1 h 43 min Overall bit rate mode : Constant Overall bit rate : 224 kb/s Audio Format : E-AC-3 Format/Info : Enhanced AC-3 Commercial name : Dolby Digital Plus Duration : 1 h 43 min Bit rate mode : Constant Bit rate : 224 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Compression mode : Lossy Stream size : 165 MiB (100%) Service kind : Complete Main
and this is the audio of the dvd:
Code:Format : AC-3 Format/Info : Audio Coding 3 Commercial name : Dolby Digital File size : 136 MiB Duration : 1 h 38 min Overall bit rate mode : Constant Overall bit rate : 192 kb/s Audio Format : AC-3 Format/Info : Audio Coding 3 Commercial name : Dolby Digital Duration : 1 h 38 min Bit rate mode : Constant Bit rate : 192 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Compression mode : Lossy Stream size : 136 MiB (100%) Service kind : Complete Main
can i join them? how do I fix the webdl audio? -
You are changing the sample rate of DVD here: "AssumeFPS(24000,1001,sync_audio=true)", the sample rate must be same to join.
-
-
It told you what to do: " Use SSRC()/ResampleAudio()"
http://avisynth.nl/index.php/SSRC
http://avisynth.nl/index.php/ResampleAudioLast edited by jagabo; 12th Sep 2022 at 14:34.
-
I see but I'm in difficult with them. Never used before.
Tried both, SSRC gives me this error: https://www.dropbox.com/s/bl2hihpd98qss2t/SSRC.png?dl=0
ResampleAudio, just do nothing: https://www.dropbox.com/s/kh8i87igeb161yw/Resample%20Audio.png?dl=0
can I please have a bit of help understanding what command to use of those two, and how to use it?
and why, the line "AssumeFPS(24000,1001,sync_audio=true)" changes the samplerate from 48000 to 46034?Last edited by maudit; 14th Sep 2022 at 21:14.
-
Something like this
Code:AssumeFPS("ntsc_film", sync_audio=true).ResampleAudio(48000)
-
Because that keeps all the audio samples intact. You slowed the video by changing how long each frame is displayed (with no other changes to the frames). And you slowed the audio by changing how long each sample is played (with no other changes to the samples). Ie, both are lossless transitions.
-
thank you all, that works.
SSRC gives me the same previous error or maybe I don't know the correct syntax.
just one thing: the audio loses sync progressively during the whole film.
at the end of the film (frame 144692), the audio shift by about 4 or 5 ms.
audio comparison 25p vs 23976.
https://www.dropbox.com/sh/h6u260pii9yajpb/AAD-8WpyfNezk4KRYwoZSE__a?dl=0
it is not a bug issue, but i would like to understand: this progressive unsync is made by some floting point errors made during the Resample?
using SSRC can make it better? I mean without the progressive 4ms desync?
I'm also wondering if it isn't better to make the mux at 25, using the sync_audio=true, and resample on the webrip parts..
in order to avoid the desync.
edit: I did it and audio sync is now perfect, but in this way for english audio,
I have to use the AC3 192 DVD audio which needs the same script process or better use usac3to to strecth the WebRip E-AC3 224.
uhm.. the best should be to keep all at 23.976 with original eng audio and ita audio processed in this script but without that 4ms desync...
final script at 25:
Code:LoadPlugin("C:\Users\antip\Desktop\util\MeGUI-2913-64\tools\ffms\ffms2.dll") #WEBDL VideoWeb=FFVideoSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\.source\Citizen.X.1995.1080p.WEBRip.DD2.0.x264-NTb_track1_[und].mkv", fpsnum=24000, fpsden=1001, threads=1) AudioWeb=FFAudioSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\Citizen.X.1995.1080p.WEBRip.DD2.0.x264-NTb\Citizen.X.1995.1080p.WEBRip.DD2.0.x264-NTb.mkv",1) WEBFull=AudioDub(VideoWeb, AudioWeb).Spline36Resize(706,388).AssumeFPS(25,sync_audio=true).ResampleAudio(48000) WEBAV1=Trim(WEBFull,19413,19811) WEBAV2=Trim(WEBFull,59105,59484) WEBAV3=Trim(WEBFull,87320,87442) WEBAV4=Trim(WEBFull,92763,92928) #DVD VideoDVD=FFVideoSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1) AudioDVD=FFAudioSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00.mkv",1) DVDFull=AudioDub(VideoDVD, AudioDVD).crop(8, 12, -8, -12).Spline36Resize(706,388) DVDCut=DVDFull.Loop(0,0,573) DVDCut=DVDCut.Loop(0,605,605).Loop(2,3247,3247).Loop(2,3852,3853).Loop(2,3855,3855).Loop(2,4105,4105) DVD1a=Trim(DVDCut,0,19412) DVD1b=Trim(DVDCut,19525,0) DVDCut=DVD1a++WEBAV1++DVD1b DVDCut=DVDCut.Loop(2,40103,40103).Loop(2,40417,40417) DVD2a=Trim(DVDCut,0,59104) DVD2b=Trim(DVDCut,59105,0) DVDCut=DVD2a++WEBAV2++DVD2b DVDCut=DVDCut.Loop(2,59485,59485).Loop(2,59734,59734).Loop(2,71028,71028).Loop(2,71241,71241) DVD3a=Trim(DVDCut,0,87319) DVD3b=Trim(DVDCut,87371,0) DVDCut=DVD3a++WEBAV3++DVD3b DVDCut=DVDCut.Loop(2,88178,88178).Loop(2,88637,88637).Loop(3,90175,90175).Loop(2,90178,90178) DVD4a=Trim(DVDCut,0,92762) DVD4b=Trim(DVDCut,92763,0) DVDCut=DVD4a++WEBAV4++DVD4b DVDCut=DVDCut.Loop(2,95117,95117).Loop(2,95391,95391).Loop(2,103384,103384).Loop(2,103528,103528).Loop(2,119264,119264) DVDCut=DVDCut.Loop(2,119266,119266).Loop(2,119578,119578).Loop(3,123855,123855).Loop(3,126452,126452).Loop(3,128440,128440) DVDCut=DVDCut.Loop(2,131780,131780).Loop(2,131976,131976).Loop(2,132578,132578).Loop(2,132705,132705).Loop(2,140679,140679).Loop(2,143000,143000) Return Trim(DVDCut,0,148295).Waveform(window=4, zoom=1, under=true) Prefetch(7)
final script at 23.976 with 4ms progressive desync.
Code:LoadPlugin("C:\Users\antip\Desktop\util\MeGUI-2913-64\tools\ffms\ffms2.dll") #WEBDL VideoWeb=FFVideoSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\.source\Citizen.X.1995.1080p.WEBRip.DD2.0.x264-NTb_track1_[und].mkv", fpsnum=24000, fpsden=1001, threads=1) AudioWeb=FFAudioSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\Citizen.X.1995.1080p.WEBRip.DD2.0.x264-NTb\Citizen.X.1995.1080p.WEBRip.DD2.0.x264-NTb.mkv",1) WEBFull=AudioDub(VideoWeb, AudioWeb).Spline36Resize(706,388) WEBAV1=Trim(WEBFull,19413,19811) WEBAV2=Trim(WEBFull,59105,59484) WEBAV3=Trim(WEBFull,87320,87442) WEBAV4=Trim(WEBFull,92763,92928) #DVD VideoDVD=FFVideoSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1) AudioDVD=FFAudioSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00.mkv",1) DVDFull=AudioDub(VideoDVD, AudioDVD).AssumeFPS(24000,1001,sync_audio=true).crop(8, 12, -8, -12).Spline36Resize(706,388).ResampleAudio(48000) DVDCut=DVDFull.Loop(0,0,573) DVDCut=DVDCut.Loop(0,605,605).Loop(2,3247,3247).Loop(2,3852,3853).Loop(2,3855,3855).Loop(2,4105,4105) DVD1a=Trim(DVDCut,0,19412) DVD1b=Trim(DVDCut,19525,0) DVDCut=DVD1a++WEBAV1++DVD1b DVDCut=DVDCut.Loop(2,40103,40103).Loop(2,40417,40417) DVD2a=Trim(DVDCut,0,59104) DVD2b=Trim(DVDCut,59105,0) DVDCut=DVD2a++WEBAV2++DVD2b DVDCut=DVDCut.Loop(2,59485,59485).Loop(2,59734,59734).Loop(2,71028,71028).Loop(2,71241,71241) DVD3a=Trim(DVDCut,0,87319) DVD3b=Trim(DVDCut,87371,0) DVDCut=DVD3a++WEBAV3++DVD3b DVDCut=DVDCut.Loop(2,88178,88178).Loop(2,88637,88637).Loop(3,90175,90175).Loop(2,90178,90178) DVD4a=Trim(DVDCut,0,92762) DVD4b=Trim(DVDCut,92763,0) DVDCut=DVD4a++WEBAV4++DVD4b DVDCut=DVDCut.Loop(2,95117,95117).Loop(2,95391,95391).Loop(2,103384,103384).Loop(2,103528,103528).Loop(2,119264,119264) DVDCut=DVDCut.Loop(2,119266,119266).Loop(2,119578,119578).Loop(3,123855,123855).Loop(3,126452,126452).Loop(3,128440,128440) DVDCut=DVDCut.Loop(2,131780,131780).Loop(2,131976,131976).Loop(2,132578,132578).Loop(2,132705,132705).Loop(2,140679,140679).Loop(2,143000,143000) Return Trim(DVDCut,0,148295).Waveform(window=4, zoom=1, under=true) Prefetch(7)
Last edited by maudit; 14th Sep 2022 at 22:26.
-
Less than ~150 ms shift is unnoticeable. Better worry about the audio pitch.
Btw, the original DVD audio may have the incorrect pitch.
I would do like this:
Code:# If audio has the correct pitch: VideoDVD=FFVideoSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1).AssumeFPS(24000,1001) AudioDVD=FFAudioSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00.mkv",1).TimeStretch(tempo=(96.0/1.001))
Code:# If audio has the incorrect pitch: VideoDVD=FFVideoSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00_track1_[eng].mkv", fpsnum=25, fpsden=1, threads=1).AssumeFPS(24000,1001) AudioDVD=FFAudioSource("C:\Users\antip\Desktop\Cittadino X (Gerolmo, 1995)\makemkv\C1_t00.mkv",1).SSRC(Round((48000*1001.0)/960.0)).AssumeSampleRate(48000)
Not in this case as 25 FPS is not correct FPS for this film, it's 4% speed up.
It doesn't work on all samplerates, usually it is used for 44100↔48000 conversions.Last edited by VoodooFX; 15th Sep 2022 at 05:49.
-
-
-
thx all, it worked as expected.
I made 2 versions, one with ita-eng dvd audio at 25p, for ita users.
the other with the webrip untouched plus ita audio at 23.976, just by change position at these few lines:
AssumeFPS(), sync_audio=true and ResampleAudio().
Also used Amplify(0.6) to have smoother audio joints.
all audio tracks are in sync at ms level.
Similar Threads
-
avspmod preview placement
By maudit in forum Newbie / General discussionsReplies: 3Last Post: 9th May 2022, 05:11 -
help with avspmod
By maudit in forum Newbie / General discussionsReplies: 4Last Post: 24th Apr 2022, 05:45 -
Problems with QTGMC in AvsPmod
By Master Tape in forum Video ConversionReplies: 11Last Post: 4th Aug 2020, 08:59 -
Avspmod and Aspect Ratio
By Betelman in forum RestorationReplies: 39Last Post: 12th Jul 2020, 17:50 -
Avspmod stopped working
By Smart Jason in forum Software PlayingReplies: 4Last Post: 16th Nov 2019, 04:54