Autor Thema: How to read raw vbi?  (Gelesen 6770 mal)

vladislav

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
How to read raw vbi?
« am: September 28, 2014, 07:27:06 Nachmittag »
Hello,

I want to read vbi lines of the frames of analog TV. I want to use VBI data in my programm.

I tune to the channel.
/opt/bin/mediaclient -m ATV -f 223250000 -d /dev/video0 -v SECAM-K

Then I can save frames from TV - it works OK. For example:
mplayer tv:// -tv driver=v4l2:device=/dev/video0:normid=7 -frames 20 -vo jpeg

But when I'm trying to get VBI lines, I've got only green filled pictures. What I do wrong?


root@Cubian:/home/cubie# mplayer /dev/vbi0 -demuxer rawvideo -rawvideo w=720:h=49:format=yuy2 -noconsolecontrols -frames 30 -vo jpeg
MPlayer svn r34540 (Debian), built with gcc-4.6 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /dev/vbi0.
rawvideo file format detected.
Load subtitles in /dev/
jpeg: Progressive JPEG disabled.
jpeg: Baseline JPEG enabled.
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x1be4b40] BICUBIC scaler, from yuyv422 to rgb24 using C
VO: [jpeg] 720x49 => 720x49 RGB 24-bit
jpeg: . - Output directory already exists and is writable.
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
V:   1.2  30/ 30  0% 37%  0.0% 0 0


Exiting... (End of file)

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8317
    • Profil anzeigen
Re:How to read raw vbi?
« Antwort #1 am: September 28, 2014, 07:31:06 Nachmittag »
I would have to check tomorrow, but the format is definitely not yuyv, it's more like u8

There's a tool called "osc" part of the libzvbi package, that allows you to display the VBI data.
I know mplayer is possible too but I'd need to check tomorrow.
« Letzte Änderung: September 28, 2014, 07:37:42 Nachmittag von Sundtek »
Failure is a good thing! I'll fix it

vladislav

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
Re:How to read raw vbi?
« Antwort #2 am: September 29, 2014, 12:57:22 Vormittag »
Thanks for quick reply. I just have tried osc without success.
I do something wrong, I think.

./osc -d /dev/vbi0 -p -2 -v
libzvbi:io-v4l2k:vbi_capture_v4l2k_new: Try to open V4L2 2.6 VBI device, libzvbi interface rev.
  $Id: io-v4l2k.c,v 1.49 2008/02/19 00:35:20 mschimek Exp $.
libzvbi:io-v4l2k:vbi_capture_v4l2k_new: Opened /dev/vbi0.
libzvbi:io-v4l2k:vbi_capture_v4l2k_new: /dev/vbi0 (Sundtek MediaTV Pro 2k12 VBI) is a v4l2 vbi device,
driver Sundtek, version 0x00000002.
libzvbi:io-v4l2k:vbi_capture_v4l2k_new: Using read interface.
libzvbi:io-v4l2k:v4l2_get_videostd: Current scanning system is 625.
libzvbi:io-v4l2k:v4l2_update_services: Querying current vbi parameters...
libzvbi:io-v4l2k:v4l2_update_services: ...success.
libzvbi:print_vfmt: VBI capture parameters supported:
libzvbi:io-v4l2k:v4l2_update_services: Attempt to set vbi capture parameters.
libzvbi:sampling_par:_vbi_sampling_par_from_services_log: Service 0x00000020 (Closed Caption 525, field 1) requires videostd_set 0x2, have 0x0.
libzvbi:sampling_par:_vbi_sampling_par_from_services_log: Service 0x00000040 (Closed Caption 525, field 2) requires videostd_set 0x2, have 0x0.
libzvbi:sampling_par:_vbi_sampling_par_from_services_log: Service 0x40000000 (VBI 525) requires videostd_set 0x2, have 0x0.
libzvbi:print_vfmt: VBI capture parameters requested:
libzvbi:io-v4l2k:v4l2_update_services: Successfully set vbi capture parameters.
libzvbi:print_vfmt: VBI capture parameters granted:
libzvbi:raw_decoder:vbi3_raw_decoder_add_services: No services to add.
libzvbi:io-v4l2k:v4l2_update_services: Nyquist check passed.
libzvbi:io-v4l2k:v4l2_update_services: Request decoding of services 0x2000041f, strict level 0.
libzvbi:io-v4l2k:v4l2_update_services: Will capture services 0x0000041f, added 0x41f commit=1.
libzvbi:io-v4l2k:v4l2_read_alloc: Capture buffer allocated.
libzvbi:io-v4l2k:vbi_capture_v4l2k_new: Successfully opened /dev/vbi0 (Sundtek MediaTV Pro 2k12 VBI).
VBI read timeout

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8317
    • Profil anzeigen
Re:How to read raw vbi?
« Antwort #3 am: September 29, 2014, 03:12:58 Vormittag »
Try osc with -3 I think.

But I also need to check this, I haven't used it for a while.
VBI is fully supported with PAL-BG and NTSC (that's what I tested back then)

NTSC (including Closed Captioning), PAL-BG normal Videotext.

SECAM-K VBI not sure if that ever has been tested here.
« Letzte Änderung: September 29, 2014, 03:15:59 Vormittag von Sundtek »
Failure is a good thing! I'll fix it

vladislav

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
Re:How to read raw vbi?
« Antwort #4 am: Oktober 02, 2014, 08:43:40 Vormittag »
osc -3 gives me "bktr driver interface is not compilled" error.

mplayer with y8 colorspace shows black rectangle.
mtt opens window, but doesn't load teletext.

So, there is no hope?  ???

Sundtek

  • Administrator
  • Hero Member
  • *****
  • Beiträge: 8317
    • Profil anzeigen
Re:How to read raw vbi?
« Antwort #5 am: Oktober 02, 2014, 02:37:18 Nachmittag »
Our engineer will have a look at SECAM-DK within the next days.
Failure is a good thing! I'll fix it

vladislav

  • Newbie
  • *
  • Beiträge: 4
    • Profil anzeigen
Re:How to read raw vbi?
« Antwort #6 am: Oktober 02, 2014, 03:36:07 Nachmittag »
Our engineer will have a look at SECAM-DK within the next days.

Thanks!
If you want I can give you SSH to my machine where I receiving the signal. Just in case you don't have a SECAM source.