Positioning subtitles below the movie

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
jech
Blank Cone
Blank Cone
Posts: 41
Joined: 19 Feb 2005 13:46

Postby jech » 25 Jan 2007 16:20

As I already wrote, I think it should be possible to write a filter, which will add black borders to a video. There already is a filter which crops a video, so I think adding black borders should be possible too. Which file is the cropping filter? I would take a look at it. Unfortunately I have almost no experiences with programming in C.

Once you add the black borders to a movie, it shouldn't be a problem to place subtitles on them.

dizz
New Cone
New Cone
Posts: 3
Joined: 26 Dec 2006 13:25

Postby dizz » 25 Jan 2007 19:17

The player does NOT create the black borders! A cropped video has no black borders they have been removed.
If a video with size that doesn't match the screen size is played in full screen, then I will see black areas above and below it. If the player does not create these areas, please explain to me what does create them.
You can't place subs in a video area that's not there or at least not reliably.
Please tell me, how do other players (like BSplayer) do the trick? Did you try BSplayer with the functions I've discussed? As I wrote I've used that player for years, but there has never been any problem with subtitles in black space.
Which of the 9 some odd formats would you like to try?
As far as I know the most common text based format are .srt substitles.

So again, could you please explain why so many other players are able to show subtitles (in full screen mode) anywhere on the screen, and manage to do so in a stable manner?

jech
Blank Cone
Blank Cone
Posts: 41
Joined: 19 Feb 2005 13:46

Postby jech » 25 Jan 2007 22:18

dizz
The other players do it just like explained it in my previous post. First they the black borders to match screen aspect ratio and so the black bars become part of the video. Then it is possible to place subtitles anywhere.

BSPlayer adds the borders in fullscreen only, while other players can do it even in windowed mode.

