Log in

View Full Version : Any Lag in this


m79
24th October 2006, 03:46
Hey do you guys see any lag/glitches in this video clip, or any other promlems? BTW the bitrate is 1037 kb/s and the sound is the original Ac3
http://rapidshare.com/files/440423/PB.rar.html
Thanks
-Oh and if im not allowed to post this i will gladly delete it.

DarkZell666
24th October 2006, 08:20
There is some motion-blending and the video is slightly delayed in some places (more in some places than others). Adding an audio delay of, say, 500ms would make it feel better :)

DarkZell666
24th October 2006, 13:59
After watching it again, the delay isn't that big (less than 200ms), but the audio progressively looses sync, and the delay doesn't even vary homogeneously throughout the clip ... some places really are much more out of sync than others :x

m79
24th October 2006, 21:56
ok thanks, now can anyone tell me if the problems are in the original .ts as well, i just want to isolate the problem
Thanks
http://rapidshare.com/files/541110/PrisonBreakINTRO.rar.html

DarkZell666
25th October 2006, 16:03
My 2Ghz Pentium 4 was choking while decoding the original, so I reencoded it to xvid+mp3 using mencoder.

Here is mencoder's log (check the very simple command-line at the beginning) :


D:\Progz\mpui>mencoder PrisonBreakINTRO.TS -oac mp3lame -ovc xvid -xvidencopts fixed_quant=2 -o lol.avi -vf scale=640:352
MEncoder dev-SVN-r20297-4.1.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (Family: 15, Model: 2, Stepping: 9)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

98 audio & 216 video codecs
success: format: 0 data: 0x0 - 0x652706c
TS file format detected.
VIDEO MPEG2(pid=4130) AUDIO A52(pid=4144) NO SUBS (yet)! PROGRAM N. 0
VIDEO: MPEG2 1280x720 (aspect 3) 59.940 fps 16000.0 kbps (2000.0 kbyte/s)
[V] filefmt:29 fourcc:0x10000002 size:1280x720 fps:59.94 ftime:=0.0167
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
xvid: using library version 1.2.-127 (build xvid-1.2.0-dev)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=640 h=352]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 1280 x 720 (preferred colorspace: Mpeg PES)
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
MP3 audio selected.
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 9 -> 8
SwScaler: reducing / aligning filtersize 9 -> 8
SwScaler: reducing / aligning filtersize 10 -> 9
SwScaler: reducing / aligning filtersize 10 -> 9

