View Full Version : rmvb to xvid not sync
jujiananren
17th July 2009, 10:32
I wanna convert a rmvb file to avi (xvid) ,but after the conversion the file's video and audio are not sync.i didn't change the fps.i've tryed vdm,WisMencoder and WinAVI Video Converter but they all don't work. what's the problem?
sneaker_ger
17th July 2009, 14:45
It could be because of VFR (http://avisynth.org/VariableFrameRateVideo).
Ghitulescu
17th July 2009, 15:11
Is there any solution to this?
sneaker_ger
17th July 2009, 15:41
Read the chapter "Opening non-MPEG-2 hybrid video in AviSynth and re-encoding" in the link I provided above.
roozhou
18th July 2009, 06:47
Mencoder accepts VFR input and outputs VFR avi, so it should handle this without problem.
Ghitulescu
18th July 2009, 08:38
Read the chapter "Opening non-MPEG-2 hybrid video in AviSynth and re-encoding" in the link I provided above.
Of course I've red this ;) It deals however only with FILM/VIDEO aspects, ie 23.976 and/or 29.97 leaving out any encoding that is user-made (like screen capturing programs) which are not VFR because of FILM/VIDEO alternations but because of space saving algorithms (a new frame will be recorded only if something changes). I understand that this is of utmost importance for anime lovers (they behave like this ;)) but it doesn't solve anything but a particular issue.
I thought of an universal algorithm that recomposes the original video in CFR according to the timestamps (or granularity etc.) of the input frames themselves, and not "pauschal" (all of them should be treated as FILM or as MOVIE, you see what I mean?).
sneaker_ger
18th July 2009, 14:23
The most simple way is to use "DirectShowSource("yourfile.ext", fps=[wantedfps], convertfps=true)". It will just add/drop frames when needed to get the desired constant framerate keeping audio/video sync perfect. I don't know if there's any good solution for blending non-film/video-hybrid videos.
roozhou
18th July 2009, 15:54
I don't know if there's any good solution for blending non-film/video-hybrid videos.
MEncoder is capable of doing this.
sneaker_ger
18th July 2009, 17:20
How? Could you give an example?
roozhou
19th July 2009, 02:13
mencoder -ovc xvid -ofps 30000/1001 -mc 0.1 -of avi -o output.avi -xvidencopts -nosound ... input.rmvb
-ofps value should be the maximum fps of your source video. Do not trust the fps reported by MediaInfo because it may be a fake fps in rm container.
And due to a bug in mencoder, do not use b-frames. After encoding you can remux output.avi with audio into any container you like.
sneaker_ger
19th July 2009, 15:41
Thx for your answer but are you sure it's blending frames? I just tried it and the output looks like it also just adds/drops frames like DSS does.
doomeffect
14th August 2009, 09:08
It is the cause of avisynth diretshow source plugin.
Maybe you can try total video converter
sneaker_ger
14th August 2009, 13:40
It is the cause of avisynth diretshow source plugin.
Maybe you can try total video converter
Are you talking to me? Avisynth's DirectShowSource works fine for me, I just couldn't get mencoder (no AviSynth involved) to do a vfr->cfr conversion using blending, which roozhou said would be possible.
But instead of blending it seemed to also just add/drop frames when necessary like DirectShowSource. So either roozhou's wrong about mencoder being able to blend or I'm to stupid to figure out how to do it.
roozhou
15th August 2009, 08:27
Are you talking to me? Avisynth's DirectShowSource works fine for me, I just couldn't get mencoder (no AviSynth involved) to do a vfr->cfr conversion using blending, which roozhou said would be possible.
But instead of blending it seemed to also just add/drop frames when necessary like DirectShowSource. So either roozhou's wrong about mencoder being able to blend or I'm to stupid to figure out how to do it.
I have never said mencoder blends vfr to cfr. It inserts null frames and keep the output video as vfr. I wonder why you insist on producing a cfr video.
sneaker_ger
15th August 2009, 16:23
The reason why I insisted on doing vfr to cfr? Because the thread starter wants an avi which does not support vfr. But I see that you talk about 120 fps avis as being vfr, while they technically aren't, as avis are always cfr.
As to your other statement:
I don't know if there's any good solution for blending non-film/video-hybrid videos.
MEncoder is capable of doing this.
roozhou
16th August 2009, 12:03
The reason why I insisted on doing vfr to cfr? Because the thread starter wants an avi which does not support vfr. But I see that you talk about 120 fps avis as being vfr, while they technically aren't, as avis are always cfr.
As to your other statement:
I am not talking about 120 fps vfr. VFR RMVBs are produced using its built-in deldup filter. AVIs are fully capable of making this by inserting zero-byte chunks. You don't have to blend or duplicate frames.
sneaker_ger
16th August 2009, 15:34
But by using zero-byte-chunks you are practically duplicating frames, aren't you? That's what they do.
Saying that you are not talking about 120 fps AVI makes me wonder though - are you saying that you are able to create "vfr" avis without using the least the common multiple of the original framerates?
roozhou
16th August 2009, 16:11
are you saying that you are able to create "vfr" avis without using the least the common multiple of the original framerates?
No.
e.g. The original cfr sequence is A A B B B C D E with timestamps 0,1,2,3,4,5,6,7
Real Producer removed duplicates and output A B C D E with timestamps 0,2,5,6,7
Mencoder read the rmvb and outputs AVI of A - B - - C D E (- stands for zero-byte-chunk). AVI should use the same fps as the original cfr source.
sneaker_ger
16th August 2009, 17:53
I see. That really is different from using AviSynth for the conversion. Do you know if the common standalone dvd players support those files?
roozhou
17th August 2009, 09:10
Do you know if the common standalone dvd players support those files?
They all play fine on PC. However, I don't use SA and I have never tested vfr avi on any SA.
If anyone needs to test, it is easy to losslessly convert a 30fps avi to 60fps avi with zero-byte-chunks with the following cmdline:
mencoder -ovc copy -oac copy -ofps 60000/1001 -o 60fps.avi 30fps.avi
sneaker_ger
17th August 2009, 14:50
Thx, gonna test it as soon as I get a player again.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.