[pvrusb2] Video & Audio out of sync when using mencoder?

Mike Isely isely at isely.net
Sat Nov 19 11:28:20 CST 2011


Roger:

Audio and video are muxed together by the capture device itself not by 
anything about the host.  There's basically NOTHING that any outside 
software can do to interfere with that process.

Now, with that said, it's possible that the de-muxing might get screwed 
up.  If you're using mencoder to "record" I presume you're doing this in 
order to transcode the stream to a different format, right?  That means 
that mencoder is going to de-mux the incoming stream and re-mux the 
re-encoded results to your desired output format.

I have seen cases where mplayer will lose audio / video sync because 
it's not getting the incoming stream data at a consistent rate - which 
can happen if the capture device is having reception problems.  A 
drop-dead absolute method to determine if this is the case is to instead 
of running mplayer directly on the stream that you instead cat the 
device's output to file and THEN run mplayer on the file.  If you do 
this and all sync issues go away then it's mplayer doing something 
strange - because when you're feeding it a ready-made file rather than a 
live stream then there are no gaps / breaks.

Now you said you're using mencoder not mplayer.  However they share the 
same codebase and if mencoder is really de-muxing / re-muxing the stream 
then I could see a similar problem happening.  Try sending the capture 
device output to a file for 5-10 minutes, then run that file through 
mencoder and see if you're still having sync issues.

The last paragraph at the following URL talks about audio/video sync 
issues with mplayer:

http://www.isely.net/pvrusb2/usage.html#mplayer

  -Mike


On Sat, 19 Nov 2011, rogerx.oss at gmail.com wrote:

> Has anybody recently, or in the past, seen any HVR-1950 video/audio out-of-sync 
> when recording using mencoder?
> 
> All of a sudden, I'm noticing video & audio slowly going out of sync once the 
> video starts -- usually only detectable at first by mouth/audio sync and then 
> (randomly?) later one with video scenes & audio?
> 
> I tested my boxes and can play a 720 MPEG2 Commercial DVD without issues.  In 
> the past, I would copy my videos to another box and play them using a 'mplayer 
> on the fly resize for slow cpu's incantation' without sync issues.  ie:
> 
> mplayer -vfm ffmpeg -lavdopts lowres=2:fast:skiploopfilter=all -idx \
> -really-quiet -hardframedrop ${1}
> 
> CPU on all boxes is running around 26%, to 50% fullscreen, etc.
> 
> And, I don't play live video from the HVR.
> 
> 
> I'm wondering if I encountered a bug in somewhere with the 3.x kernels, or 
> maybe mplayer, or maybe even nouveau (which can be likely).
> 
> I even have audio/video sync issues playing back the recorded video on 
> WindowsXP using smplayer.
> 
> 
> I'm limiting-out on ideas as I don't have a multitude of video players 
> installed.  So figured I'd post a query for any ideas.  Especially since I'm 
> seeing this might be occuring during recording?  (On recording using mencoder, 
> I do get '1 duplicate frame each fps', however I've always being seeing this 
> for quite a long time.)
> 
> 
> FYI: Concerning spammers, watch what your email client inserts for the to/cc 
> fields on reply or group reply.  I've noticed most mailing lists and my mutt 
> here will insert the sender's email address along with the group mailing list's 
> email.  And, their mailing list will neglect sending you a copy (even though 
> you haven't marked the option to prevent sending duplicate emails.)  Lovely bit 
> of confusion there, and seeing you're recent spam issue -- it's what seems to 
> be turning the wheel.
> 
> 

-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the pvrusb2 mailing list