If VLC goes fullscreen, the black borders are just there, it's an inactive part of monitor which VLC can't control. So you need to have a filter which will add black borders to video to match screen AR. I still believe it shouldn't be so difficult for an experienced programmer to make such filter, but unfortunately I'm not a C/C++ programmer :-(.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 26 Jan 2007 08:06

The info is just being rehashed here again and again. There are almost NO players that support this and those that do are bastardized to the point of showing half the sub of 2 line text on the border and on the video as such they are not reliable. All of these players are Direct Show players, VLC is NOT. If you believe you can do better the source code is available. But you should be aware that Vobsub, DVD, DVB and Sub Station Alpha will probably not be effected.

Considering 4x3 monitor are disappearing and 16x10 monitors are becoming standard this is really a moot issue. Please also note that all of the new HD material created commercially is now showing subs on the video as there are NO black borders.

I was going to write a detailed reply but it has been falling on def ears and I'm tired of repeating myself in different ways to try to get the point across.

jech
Blank Cone
Blank Cone
Posts: 41
Joined: 19 Feb 2005 13:46

Postby jech » 27 Jan 2007 13:48

DJ
I would really like to hear the explanation. I think we're probably not understanding each other. I won't be talking about DirectShow players. They all use different methods to display subtitles a these probably wouldn't work in VLC.

But let's talk about ffdshow. I suppose you know this project. It's a DirectShow decoder/filter based on libavcodec. And yes it supports letterboxing. So the black borders and subtitles are there before the picture is passed to a player.

Image

You can even set letterboxing to 16:10, if you have such monitor. But today are much more common 5:4 monitors (1280x1024 LCD). But even if you had 16:10 monitor, most movies are 2.35:1, so there is still room for letterboxing. I never said that all subtitles have to be in the black area. But I want them as low as possible.

VSFilter (AKA VobSub) is a subtitle filter. It is also processing image before passing it to a renderer. And again you can set letterboxing to many different aspect ratios.

Image


I definitely don't want my movie to look like this:

Image

Eve if I had a 16:10 monitor, I'd rather see my movies look like this:

Image

If you said: "We (VLC developers) are not interested in this feature", I'd be disappointed, but I would accept it. But if you say "it's not possible", then I'm asking myself: "Why is it possible in VSFilter, ffdshow, MPlayer, VirtualDub, Avisynth and not in VLC?"

There are many opensource video playback/editing filters which implement letterboxing. So what is so special in VLC that it can't be implemented. Furthermore there is support for video filters in VLC, so I'm really confused. Could you please explain it to me?

Unfortunately I can't help with contributing code, but I'm trying to help at least with ideas how to do it.

Btw. have you read my thread at Doom9 I already linked here before? I think it should be even possible to move DVD/DVB subpictures up and down. They are just an image overlayed on top of video, right? So it should be possible to crop them. Maybe difficult, but possible.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 28 Jan 2007 06:35

1. on a 16x10 monitor it wouldn't look like that.

2. MPlayer, VirtualDub, Avisynth does NOT support subtitles that are out of or off the video area. MPC and vsfilter make an attempt that leaves one line of text in the video area and one line of text out of the video area in two lines of text and the player is resized according to the new dimensions with no options for movable subs. This answer is not satisfactory. Nor will it satisfy people that own a 16x10 monitor that want the video to take up the whole height and there is not enough room to display any text that would be readable in the remaining area.

3. The newer standards for HD video are 1.78:1 and for 16x9 enhanced it's 2.37:1 the latter standard, I'm finding to be quite annoying on some 16x10 TVs as the people are NOT the right size. But setting this aside, in general, YOU CAN'T PUT SUBS WHERE THERE IS NO VIDEO!!!!!! If you want to pad out and create borders that's fine but on a 16x10 monitor the subs will be cut off.

4. SUB formats the have or take control are unmovable. The positional information is a part of the format. These formats are Sub Station Alpha, Vobsub, DVD and DVB.

5. There is no push for this change by the VLC team as this topic has come around before. If you wait for this feature will probably be a very long time. If you must have this feature, the source code is available. Just download it and dig in.

jech
Blank Cone
Blank Cone
Posts: 41
Joined: 19 Feb 2005 13:46

Postby jech » 28 Jan 2007 14:28

1. on a 16x10 monitor it wouldn't look like that.
It will. I built a computer with 16:10 monitor for my friend, so I know it. Btw. this is a real screenshot from ffdshow set to 16:10 AR. If you ever came to Czech Republic I can show you it :wink:
2. MPlayer, VirtualDub, Avisynth does NOT support subtitles that are out of or off the video area. MPC and vsfilter make an attempt that leaves one line of text in the video area and one line of text out of the video area in two lines of text and the player is resized according to the new dimensions with no options for movable subs. This answer is not satisfactory. Nor will it satisfy people that own a 16x10 monitor that want the video to take up the whole height and there is not enough room to display any text that would be readable in the remaining area.
What do you think a commandline option in MPlayer -vf expand=720:::1:4/3 is good for? Letterboxing? Right!

Have you ever tried resize filter in VirtualDub? And have you seen the expand option?

Image

And how the result looks like?

Image

And now AviSynth:

Code: Select all

AviSource("Forrest Gump CD2.avi") AddBorders(0,64,0,64) Subtitle("Here is a text",x=220,y=320,first_frame=100,last_frame=1000,size=40) Subtitle("Here is a second line",x=160,y=360,first_frame=100,last_frame=1000,size=40)
And here is the result:

Image

VSFilter and ffdshow work analogically. You can place the subtitles whereever you want them, just try it. I think you had an absolutely wrong idea on how positioning of subtitles works. The AviSynth script shows it very well IMHO. First append black borders to become part of video, the place subtitles wherever you want them. It's that easy.
3. The newer standards for HD video are 1.78:1 and for 16x9 enhanced it's 2.37:1 the latter standard, I'm finding to be quite annoying on some 16x10 TVs as the people are NOT the right size. But setting this aside, in general, YOU CAN'T PUT SUBS WHERE THERE IS NO VIDEO!!!!!! If you want to pad out and create borders that's fine but on a 16x10 monitor the subs will be cut off.
As I just said, you don't have to put subtitles where there is no video. Just expand the video before drawing subtitles. And no, the subtitles won't be cropped. Do you see any cropped subtitles on my 16:10 screenshots?
4. SUB formats the have or take control are unmovable. The positional information is a part of the format. These formats are Sub Station Alpha, Vobsub, DVD and DVB.
Strange that some standalone players can move them. I know that the position is a part of the subtitle stream, but who forces you to obey it?
5. There is no push for this change by the VLC team as this topic has come around before. If you wait for this feature will probably be a very long time. If you must have this feature, the source code is available. Just download it and dig in.


As I said before I'm afraid my programming knowledge is not good enough to do it without any help. But if you tell me which part of the code is the crop filter in VLC, I'll try to write a letterbox filter based on it.

Edit: I just noticed one problem: The subtitles are drawn before applying video filters. Could this be changed?
Last edited by jech on 28 Jan 2007 14:47, edited 1 time in total.

dizz
New Cone
New Cone
Posts: 3
Joined: 26 Dec 2006 13:25

Postby dizz » 28 Jan 2007 14:47

But setting this aside, in general, YOU CAN'T PUT SUBS WHERE THERE IS NO VIDEO!!!!!!
This statement is now very clear indeed. However as jech wrote...
The other players do it just like explained it in my previous post. First they the black borders to match screen aspect ratio and so the black bars become part of the video. Then it is possible to place subtitles anywhere.

BSPlayer adds the borders in fullscreen only, while other players can do it even in windowed mode.
... other player apparently use some sort of feature to create additional video areas. Like jech I am not a programmer (at least not on a regular basis), however I can help with ideas. I can imagine that it wouldn't be that difficult to create a black colored video area which size matches the screen size and afterwards have an overlay with the actual video. In that case the subs could be placed anywhere on the screen.
If you want to pad out and create borders that's fine but on a 16x10 monitor the subs will be cut off.
As I wrote before this is not the case when people can position the subs anywhere they want. In the option I describe above or in the option describe by jech the position of the subs would be up to the user to decide. So no cutting of...
There is no push for this change by the VLC team as this topic has come around before.
Why is there no push, especially if the topic has come around before. Apparently there are quite a few users who like to see this implemented. The argument that there is no push for change because the topic has come around before doesn't make sense to me.

Now that it is clear (at least to me) what the problem is with subtitle positioning outside the video area and some options to resolve this have been discussed, the only question that remains is:
Why is this feature not going to be implemented and why is there no push for change by the VLC team?

Alexsource
Cone that earned his stripes
Cone that earned his stripes
Posts: 102
Joined: 22 Nov 2006 15:45

Postby Alexsource » 28 Jan 2007 17:20

3. The newer standards for HD video are 1.78:1 and for 16x9 enhanced it's 2.37:1 the latter standard, I'm finding to be quite annoying on some 16x10 TVs as the people are NOT the right size. But setting this aside, in general, YOU CAN'T PUT SUBS WHERE THERE IS NO VIDEO!!!!!! If you want to pad out and create borders that's fine but on a 16x10 monitor the subs will be cut off.
As I just said, you don't have to put subtitles where there is no video. Just expand the video before drawing subtitles. And no, the subtitles won't be cropped. Do you see any cropped subtitles on my 16:10 screenshots?
It may be so, but he meant full screen. Your capture is a window.
AND there is part of a line over the frame. Plus, virtualdubmod is not exactly a player.

Even tough, you made a couple good points, like the mplayer option. I heard it works better than what was before, were you had to enter the pixels (or something along the lines) yourself, and would lead to screwups in some movies, because not all movies are the same resolution.

The problem exactly IS that the subtitles are drawed before the filters.
As a matter of fact, vlc has some sort of "expanding" option (kinda like the option in vdub), but it won't let you move subtitles into the expanded area, because as you said, they're drawed before the filter is applied.

I'm also pretty sure that's what DJ meant when he said that it would need "code rewrites" for it to work.

jech
Blank Cone
Blank Cone
Posts: 41
Joined: 19 Feb 2005 13:46

Postby jech » 28 Jan 2007 20:33

The screenshots are from VD, because it's easy to take them. But it looks the same in any DirectShow player and even in fullscreen. There is no difference.

Just one more thing concerning DVD subtitles. As you can see, MPlayer can letterbox even DVDs (like all standalone players do it). The subtitles are not in a good position, but better then in VLC anyway.

Compare these 2 screenshots of the same DVD in VLC and MPlayer:

Image

Image

Alexsource
Cone that earned his stripes
Cone that earned his stripes
Posts: 102
Joined: 22 Nov 2006 15:45

Postby Alexsource » 28 Jan 2007 23:51

Yes, that's because the subtitle engine of videolan itself is still far from complete, and it specially needs work with some formats like SSA, dvd subtitles, DVB, etc. I guess DJ can explain better why there's so much difference between the both screenshots. Something to do with missing info about the correct size of the subpictures.

As you can see, there's a lot of work to do with videolan subtitle wise, and some of the problems are not easy to solve.

jech
Blank Cone
Blank Cone
Posts: 41
Joined: 19 Feb 2005 13:46

Postby jech » 17 May 2007 04:19

We might see some improvements after this year's summer - http://code.google.com/soc/videolan/app ... B6694A9B53

RoLex
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Apr 2007 14:45
Operating System: Windows
Location: Sweden
Contact:

Postby RoLex » 24 May 2007 01:11

Well, if you can't place subtitles on the black area (outside the picture), is it then possible to create some kind of background shape where they are going to appear? Like they do on TV, black shapes and white text over it? Would be very nice, since it becomes hell reading them on lighted areas.

Sorry if I'm completely out of this and flying, don't know much of the possibilities. :)

