joncampbell123 / composite-video-simulator

Code to process video to simulate analog composite video.
130 stars 17 forks source link

Idea :::: Scrambled The Video + Incrust A Teletext #9

Open chezsick opened 5 years ago

chezsick commented 5 years ago

Hello, Is Possible To Add Three Program ? :::::

  1. A Program To overlay A Teletext
  2. Two Program To Scramble/Descramble An Video As Nagravision Syster And Videocrypt Only In PAL

The Edit Teletext With ::::: http://edit.tf There A Program In Java (Not At Github) Called CryptImage To Scrambled An Video See The Source Code

Good Luck, Sick.

joncampbell123 commented 5 years ago

I suppose that's an interesting idea.

Do you feel comfortable copy-pasting one of the existing CPP files to implement that?

chezsick commented 5 years ago

I'm Sorry The Idea Is For build Like To hacktv (always avi output) But hacktv Write I C Not CPP, You Can Translate?

joncampbell123 commented 5 years ago

I could probably figure it out, but I don't have any interest in that at this time.

I'll keep it bookmarked though if I get around to it.

chezsick commented 5 years ago

OK, I Hope For The Teletext

joncampbell123 commented 5 years ago

You may be able to find a ROM file or a bitmap image of the teletext font and render it on the picture as desired.

Since your interest in that kind of rendering is far stronger than mine, you may want to study how to use the FFMPEG API (either my code or examples) and then implement it in a git repository of your own. You'll do a better job than I can.

joncampbell123 commented 5 years ago

Understand that FFMPEG is actually several libraries.

There is a libavformat, to read packets out of containers (like MP4, AVI, etc).

Then there is libavcodec, which you feed the packets to decode the video and audio of interest.

Each video/audio track is expressed in integer ratios (like fractions), not floating point, to say how many units of time per frame. Timestamps are in "ticks" on that time scale.

There is a presentation time stamp and a decode time stamp (terminology from MPEG standard). They will differ for MPEG, H.264, and other MPEG-like codecs where frame reordering by the codec is used. Use the presentation time stamp to determine when to display the frame.

Because of the frame reordering, the codec will cause a delay from the packet data you feed it to the decoded frame on the other end. It can vary from 1 to 5 frames on average. It will increase the more threads you enable if you enable multi-threaded decoding.

The codec will decode the frame in whatever colorspace it uses. To get RGB, you will need to use libswscale to convert YUV to RGB (and convert RGB back to YUV for encoding).

Have fun!

joncampbell123 commented 5 years ago

Also, some codecs will represent their own frame rate independent from the video track time scale.

It's possible for example for a MOV to report a video track with a time scale of 1/90000 and the video codec (from the headers) to report a frame rate of 30000/1001.

chezsick commented 5 years ago

For The Teletext Font, I Like Spanish Text In The Public Domain :::::: https://www.dafont.com/spanish-teletext.font