Hey guys, checked out the how to convert guide to get files into mp4 for the ipod. I am currently using xvid4psp to convert .mkv into mp4, however, the video is slower (i believe) than the sound and subs. When i play the normal file and the new file and skip to the same second the videos are at different places.. usually a few seconds off. How can i use xvid4psp to encode the video at the correct speed? I believe it is encoding at the same framerate as the original file.
Thanks guys, I am also checking the framerate of the video using SUPER, although the program isnt working right with encoding the video into mp4 (not sure why).
+ Reply to Thread
Results 1 to 19 of 19
-
-
If this is the same video as in this thread, https://forum.videohelp.com/topic353467.html
The answer is at the end. It's probably a VFR MKV. The variable frame rate causes most programs to output files out of sync. Usually only those who are avisynth based will work.
There are several options here outlined here: https://forum.videohelp.com/topic349035.html#1834802, in my experience, using convertfps=true is the easiest way.
Cheers -
I don't usually use xvid4psp, but I was experimenting with it and you can create an auto script using avisynth=>create auto script. Then go avisynth => edit filtering script and it will have done all the work for you. It appears to automatically append the convertfps argument. Save it and open the .avs with xvid4psp and it should work
Double check the the frame rate is accurate with mediainfo (on the original file), if not, manually enter it. -
mediainfo usually doesn't report if it's variable frame rate
Just follow the instructions above. when i said "avisynth" I mean the menu option in xvid4psp. When you save the script, you can open the .avs in a media player like mpc to see if it's in sync (like a preview), then open that .avs with xvidpsp.
If you wanted to change 29.97=>23.976, you could add TDecimate() manually to the script.
Can you confirm if this is a constant sync problem (like 1 sec) or a progressively worsening problem (like normal at the beginning and progressively worse as you go on) ? If it is constant sync problem, just use the audio shift in avidemux (discussed in the previous thread). -
Hrmm, I went avisynth -> create auto, then to enable filtering script and clicked auto and saved. The file doesnt open up however. I get nothing when using VLC or MPC. Not sure if its the video or me thats messing up. I apologize for being frustrating, and thank you for the help.
The file saves as a .avs but doesnt open up correctly... -
In xvid4psp, you can go avisynth=>play in media player classic
You didn't post thre rest of the media info, like codec information. Do you have ffdshow and haali media splitter installed? You also need avisynth installed.
Also please answer the constant sync vs. progressive sync question. -
The synching is progressive i believe. It starts out fine, but i think as time goes on the video and audio go off (i believe the video is slower than the audio). Both the video and sound start at the exact same time (meaning there is no pause or anything and the stuff matches up for the first 10 or so seconds nearly perfectly).
I dont have ffdshow and haali media splitter installed but i have avisynth installed.
Here is the media info
Video
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.1
Format settings, CABAC : Yes
Format settings, ReFrames : 8 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 23mn 14s
Bit rate : 1274 Kbps
Nominal bit rate : 1433 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4/3
Frame rate : 29.970 fps
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.156
Writing library : x264 core 54 svn-614M
Encoding settings : cabac=1 / ref=5 / deblock=1:-1:-1 / analyse=0x3:0x133 / me=umh / subme=6 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=1 / nr=0 / decimate=1 / mbaff=0 / bframes=2 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=2 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40 / rc=2pass / bitrate=1433 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 -
1) You posted the video and it says 23min 14sec, but you omitted the audio information. In the mediainfo from the original .mkv, check the duration of video and audio, do they match?
2) What happens in xvid4psp when you open the saved .avs anyway in xvid4psp? (I think xvid4psp installs stuff separately anyway)
3) What happens within xvid4psp, when you use: avisynth(at the top menu) =>play in media player classic ? -
for 1) the audio is 2 seconds longer.
2) When i open the file in xvid4psp it seems to work fine, i dont get any problems or anything saying that the file cant be opened or anything. And i can have it play on the main xvid screen. However, the sound and video is still out of synch
3) i get and error "the path is not of legal form" -
I have the most current version of xvid, the original also plays normally and i use VLC to play it.
import("C:\Program Files\Winnydows\XviD4PSP5\dlls\AviSynth\functions\AudioFunctions.avs")
import("C:\Program Files\Winnydows\XviD4PSP5\dlls\AviSynth\functions\ VideoFunctions.avs")
loadplugin("C:\Program Files\Winnydows\XviD4PSP5\dlls\AviSynth\plugins\Ni cAudio.dll")
loadplugin("C:\Program Files\Winnydows\XviD4PSP5\dlls\AviSynth\plugins\FF MpegSource.dll")
video = FFmpegSource()
audio = NicAC3Source("0008_1.ac3")
AudioDub(video, audio)
ConvertAudioTo16bit()
AutoYV12()
thats what i get (i took out the video path for privacy, but its the original mkv (same with the sound too but i left the filename)).
The information I posted earlier about audio/video lengths were from the original mkv, not any converted formats. -
Most likely the problem is your original .mkv is VFR
If you notice in the script there is no "convertfps=true" argument, and it uses FFmpegSource() instead of DirectShowSource()
When I tested it on a sample clip, it autogenerated them on my a .mkv on my PC but for some reason it didn't in your case.
I am almost certain you can fix it if you replaced FFmpegSource() with DirectShowSource("C:\PATH\File.mkv",fps=29.970,con vertfps=true), of course adjusting the correct paths and names, then save the script. The problem is xvid4psp uses its own install directory, so all plugins are not necessarily there so I'm not sure if DirectShowSource will work with it. Give it a shot. -
damn, i get FFmpegsource couldnt open (path)... even though i replaced it with directshowsource and the fps/convertfps. I think its because xvid doesnt have the plugin. I tried to move the directshow plugin from the avisynth folder but xvid rejects it.
Is there a better program to use than xvid? I am now at least able to put the subs into the converted video... just the converting seems to be annoying.
Thank you for the help (again lol) -
Did you save the fixed script? Post the fixed script here, even a space or letter off will screw it up
It has nothing to do with XviD. XviD is a codec. It doesn't have plugins per se. Furthermore, tour .mkv is AVC (from mediainfo) or x.264, not XviD
I am quite certain you can do this manually, if you installed avisynth, haali splitter, and ffdshow. As I said earlier there are dozens of threads outling this exact problem. The problem is Xvid4PSP installs its own plugins in a separate directory
EDIT: I just noticed there is no DirectShowSource.dll in Xvid4PSP's default install. It might be that I have avisynth installed separately in the default location, and you don't. So I would install avisynth, haali, and ffdshow -
I think it might work this time, i forgot to install haali and ffdshow.
import("C:\Program Files\Winnydows\XviD4PSP5\dlls\AviSynth\functions\AudioFunctions.avs")
import("C:\Program Files\Winnydows\XviD4PSP5\dlls\AviSynth\functions\ VideoFunctions.avs")
loadplugin("C:\Program Files\Winnydows\XviD4PSP5\dlls\AviSynth\plugins\Ni cAudio.dll")
video = DirectShowSource("path, audio=false, fps=29.970, convertfps=true)
audio = NicAC3Source(path)
AudioDub(video, audio)
ConvertAudioTo16bit()
AutoYV12()
thats what i get now. I think that the videos are now synched, lemme do an encode of it and ill post how it goes. -
Great! it worked out perfectly. Thank you poisondeathray you have been a great help.
-
I've just started using Xvid4PSP to convert .m2t files to .mkv and it seems I am getting the same out of sync issues. I've done 3 conversions and 2 of the 3 have audio that starts fine and progressively gets worse, one of them however is fine from start to finish although I've used the same profile for all three. I looked at media info for one of them and it shows the audio length is 8 seconds longer than the video. I'm a noob to this and really have no clue what to look for, any help would be much appreciated.
-
Seems all is good now, I figured it out. Looks like the AC3 being demuxed out of the .m2t file had bad frames but Xvid4PSP didn't fix them it just remuxed the AC3 to the final .mkv. After quite a bit of testing and trial I managed to demux my .mkv file with MKVextractGUI, then use DGindex to demux the AC3 from the original .m2t file, run AC3fix on the AC3 from the .m2t file, then use MKVmergeGUI with the fixed AC3 file to remux back with the video. Of course not forgetting to add my audio delay, now my audio and video are in perfect sync.
Now, when I tried to remux the original audio video mkv from Xvid4PSP with MKVmergeGUI it never reported any warnings, but when I tried to remux with the audio demuxed from the original .m2t file I got warnings of bad frames which lead me to the AC3Fix. Why is Xvid4PSP not catching these bad frames? or is there something in my settings that I need to do so that when Xvid4PSP comes across them it handles them correctly?
Similar Threads
-
XviD4PSP 5 Video Encoding Error
By B4KED in forum Newbie / General discussionsReplies: 2Last Post: 2nd Dec 2011, 17:31 -
Xvid4PSP extends the duration of the video file
By mark63534 in forum Newbie / General discussionsReplies: 3Last Post: 1st Apr 2010, 00:11 -
(MKV) Audio/Video synching problems after remuxing the same files I demuxed
By Sigma X Virus in forum Newbie / General discussionsReplies: 3Last Post: 9th Feb 2009, 16:27 -
Video/Audio synching problems.
By ericblair in forum DVB / IPTVReplies: 0Last Post: 26th Jan 2009, 19:38 -
how to get good resolution and video using XVID4PSP
By maass in forum Video ConversionReplies: 1Last Post: 6th Nov 2008, 08:22