Menu

Adding black stripes

2009-11-27
2012-10-29
  • yinon eliraz

    yinon eliraz - 2009-11-27

    Hi,
    I am using DxText do add subtitles to a movie. Some of the movies are in a
    16:9 ratio which makes the subtitles take half of the active screen.
    I would like to use the black stripes that are created from the aspect ratio
    to display the subs there, the problem is that they are not a part of the
    movie.

    How can I make them a part of the movie?

    I started by calculating the movie's height by multipling the width by 0.75
    (to make it in a 640*480 ratio), next I tried to make the overlay bitmap in
    the same size, plus the bitmap that contains the buffer, it didnt work..

    What is the right way to do it?

    Thanks

     
  • Peter_B

    Peter_B - 2009-11-28

    If you show the movie on a form and you make the form the same size as the
    movie,
    you won't get those black areas,
    and you can show the subtitles anywhere you want them.

    Peter

     
  • yinon eliraz

    yinon eliraz - 2009-11-28

    Maybe I wasnt clear- I do want these black stripes, but I want them to be a
    part of the movie and not a part of the owner.

     
  • Peter_B

    Peter_B - 2009-11-28

    As far as I can see you will have to create a new video file with black
    stripes in order to do that. I don't know why you would want that.
    Normally you mix the subtitles into each frame the way you see subtitles on TV
    or in a movie theatre. That's what I do.

    If you want these black areas, you could make a black panel and display the
    subtitles there while you keep the aspect ratio.

    Peter

     
  • yinon eliraz

    yinon eliraz - 2009-11-28

    I want these areas so that the subtitles wont "hide" the movie, some movies
    display at 16:9, adding subtitles on the movie itself will make the actual
    movie area even narrower...
    I am sure there is a way to make these areas a part of the movie, in the
    samplegrabber...

     
  • Peter_B

    Peter_B - 2009-11-29

    I don't understand what you mean by making the black areas part of the movie.
    The black areas appear because the codec keeps the aspect ratio unless you
    tell it not to. Are you by any chance from a country where movies are dubbed,
    not subtitled? Normally subtitles are displayed at the bottom of the screen
    with or without a black background. You use one og two lines of text where the
    font is large enough for you to read it but not so large that it makes the
    movie difficult to see.

    Maybe you are using too large a font size?

    And you'll have to measure the hight of the subtitle in order to place it at
    the bottom of the form.

    Peter

     
  • yinon eliraz

    yinon eliraz - 2009-11-29

    I want to make the movie, currently in 16:9 ratio, in 4:3 ratio, I want to do
    that by adding black areas to the movie, how can I do that?

     
  • Peter_B

    Peter_B - 2009-11-30

    I would make a form with a picture box or a panel. Then I would display the
    video in the client rectangle of that box/panel, keeping the aspect ratio of
    the movie. Then I would place a panel with a black background colour below the
    video rectangle and draw the subtitles on the black panel using
    graphics.drawstring. That would be one way to do it but normallly you mix the
    text into the bitmap.

     

Log in to post a comment.