PDA

View Full Version : mpeg-2 subtitle question


adaml
15th August 2005, 20:45
I am wondering if subtitle data can be directly encoded into an mpeg-2 or mpeg-4 video stream instead of having its own subtitle stream in the video container?

unmei
15th August 2005, 21:08
Yes of course, use AviSynth and load an appropriate subtitle filter in it to "burn" the subtitles into the video frames. This is sometimes called hardsubbing or burning-in the subtitles. All you need it is Avisynth, a encoder program that supports .avs files as input and a subtitle filter. Check for hardsubbing on this board and also check the AviSynth section.

mic
15th August 2005, 21:10
I am wondering if subtitle data can be directly encoded into an mpeg-2 or mpeg-4 video stream instead of having its own subtitle stream in the video container?
If you have it as text data vs graphics, read the docs for/at scc tools, & use them to add cc data to your mpg2. There are other tools & hardware to do the same thing, but scc tools are free. ;)

adaml
15th August 2005, 22:04
thanks alot

adaml
15th August 2005, 22:39
I have another question.....are close captions encoded into the video stream or do they have their own stream just like subtitles?

mic
15th August 2005, 22:57
I have another question.....are close captions encoded into the video stream or do they have their own stream just like subtitles?
I believe both are possible :D

The most advanced DVD authoring apps I believe take a CC text file and include it as a stream -- you'll also see this a bit I think with VCDs & SVCDs.

When first converting to mpg2 (for DVD etc), believe they encode it right along with the stream now-days, I think via hardware, and I think using mostly same text as for subs if you compare the two -- generally I think if CC data includes lower case, it's same or close to sub text encoded with stream. Older methods used someone at a keyboard much like CC data with broadcast, only cc data was merged in newly created mpg2.

In case it interests: Once CC data is in the stream, something like Recode or Shrink will usually preserve it, though only DVD player will usually display CC from mpg2 file. I've read the WinTV software will save broadcast CC data in mpg2, & ATI MMC will save it in vcr format -- version of mpg2 -- but that needs ATI player to display.

Then there are several versions and methods of saving sub &/or CC data with mp4 & similar codecs though display only works with some players. Nero Recode will save subs for example, but mp4 file created will not show subs in most (all?) other player software.

adaml
15th August 2005, 23:39
So there is a specific section in an encoded mpeg video stream for Close Captioning data?...not a seperate stream in the video container for the close captioning data.....So if I were to play an mpeg movie that had close captioning in a media player like VLC and viewed the video data, it would say the video container is made up of two streams.....video and audio?


sorry if this seems like a stupid question, i am new to digital video formats and am just trying to get a good understanding of how the video files are made up. the iso standards tend to be very large and confusing to me

mic
16th August 2005, 06:16
For info on CC, here's a good starting place: http://www.robson.org/capfaq/index.html

When CC data is included in a mpg2 file, I think the info is stored in an unused portion of the file set aside for storing user/general info, but I don't think it's specifically for captioning. I haven't used VLC for a while (actually it's been years I think), so I can't say for sure how it'll work, if it includes captioning support, but apps like Power DVD will, & you are correct, should be just the two streams.

Sulik
22nd August 2005, 11:13
There are multiple standards for encoding CC data in the MPEG-2 elementary streams, though it's always encoded in the user data (GOP layer for DVD, picture layer for everything else).

Recent versions of ATI MMC appear to store CC in captured MPEG-2 files in the ATSC Digital CC format, though not all MPEG decoders can properly display the CC (The Cyberlink decoder and ATI MPEG Video decoders both support ATSC closed captions in MPEG-2).

There are also CC formats defined for VCD and SVCD, where the CC data is stored inside the MPEG ES as well, though it is rarely used.

mic
22nd August 2005, 20:30
Recent versions of ATI MMC appear to store CC in captured MPEG-2 files in the ATSC Digital CC format, though not all MPEG decoders can properly display the CC (The Cyberlink decoder and ATI MPEG Video decoders both support ATSC closed captions in MPEG-2).
Any additional info or sources on this? It could really simplify my workflow.

Know the CC data is stored in the ATI vcr format, but converting to mpg2 appears to strip this, & haven't been able so far to show any CC on latest MMC version mpg2 captures.