SwScaler: BICUBIC scaler, from yuv420p to yuv420p using MMX2
SwScaler: using 8-tap MMX scaler for horizontal luminance scaling
SwScaler: using 8-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (YV12 like)
SwScaler: 1280x720 -> 640x352
videocodec: XviD (640x352 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=640x360, sampled=640x352
xvid: Fixed Quant Rate Control -- quantizer=2/1=2.00
Pos: 0.0s 1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.024s.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.024s.
New_Face failed. Maybe the font path is wrong.n 1mb A-V:-0.002 [0:0]
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.024s.

1 duplicate frame(s)!
Pos: 0.3s 21f ( 1%) 14.55fps Trem: 1min 9mb A-V:-0.033 [0:0]
1 duplicate frame(s)!
Pos: 0.5s 31f ( 1%) 17.17fps Trem: 1min 12mb A-V:-0.033 [0:0]
1 duplicate frame(s)!
Pos: 0.7s 41f ( 1%) 18.05fps Trem: 1min 14mb A-V:-0.033 [0:188]
1 duplicate frame(s)!
Pos: 0.9s 51f ( 2%) 18.57fps Trem: 2min 14mb A-V:-0.033 [0:193]
1 duplicate frame(s)!
Pos: 1.1s 61f ( 2%) 18.88fps Trem: 2min 14mb A-V:-0.033 [2581:200]
1 duplicate frame(s)!
Pos: 1.2s 71f ( 2%) 19.17fps Trem: 2min 14mb A-V:-0.033 [2438:203]
1 duplicate frame(s)!
Pos: 1.4s 81f ( 3%) 19.44fps Trem: 2min 14mb A-V:-0.033 [2361:204]
1 duplicate frame(s)!
Pos: 1.6s 91f ( 3%) 19.73fps Trem: 2min 15mb A-V:-0.033 [2322:204]
1 duplicate frame(s)!
Pos: 1.8s 101f ( 3%) 19.92fps Trem: 2min 14mb A-V:-0.033 [2242:204]
1 duplicate frame(s)!
Pos: 2.0s 111f ( 3%) 20.12fps Trem: 2min 15mb A-V:-0.033 [2329:205]
1 duplicate frame(s)!
Pos: 2.2s 121f ( 4%) 19.99fps Trem: 2min 16mb A-V:-0.033 [2418:208]
1 duplicate frame(s)!
Pos: 2.3s 131f ( 4%) 19.90fps Trem: 2min 17mb A-V:-0.033 [2476:210]
1 duplicate frame(s)!
Pos: 2.5s 141f ( 4%) 19.90fps Trem: 2min 17mb A-V:-0.033 [2502:210]
1 duplicate frame(s)!
Pos: 2.7s 151f ( 5%) 19.88fps Trem: 2min 17mb A-V:-0.033 [2501:210]
1 duplicate frame(s)!
Pos: 2.9s 161f ( 5%) 19.92fps Trem: 2min 17mb A-V:-0.033 [2505:209]
1 duplicate frame(s)!
Pos: 3.1s 171f ( 5%) 19.86fps Trem: 2min 18mb A-V:-0.033 [2503:207]
1 duplicate frame(s)!
Pos: 3.3s 181f ( 5%) 19.86fps Trem: 2min 18mb A-V:-0.033 [2478:205]
1 duplicate frame(s)!
Pos: 3.4s 191f ( 6%) 19.83fps Trem: 2min 18mb A-V:-0.033 [2458:205]
1 duplicate frame(s)!
Pos: 3.6s 201f ( 6%) 19.91fps Trem: 2min 18mb A-V:-0.033 [2433:204]
1 duplicate frame(s)!
Pos: 3.8s 211f ( 6%) 19.95fps Trem: 2min 18mb A-V:-0.033 [2422:202]
1 duplicate frame(s)!
Pos: 4.0s 221f ( 6%) 19.95fps Trem: 2min 18mb A-V:-0.033 [2406:201]
1 duplicate frame(s)!
Pos: 4.2s 231f ( 7%) 20.01fps Trem: 2min 18mb A-V:-0.033 [2386:201]
1 duplicate frame(s)!
Pos: 4.4s 241f ( 7%) 20.05fps Trem: 2min 18mb A-V:-0.033 [2375:200]
1 duplicate frame(s)!
Pos: 4.5s 251f ( 7%) 20.09fps Trem: 2min 17mb A-V:-0.033 [2353:201]
1 duplicate frame(s)!
Pos: 4.7s 261f ( 8%) 20.22fps Trem: 2min 18mb A-V:-0.033 [2339:202]
1 duplicate frame(s)!
Pos: 4.9s 271f ( 8%) 20.25fps Trem: 2min 18mb A-V:-0.033 [2388:201]
1 duplicate frame(s)!
Pos: 5.1s 281f ( 8%) 20.33fps Trem: 2min 18mb A-V:-0.033 [2388:202]
1 duplicate frame(s)!
Pos: 5.3s 291f ( 8%) 20.40fps Trem: 2min 18mb A-V:-0.033 [2350:202]
1 duplicate frame(s)!
Pos: 5.5s 301f ( 8%) 20.48fps Trem: 2min 18mb A-V:-0.033 [2325:202]
1 duplicate frame(s)!
Pos: 5.6s 311f ( 9%) 20.52fps Trem: 2min 18mb A-V:-0.033 [2291:201]
1 duplicate frame(s)!
Pos: 5.8s 321f ( 9%) 20.58fps Trem: 2min 18mb A-V:-0.033 [2261:201]
1 duplicate frame(s)!
Pos: 6.0s 331f ( 9%) 20.62fps Trem: 2min 18mb A-V:-0.033 [2243:200]
1 duplicate frame(s)!
Pos: 6.2s 341f (10%) 20.65fps Trem: 2min 18mb A-V:-0.033 [2220:200]
1 duplicate frame(s)!
Pos: 6.4s 351f (10%) 20.68fps Trem: 2min 17mb A-V:-0.033 [2198:200]
1 duplicate frame(s)!
Pos: 6.6s 361f (10%) 20.72fps Trem: 2min 17mb A-V:-0.033 [2180:200]
1 duplicate frame(s)!
Pos: 6.7s 371f (10%) 20.73fps Trem: 2min 17mb A-V:-0.033 [2156:200]
1 duplicate frame(s)!
Pos: 6.9s 381f (11%) 20.77fps Trem: 2min 17mb A-V:-0.033 [2163:202]
1 duplicate frame(s)!
Pos: 7.1s 391f (11%) 20.78fps Trem: 2min 17mb A-V:-0.033 [2155:203]
1 duplicate frame(s)!
Pos: 7.3s 404f (11%) 20.80fps Trem: 2min 17mb A-V:-0.035 [2136:204]
1 duplicate frame(s)!
Pos: 18.8s 1088f (27%) 21.51fps Trem: 2min 15mb A-V:-0.034 [1757:210]
1 duplicate frame(s)!
TS_PARSE: COULDN'T SYNC%) 21.18fps Trem: 0min 16mb A-V:-0.013 [1729:221]
a52: CRC check failed!
a52: CRC check failed! %) 21.18fps Trem: 0min 16mb A-V:-0.015 [1729:221]
a52: error at resampling
Pos: 71.3s 4237f (100%) 21.22fps Trem: 0min 16mb A-V:-0.027 [1721:221]
Flushing video frames
Writing index...
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.024s.

