Choppy Video from MPEG4 Encoder

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
MikeQBF
Blank Cone
Blank Cone
Posts: 87
Joined: 26 Apr 2007 07:18

Choppy Video from MPEG4 Encoder

Postby MikeQBF » 10 Jun 2007 23:26

I am building VLC into a system with a bunch of "industrial-grade" (i.e., astoundingly overpriced) MPEG4 encoders with RTSP support. I can get to the stream just fine and the video pops-up great, but after about 5 seconds it starts dropping frames, then degrades to the point where it will play about a second's worth at a time, each punctuated by a 4-5 second gap.

VLC says nothing about frame drops in the error log. In fact, the error log is completely clear after the usual stream acquisition messages. Adjusting VLC caching or encoder settings changes nothing - still the same deterioration at the same rate of occurrance. I'm tending to suspect something with the encoder but can't prove it. It's not the incoming camera signal because the on-screen clock has the stutter, too.

So I'm wondering if somebody else has experienced this and, somewhere, I'm missing the "forehead-slap" solution to the problem.

ustunozgur
Blank Cone
Blank Cone
Posts: 53
Joined: 09 Oct 2006 00:19
Contact:

Postby ustunozgur » 11 Jun 2007 22:51

Try increasing the verbosity of vlc with -vvv flag to see what happens.

MikeQBF
Blank Cone
Blank Cone
Posts: 87
Joined: 26 Apr 2007 07:18

Postby MikeQBF » 12 Jun 2007 16:07

Tried that, at least on OS X - nothing. I'll try again on XP in a few minutes.

What's strange with this encoder is that under OS X it does the frame drop thing, yet under XP the video shows smoothly - it just gets later and later... and later. 5 seconds of latency at start will gradually become 30 seconds in the space of 5 minutes. I haven't yet let it run untill it fails completely, which it will once something runs out of buffer.

This is starting to sound like a frame rate discrepancy. Looking at the rate of deterioration under XP, it might be an encoder bug where it's encoding 30fps and the RTSP header is telling VLC it's 25fps. I'll play with frame rates.

MikeQBF
Blank Cone
Blank Cone
Posts: 87
Joined: 26 Apr 2007 07:18

Postby MikeQBF » 12 Jun 2007 17:50

Messing with frame rates changed nothing, nor did changing encoder "quality", bit rate, or I2P ratio. Rate of deterioration on XP is an additional 5 seconds of latency for every minute active.

Maximum log verbosity on XP yielded this after about five minutes:

Code: Select all

main debug: opening config file C:\Documents and Settings\brunod1\Application Data\vlc\vlcrc main debug: adding playlist item `rtsp://10.6.171.203' ( rtsp://10.6.171.203 ) main debug: creating new input thread main debug: waiting for thread completion main debug: creating statistics handler main debug: thread 7104 (input) created at priority 1 (input/input.c:265) main debug: `rtsp://10.6.171.203' gives access `rtsp' demux `' path `10.6.171.203' main debug: creating demux: access='rtsp' demux='' path='10.6.171.203' main debug: looking for access_demux module: 1 candidate live555 debug: RTP subsession 'video/MP4V-ES' main debug: selecting program id=0 main debug: using access_demux module "live555" main debug: looking for a subtitle file in C:\Program Files\VideoLAN\VLC\ main debug: looking for decoder module: 27 candidates ffmpeg debug: libavcodec initialized (interface 3348736 ) ffmpeg debug: postprocessing disabled ffmpeg debug: using direct rendering ffmpeg debug: ffmpeg codec (MPEG-4 Video) started main debug: using decoder module "ffmpeg" main debug: thread 7232 (decoder) created at priority 0 (input/decoder.c:159) main debug: `rtsp://10.6.171.203' successfully opened main debug: no usable vout present, spawning one main debug: looking for sub filter module: 2 candidates main debug: using sub filter module "time" main debug: Registering subpicture channel, ID: 2 main debug: window size: 720x480 main debug: looking for video output module: 6 candidates vout_directx debug: creating DirectXEventThread main debug: waiting for thread completion vout_directx debug: DirectXCreateWindow vout_directx debug: created video sub-window main debug: thread 7272 (DirectX Events Thread) created at priority 0 (directx.c:278) vout_directx debug: DirectXEventThread running vout_directx debug: DirectXInitDDraw vout_directx debug: directx-device: vout_directx debug: DirectXEnumCallback: Primary Display Driver, display vout_directx debug: DirectXEnumCallback: RADEON X300 Series , \\.\DISPLAY1 vout_directx debug: selecting RADEON X300 Series , \\.\DISPLAY1 vout_directx debug: DirectXEnumCallback: RADEON X300 Series Secondary , \\.\DISPLAY2 vout_directx debug: screen dimensions (0x0,1280x1024) vout_directx debug: DirectDraw Capabilities: overlay=1 yuvoverlay=1 can_deinterlace_overlay=1 colorkey=1 stretch=1 bltfourcc=1 vout_directx debug: End DirectXInitDDraw vout_directx debug: DirectXCreateDisplay vout_directx debug: DirectXCreateClipper vout_directx debug: disabling screen saver main debug: using video output module "vout_directx" vout_directx debug: NewPictureVec overlay:yes chroma:YV12 vout_directx debug: YUV overlay created successfully vout_directx debug: End NewPictureVec (succeeded) main debug: got 1 direct buffer(s) main debug: picture in 720x480 (0,0,720x480), chroma I420, ar 3:2, sar 1:1 main debug: picture user 720x480 (0,0,720x480), chroma I420, ar 3:2, sar 1:1 main debug: picture out 720x480 (0,0,720x480), chroma I420, ar 3:2, sar 1:1 main debug: direct render, mapping render pictures 0-6 to system pictures 1-7 main debug: waiting for thread completion main debug: thread 7328 (video output) created at priority 1 (video_output/video_output.c:421) ffmpeg warning: warning: first frame is no keyframe (mpeg4@00AD13C0) main error: picture 01FBD990 refcount is -1 main debug: Registering subpicture channel, ID: 3 main debug: Registering subpicture channel, ID: 4 main debug: Registering subpicture channel, ID: 5 main debug: Registering subpicture channel, ID: 6 main debug: looking for video blending module: 1 candidate blend debug: chroma: YUVP -> I420 main debug: using video blending module "blend" main debug: looking for text renderer module: 2 candidates freetype debug: using fontsize: 30 main debug: using text renderer module "freetype" main warning: late picture skipped (13643) main warning: late picture skipped (-6621) main warning: late picture skipped (36807) main warning: late picture skipped (3990) ffmpeg error: more than 5 seconds of late video -> dropping frame (computer too slow ?) main warning: late picture skipped (-16363) main warning: vout warning: early picture skipped (9027181) ffmpeg error: more than 5 seconds of late video -> dropping frame (computer too slow ?) main warning: vout warning: early picture skipped (11044489) main warning: late picture skipped (7574) main warning: late picture skipped (-8122) main warning: late picture skipped (-4142)

MikeQBF
Blank Cone
Blank Cone
Posts: 87
Joined: 26 Apr 2007 07:18

Re: Choppy Video from MPEG4 Encoder

Postby MikeQBF » 22 Jul 2007 05:28

Solution: --clock-synchro=1, or "Clock syncronization [enable]" in the Win/Mac UI preferences under the Input/Codecs main menu with Advanced settings.

Found it several weeks ago... sorry about forgetting to post it.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Choppy Video from MPEG4 Encoder

Postby Jean-Baptiste Kempf » 23 Jul 2007 11:21

Wiki !!!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: NotMori and 8 guests