VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Hi all, I'm new here but I've been experimenting with analog video capture for a few years.

    My old methods were pretty bad, but in the last week or so I've been looking into methods to try and improve the output in software. The main focus of my efforts so far has been VBI data (Captions, XDS, etc): When viewed in GraphStudioNext, my analog capture device (GV-USB2) has an open VBI output pin. When I connect that to a "dump" filter, it produces a large lump of data, which can be viewed and interpreted with this AVISynth script:

    Script:
    Code:
    RawSourcePlus("capture.vbi",1440,12,"Y8",show=false,fpsnum=60000,fpsden=1001).SelectEven()
    PointResize(720,480)
    Output:
    https://www.youtube.com/watch?v=PGj9ZLDwusI

    I switch between the Odd and Even field depending on which one contains the caption data. In my experience with this card, only half of the fields captured from the VBI will contain anything useful on Line 21. The other half of the fields will just contain garbage on that line.

    Of course, the above script is just to enlarge the VBI data for easy viewing, for interpreting with tools like cc_decode.py I use this script:
    Code:
    RawSourcePlus("capture.vbi",1440,12,"Y8",show=false,fpsnum=60000,fpsden=1001).SelectEven()
    PointResize(720,12)
    AddBorders(0, 0, 0, 4)
    This will create a 720x16 video file that cc_decode.py will read the frames from and look for Line 21 EIA-608 captions. It will output either the raw EIA-608 codes linked to each frame it was found on, or timed SRT format subtitles.

    I've also made an AVISynth script that will enlarge the VBI and append it to the top of the video frame, in perfect sync with the content, mostly for debugging and viewing the VBI data as it goes with the video. After decoding the captions with cc_decode.py and then baking them in with ffmpeg, this is the result:

    Script:
    Code:
    VBI = RawSourcePlus("capture.vbi",1440,12,pixel_type="Y8",show=false,fpsnum=60000,fpsden=1001).SelectEven().PointResize(720,120).ConvertToYV12()
    VIDEOSRC = DirectShowSource("../raw_capture/capture.avi").ConvertToYV12().Yadif(mode=2, order=1, planar=false, opt=-1)
    AUDIO = WavSource("capture.avi")
    VIDEO = StackVertical(VBI, VIDEOSRC).PointResize(720,600)
    AudioDub(VIDEO, AUDIO)
    Output:
    https://www.youtube.com/watch?v=bW1716oK9XI

    I've gathered other VBI datastream samples from other people's capture cards, and I've noticed that the line length and line height will differ based on the device.

    Pinnacle MiroVIDEO PCTVpro BT848 - 2000x16
    WinTV Brooktree Corporation Bt878 (rev 11) - 2048x16
    GV-USB2 Analog Video Capture - 1440x12

    By using those numbers, you can get roughly the same view of the incoming VBI data on each of them.

    For my current test captures, I've been using GraphStudioNext with a graph that looks like this:


    This dumps the raw video, audio and VBI datastreams through DirectShow in perfect step with eachother, so they can be aligned for debugging, VBI viewing, or simple XDS/Caption dumping. But I'm looking to automate this whole process, which is why I'm posting all this. I'd like to be able to start and stop these graphs I've constructed through code (probably Python or something) so I can set record time, easily swap out devices, and go straight to capture data processing once I'm done capturing.

    My question for you all is, what's the best kind of DirectShow to AVISynth pipeline I could construct in a self-contained (Python? Maybe?) code block to dump the raw capture data as it comes in from the card, and then automatically run the output files through AVISynth to create the final archival copy, as well as cc_decode.py to dump the XDS and Line 21 closed captions data.

    I could just startup GraphStudioNext, record for however many hours the tape is, and then manually stop it and start the decoding process, but I'd like to skip over GraphStudioNext and just do it all from a single button press or code execution.

    I've been trying to work at this for about a week and I've hit a wall with DirectShow. There's no decent way I can find to generate working graphs and then execute them outside of GraphStudioNext. I've tried DSCmd but it doesn't work with the graphs I construct when converted to its commandline format. The creator of that software says its because the two GV-USB2 filters (Video and Audio) share the same source CLSID, which DSCmd can't properly interpret.

    I'm also not necessarily attached to DirectShow. I am restricted to Windows, but if there's ANY other way to dump the capture device's three output pins all at once, I'm all ears.
    Quote Quote  
  2. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    If anyone who can answer your question it will be one of the VHS-decode contributors here.
    Quote Quote  
  3. I know this is a slightly older thread but I thought might as well make a "solved forever" end post for it.

    For the last 4 years the most cost effectibe and most easy to deploy workflow for this type of archival has been just the full 4fsc decoded frame from the decode projects using RF captures of the FM RF signals from tapes directly or RAW baseband CVBS if captured properly.

    It's the full 4fsc signal in 1135x624 PAL / 910x524 NTSC

    And no its not using some fancy capture cards or VBI pins or anything complicated to the lay user who wants to get at the visual data stream, and it costs less then 100USD!

    This pretty much the end game for a few things:

    - Time Base Correctors (Its done in software at the source signal level)
    - Comb Filtering (We have 6 chroma decoder filters anyone want to add more?)
    - Vectorscopes (You have S-Video/CVBS on file)
    - VBI Data Extraction (You can pull from the Luma raw decoded data or export to IMX hight standard video)

    Image
    [Attachment 81993 - Click to enlarge]


    We even have a pretty bloody powerful Closed Captions Decoder, VITC timecode decoder and VITS decoder (ld-process-vbi and ld-process-vits respectivly) but teletext decoding, WSS - Wide screen signalling and XDS is not yet implimented into the workflow directly.

    Image
    [Attachment 81994 - Click to enlarge]
    Image
    [Attachment 81995 - Click to enlarge]


    Video RF + HiFi RF + Baseband Audio is all captured in sync with the CX Card Clockgen Mod workflow today very turnkey, with more capture hardware in the works such as the MISRC.

    Image
    [Attachment 81997 - Click to enlarge]
    Image
    [Attachment 81998 - Click to enlarge]


    We are living in the future of affordable full signal archival!

    Image
    [Attachment 81996 - Click to enlarge]


    PAL Tape - IMX 720x608 export from tbc-video-export after centering in ld-analyse.
    Last edited by harrypm; 6th Sep 2024 at 10:34. Reason: added context to 4fsc visuals and the last exported image.
    Bringing Affordable FM RF Video Tape Archival to the World!
    Website | YouTube | Odysee | RF Capture & Tape Decoding Wiki | CX Cards & CXADC
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!