Video stream: 1721.079 kbit/s (215134 B/s) size: 15350867 bytes 71.355 secs 4237 frames

Audio stream: 221.513 kbit/s (27689 B/s) size: 1958400 bytes 70.728 secs

D:\Progz\mpui>


You'll notice the many duplicate frames (every 10th frame is duplicate until frame 391, wierd oO), and the mess at the end of the encode (TS_PARSE: COULDN'T SYNC, and a52: CRC check failed).

The resulting avi file was perfectly in sync ;) (so the source doesn't have problems, or if it has, mencoder handled them nicely :p).

Here it is : <dead link>

m79
25th October 2006, 21:34
hmm for some reason that video lags on my computer..
what would be the best way to edit out commercials and encode that video to an HR XviD or x264 video, with a source like that.
Thanks again

DarkZell666
26th October 2006, 08:32
hmm for some reason that video lags on my computer.. are you talking about the one I posted ? It's plain 640*352 XviD+vbr mp3 in avi ... It should hardly tax 10-20% out of your CPU. If it really does lag your system has a problem (spyware, viruses, b0rked directshow chain, etc.)

However, If you're talking about the original HD MPEG2 .ts file, it's "normal", since it's in HiDef and demands MUCH more CPU power.

mplayer and mpc both have much trouble decoding it on my system, but as you can see in the logfile I posted, mencoder managed to spit an xvid encode @ around 20fps, once resized.

This means that the video rendering in itself eats so much more CPU for HD content (added to the extra decoding time). Indeed, if I resize the video during playback in mplayer it doesn't stutter at all (using "mplayer PrisonBreakINTRO.TS -vf scale=640:352" cmdline). Could you have a try yourself and see if it works ?

Actually, you haven't been very precise as to what software you were using. What player do you use ? If it's mpc or wmp, what filter's are used ?

During playback in mplayer I also get this sort of garbage Too many video packets in the buffer: (361 in 8395916 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
a52: CRC check failed!
A:63614.6 V:63610.2 A-V: 4.393 ct: -0.746 961/961 84% 34% 2.1% 947 0 this occurs at every single frame in certain sections of the .ts file, so I would guess your source also has a problem, even if mplayer plays it correctly.

--------
Talking about cutting the commercials out, you've got a vast choice of solutions, including the two following :
- Reencoding to xvid+mp3 in avi (with mencoder, like I did in the first log) and using vdub.
- Using avisynth, there's surely a sticky or a guide to decoding .Ts in avisynth somewhere (probably consists in installing directshow filter's and using directshowsource()). You can feed the avs script to vdub if you fancy it, or something else.

I personnally prefer the first solution, and if you're afraid of loosing quality, set fixed_quant=1 (instead of 2) and/or don't resize it so much (1024:576 or 704:400 instead of 640:352)