On Mon, Jan 11, 2010 at 09:28:26PM +0100, Jan Stary wrote: > Scenario: some old VHS tapes played in a Sony SLV-E710EE VCR, > video output goes into a composite capture card, audio output > from the VCR goes into the computers's sound card. > 4.6-stable (see dmesg below). > > This is how I try to record the tape with ffmpeg: > > $ ffmpeg -y -v 1 -tvstd pal -isync -f oss -ar 48000 -ac 2 -i /dev/audio0 \ > -f bktr -r 25 -s 768x576 -i /dev/bktr0 -vcodec rawvideo -acodec pcm_s16le \ > out.avi > > During the capture, I get a lot of error messages saying > > SLEPT NO signals - 8866 microseconds late > > - the number of microseconds varies anywhere between 4000 and 20000. > > The resulting video (out.avi) apparently is not well synced - audio > is lagging behind video, and the lag seems to be getting worse. > > Does it have anything to do with the above error message? > What exactly does the message mean anyway? Who tried to SLEEP > for NO signals? What was X microseconds late behind what?
iirc, that means it woke up on it's own (timed out) instead of being signalled that a frame completed, which should have happened 8866 microseconds before the timeout. > (Looking at the source, it seems that fmpeg didn't get > last frame's time from bktr, and tries to do some computation > using av_gettime() to figure out if it's later than the last > frame plus microseconds-per-frame, but I'm not sure. If that > is the case, isn't my bktr crappy in the first place, if it > doesn't tell the driver/application the timestamps?) bktr(4) doesn't do timestamps (neither does video(4), currently). audio APIs don't either, for that matter, but there are methods for figure out the "current time" monotonically, unlike the video APIs, which don't have any kind of "total frame count since start" and, at least in video(4), "time per frame". I think you want to use -vsync but I'm not sure what the parameters are. though it sorta looks like the bktr backend might be doing something wrong; it seems to be updating the timestamp of the current (last) frame when it times out. I haven't really looked closely though, and I don't have any way to test with my bktr now. I also don't remember ever using -isync, but it's been a while since I used ffmpeg to capture from a bktr. -- jake...@sdf.lonestar.org SDF Public Access UNIX System - http://sdf.lonestar.org