[Ffmpeg-devel] closed captioning bug?

Cyrus A lists
Mon Apr 24 05:50:17 CEST 2006


Cyrus A wrote:
> Luca Abeni wrote:
>> Hi,
>> On Sat, 22 Apr 2006 02:51:19 -0400
>> Cyrus A <lists at rooseveltmedia.com> wrote:
>> [...]
>>  
>>>> ok, ive not the faintest idea whats wrong but does chaning the
>>>> resolution / encoding to /dev/null using -vcodec copy help?
>>>>
>>>> btw, are there any distortions in the video vissible?
>>>> maybe the diskaccess for encoding is causing some buffers of the
>>>> capture hw to overrun in that case hdparm / pci settings
>>>> might have some effect
>>>>
>>>> [...]
>>>>
>>>>         
>>> I think it's ALSA. I just tried ffmpeg with "-an" and captions work 
>>> fine.
>>>     
>> I had similar problems in the past, and I do not think the cause is 
>> alsa. In my opinion, it is the A/V synch code in ffmpeg.c that does 
>> not work well with video4linux + oss input.
>>
>> I think you have 2 possibilities:
>> 1) go in ffmpeg.c:do_video_out(); about 10 or 20 from the beginning 
>> of the function you see something like if (vdelta < 1.1) ...
>> else if (vdelta > 1.1)
>> ...
>> Change 1.1 with something bigger (around 5 should be enough, if I 
>> remember well), and it should fix your problem.
>> This is clearly a hack :)
>>
>> 2) the correct solution: use v4l2. Which brings the question: why is 
>> it not used? I suspect there is a problem in the check in configure 
>> (which might be too conservative, to avoid breaking the build).
>> You are using fedora, right? I might have a patch somewhere that 
>> could help... I'll search for it, and I'll send it later.
>>
>>
>>             Luca
>>
>> __  
> The vdelta hack didn't work. I tried -5, 5 and -15, 15. The first line 
> read "if (vdelta < -1.1)" which is what I'm assuming you meant in your 
> hack (you had it without the negative sign). If not, please let me know.
>
> I'm not sure how to force ffmpeg to use v4l2. The configure output 
> says nothing about it. Any help on how to force that change would be 
> greatly appreciated.
>
> In the meantime, I'll try the final alsa 1.0.11 version from sources. 
> It might be a long shot, but at least it's something I can do while I 
> wait.
>
> Cyrus
>
More info here: I downgraded (wiped and reinstalled) to FC3. An old 
version of ffmpeg (probably early 2005) seems to work (at least for a 
while) when trying to capture closed captions.* I also tried the CVS 
version of ffmpeg and the caps were just as screwed up as before.

* The caps will work fine for up to 5 minutes (maybe more) with ffmpeg 
driving /dev/audio and /dev/video0. However, they eventually get garbled 
again for some reason. Maybe the caps go bad when I use my USB KVM 
switch? I have no idea. I'm going to try doing them without KDE or GNOME 
running and no USB switching over the next 24 hours. We'll see how they 
turn out.

BUG SUMMARY: Basically, there is a bug in the latest ffmpeg for 
capturing video and audio. I've tried different kernels, different 
distros, various codecs, etc and as long as /dev/audio and /dev/video0 
are both driven at the same time by ffmpeg, the closed caps are messed 
up. Otherwise, they're fine. zvbi-ntsc-cc does them fine, tvtime does 
them fine, even ffmpeg with "-an" does them fine. ffmpeg with "-ad" + 
"-vd" =  BROKEN.

I hope someone (with more time and expertise than myself) is able to fix 
this bug soon. I would be extremely grateful.





More information about the ffmpeg-devel mailing list