LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Partial NTSC fix for Video Capture based on SAA7130/34 (https://www.linuxquestions.org/questions/linux-general-1/partial-ntsc-fix-for-video-capture-based-on-saa7130-34-a-349850/)

Electro 08-04-2005 04:09 AM

Partial NTSC fix for Video Capture based on SAA7130/34
 
In /usr/src/linux-`uname -r`/drivers/media/video/saa7134 locate saa7134-vbi.c. Change the line that reads:
Code:

#define VBI_SCALE      0x200
to
Code:

#define VBI_SCALE      0x1e0
This line is around line 50.

Here comes the hard part. While in this directory also find saa7134-video.c. Look for the line that reads
Code:

#define NORM_525_60
It will be around line 165. The lines beneath it will be change not this one. Change the values if they do not match yours.
Code:

.h_start      = 0,    \
.h_stop        = 703,  \
.video_v_start = 22,  \
.video_v_stop  = 263,  \
.vbi_v_start  = 10,  \
.vbi_v_stop    = 273,  \
.src_timing    = 7

Then recompile the kernel, but there are way to not have to recompile the kernel if you have compile saa7134 as a module.

To just compile the saa7134 module. First in /usr/src/linux-`uname -r` make an .config that has only

CONFIG_VIDEO_SAA7134=m

In directory /usr/src/linux-`uname -r`/drivers/media/video/saa7134 run the commands below as root

modprobe -r videodev tuner saa7134
make -C /usr/src/linux-`uname -r` M=$PWD clean
make -C /usr/src/linux-`uname -r` M=$PWD modules
make -C /usr/src/linux-`uname -r` M=$PWD modules_install
depmod
modprobe saa7134

You may need to change the path that points your kernel directory.

Use ntsc-cc to look up closed captions. The utility ntsc-cc is part of the zapping project.

Have fun!!!

Electro 08-04-2005 03:37 PM

I forgot to mention these changes fixes VBI (closed captions and XDS) for saa7130/34 that is receiving NTSC. However, either the code that samples VBI or the code that process VBI takes a long time so programs like tvtime stutters, but ntsc-cc works well with some letters being left out.

What I do not understand is why this has not been fix for over two years but it only took me a few days to fix.

Electro 08-11-2005 02:20 AM

Corrections:
 
Change
Code:

.video_v_start = 22,  \
.video_v_stop  = 263,  \

to

Code:

.video_v_start = 23,  \
.video_v_stop  = 262,  \

This fix will not show the VBI information and bottom sync during captures, so it gives clean captures.

Now, I need to attempt the stutter problem when VBI is decoded during capturing. Any suggestions.

Electro 09-18-2005 01:57 AM

If anybody is running kernel version 2.6.13 and can not get VBI working even though the changelog said that NTSC VBI is fixed, the above steps does work.

It still does not do real-time VBI processing so it will freeze the preview frame. Both closed-captions and XDS (Extended Data Service) work which are part of VBI.


All times are GMT -5. The time now is 06:48 PM.