(.srt/.sub files)

Thank you.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 24 May 2007 10:36

I cant help myself from asking the stupid question! Wal-Mart is in the process of closing out ALL 4x3 TVs. Sears has already done it. There are NO more manufactures of 4x3 TVs. Everything that is current 16x10. The prices are falling on all LCD and Plasma displays. For example a 42" Plasma TV during the Holidays was on average $1400.00 with 42" LCDs a bit less. Today that same TV are on average about $950.00 and will probably drop to to a low in September of about $500.00 before rebounding for the Holidays. In general the price of goods here has doubled in the past three years making this a $250.00 TV today to equal the buying power of 3 years ago. Given there is no longer a reason for the request being made here and everyone wants a nice new flat screen TV that lasts 7 to 10 years there is no longer a reason for the request. Right?

It seems that only the die hard hold outs that enjoy black borders and refuse to give up their 4x3 TVs will still want this feature. Given the amount of work to rewrite the program and the lack of manpower here it seems unlikely this feature will ever be a reality, unless someone contributes the changes and the VLC team agrees to use the changes.

The source code is available to everyone and updates, revisions, changes and / or patches are always welcomed here. This feature would need to be optional given the newer style TVs and this makes the issue a bit more difficult.

BTW I did knowingly talk about TVs and not computer monitors because most of the new TVs coming in can double as a computer monitor and most all of the new dedicated computer monitors are also 16x10.

