DaGooseYT / FrameGUI

FrameGUI (frame-gooey) is a free, cross-platform, very easy to use encoding utility featuring AI filters, based on the more comprehensive EncodeGUI encoding tool.
https://encodegui.com
GNU Affero General Public License v3.0
125 stars 11 forks source link

Audio and video are out of sync? #6

Closed halidsert closed 2 years ago

halidsert commented 2 years ago

Hey,

Great job on this program. My problem is that no matter what I do, the output video and its audio are out of sync; audio is coming later than it should. I used the settings you recommended in your tutorial video. The file type is mkv and it doesn't change the result if I set the target output file extension to mkv or mp4. I tried both aac and mp3 for audio format. I don't know if its because of audio bitrate or not but I tried both the default value I opened the program for the first time (I think it was 160 or 192) and 320 kb/s. The video I'm trying to convert is an anime episode if that makes any difference (Tune: none and Tune: animation didn't change the result). I hope there is something I'm missing and I can fix this issue.

Thank you.

DaGooseYT commented 2 years ago

Hi,

You'll need to share additional information with me in order for me to find out exactly what's happening. I need aviscript.avs and ffmpeglogs.txt files. Go the the README file and go to the troubleshooting section for directions on how to get those files: https://github.com/DaGooseYT/FrameGUI#troubleshooting

Thanks

halidsert commented 2 years ago

Hello again and thank you for the reply. I attached the log file you asked, but couldn't attach aviscript.avs as it's not supported so its contents are below as text. I also tried a video I captured on my phone and that seem to not have the same issue.

ffmpeglogs.txt

aviscript.avs:

# This file was generated using FrameGUI on 28/11/2021 22:18:19

SetMemoryMax(2048)

LoadPlugin("C:\Program Files (x86)\FrameGUI\ffms2.dll")
LoadPlugin("C:\Program Files (x86)\FrameGUI\SVP\svpflow1_av.dll")
LoadPlugin("C:\Program Files (x86)\FrameGUI\SVP\svpflow2_av.dll")

threads=16

SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("DirectShowSource",3)
SetFilterMTMode("SVSuper",1)
SetFilterMTMode("SVAnalyse",1)
SetFilterMTMode("SVSmoothFps",1)

FFVideoSource("D:\40-50\[JySzE] Naruto - 048 [v3].mkv")

ConvertToYV12()

super_params="{scale:{up:2},gpu:0}"

analyse_params="""{main:{search:{coarse:{distance:0},type:4}},refine:[{thsad:250}]}"""

smoothfps_params="{rate:{num:2,den:1},algo:23,mask:{area:75},scene:{mode:3,blend:true}}"

super = SVSuper(super_params)
vectors = SVAnalyse(super, analyse_params)

SVSmoothFps(super, vectors, smoothfps_params, mt=threads)

Prefetch(threads)
DaGooseYT commented 2 years ago

[matroska, webm @ 0000015f7f0ab840] Could not find codec parameters for stream 10 (Attachment: none): unknown codec Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options - It appears that there is something wrong with the input video codec and finding the duration of the video (possibly missing timestamps?), which is likely what is causing the audio to be out of sync with the video.

I would suggest encoding the video in FrameGUI again, but WITHOUT the SVPFlow interpolation enabled (deselect the Use checkbox in the SVPFlow / AviSynth+ / Other tab). Follow all of the other steps as before and be sure to set the Frame rate value (in the Video (x264) tab) to 0. After the encoding, encode that newly encoded video again but with the SVPFlow interpolation enabled and hopefully that will solve the issue.

halidsert commented 2 years ago

Alright, will do. Thanks again.

DaGooseYT commented 2 years ago

Closing due to inactivity.