Alexsource
Cone that earned his stripes
Cone that earned his stripes
Posts: 102
Joined: 22 Nov 2006 15:45

Postby Alexsource » 26 May 2007 17:43

Yeah, well some of us are not buying any of that untill they're current setup breaks down. :wink: I do understand the difficulties, and rather see other improvements in the subtitle engine before the positioning comes round.

Anyway... This makes me wonder how this new tvs/stand-alone players will handle older 4:3 stuff. Links, anyone?

InfernoSoul
Blank Cone
Blank Cone
Posts: 12
Joined: 05 Aug 2006 21:24
VLC version: 0.8.6c
Operating System: Mac OSX 10.4.10
Location: North Platte, NE
Contact:

Postby InfernoSoul » 28 May 2007 20:51

I cant help myself from asking the stupid question! Wal-Mart is in the process of closing out ALL 4x3 TVs. Sears has already done it. There are NO more manufactures of 4x3 TVs. Everything that is current 16x10. The prices are falling on all LCD and Plasma displays. For example a 42" Plasma TV during the Holidays was on average $1400.00 with 42" LCDs a bit less. Today that same TV are on average about $950.00 and will probably drop to to a low in September of about $500.00 before rebounding for the Holidays. In general the price of goods here has doubled in the past three years making this a $250.00 TV today to equal the buying power of 3 years ago. Given there is no longer a reason for the request being made here and everyone wants a nice new flat screen TV that lasts 7 to 10 years there is no longer a reason for the request. Right?

It seems that only the die hard hold outs that enjoy black borders and refuse to give up their 4x3 TVs will still want this feature. Given the amount of work to rewrite the program and the lack of manpower here it seems unlikely this feature will ever be a reality, unless someone contributes the changes and the VLC team agrees to use the changes.

The source code is available to everyone and updates, revisions, changes and / or patches are always welcomed here. This feature would need to be optional given the newer style TVs and this makes the issue a bit more difficult.

BTW I did knowingly talk about TVs and not computer monitors because most of the new TVs coming in can double as a computer monitor and most all of the new dedicated computer monitors are also 16x10.

Black borders? Are you talking about movies that are letter boxed? Not all movies are shot specificly for 16:9 or 16:10(which fills the entire screen). You will still have back borders either way even on Blu Ray's and HD DVD's. Some movies are just shot wider then what your monitor can display. That is just the way the directors choose to shoot the movie. There are so many different aspect ratios.

DJ
Cone Master
Cone Master
Posts: 8206
Joined: 01 Jan 2006 04:30
Location: Koloa, Hawaii USA

Postby DJ » 28 May 2007 22:13

Sorry, I'm not aware of a professional film format in use today that is 4x3 as this was created for Television. Also any of the professional HD Cameras currently in the market place (that I'm aware of) do not do 4x3.

Also displaying a 4x3 picture on a 16x10 monitor would leave you with back borders on the sides, unless the top and bottom of the picture were to be cropped so that the aspect ratio could be maintained to fill the screen.

All of this still leaves subtitles within the picture. Unless of coarse you are Japanese or Chinese and want subs on the side of the picture. But considering these borders are NOT real either, only further complicates the matter. :P

jech
Blank Cone
Blank Cone
Posts: 41
Joined: 19 Feb 2005 13:46

Re: Positioning subtitles below the movie

Postby jech » 11 Aug 2007 05:40

Alexsource
It is IMHO quite clearly explained in the thread I started at Doom9 and which I already linked here. Standalone players are usually a piece of crap. The only part where they overcome all computer players is support for different TV AR and subtitles on DVD.

DJ
You're right. Almost all TV's are now 16:9. Bu at the same time almost all movies are 2.35:1. So you still have enough space for subtitles. :wink:

When I asked for this feature I thought it would be easy to implement. But I didn't know that the subtitles are rendered and "burned" into the picture before it is forwarded to video filters. I have one idea, but it might be completely wrong: Would it be possible/difficult to move subtitle rendering after filters processing? Then it should be quite easy to add a letterbox video filter and everything would work fine.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 29 guests