VLC 1.2.0 features: part 1, video output

5 June 2011

Introduction

As promised in my last major post, I will try to discuss about features that are getting shaped for VLC 1.2.0.

This post is therefore the first of the series.

Be careful, this post is a bit technical.

tl;dr version: VLC 1.2.0 will be awesome, faster and have better display quality.

Video Output Rework

When I joined the VideoLAN project and the VLC development team, something like 5 years ago, people were already speaking about the Video Output rework.

This Arlésienne was, to me, a bit like our DNF.

However, during the development of VLC 1.1, VLC guru Laurent Aimar, aka ‘fenrir’ started to work on it. The VLC 1.1.x series has had part of this work in it, but most of the nice features were hidden to the users.

Vout Rework features

VLC 1.2.0 has seen enormous amount of work to go on this project and this work is almost finished.

This means:

  1. Most of the Video Outputs have been rewritten in a way or another, and their priority revised;
  2. Other Video Outputs were just dropped, like gapi, omapfb, hd1000v;
  3. OpenGL output has now got shaders to do YUV->RGB conversions in the GPU,
  4. Most video filters were ported to the new API, and most of them should be transcodable and streamable now.

New features

But this also means new features, like:

  1. Sharper subtitles rendering,
  2. New Video Outputs were written, notably for Direct2D, for iOS and Android,
  3. Important changes for the deinterlacers,
  4. New filter for debanding videos,
  5. New filter for anti-flickering of videos,
  6. New posterize and sepia filters for more fun.

I would like to speak about 2 of those features, in the following parts of this post.

Subtitles rendering in VLC

Definitions

  • What we call source size is the original size in pixels of the video in the file. It is often what people call video definition, like 480x640, 576x720, 720x1280, 1080x1920.

  • What we call window size is the display size in pixels of the video in the file. It is often what people call window resolution. It depends on the size of your VLC window, whether you resize it or not or if you are in full-screen mode or not.

  • What we call text OSD are text subtitles and OSD were the text is rendered on the screen. Using a renderer, like Freetype, it converts the text into an image.

  • What we call blending of 2 images, if what people would call merging.

How does VLC display subtitles

Those days, to display subtitles, we have the following steps:

  1. the text OSD is rendered to the source size,
  2. the rendered OSD is blended into the source image,
  3. the resulting image is passed to the video output, that scales to the window size and does it usually in your hardware GPU.

As you can imagine, if your source is 640x480 and your monitor is full HD, the text will be badly scaled.

However, doing this that way is better for your resources, because the most costly operation (scaling) is done in your hardware.

How will VLC display subtitles

But those days, with very powerful GPUs, can’t we do differently?

Yes, we can. Using Direct3D or OpenGL.

To display subtitles, we will have the following steps:

  1. the text OSD is rendered to the window size,
  2. the rendered OSD passed to the video output in a texture,
  3. the source image is passed to the video output in a texture,
  4. the video output scales the source texture from source size to window size,
  5. the video output blends both textures.

You can see quickly that the new way is sharper (you might need to click on the images) VLC 1.1 Subtitle display VLC 1.2 Subtitle display

Before people scream, yes, it isn’t exactly the same frame which is why the colors are different and yes, white on white isn’t very readable. But this is beyond the point. The point is the difference in sharpness. I’ll do better screenshots, when I got time (never :D).

Compatible Video Outputs

At the time of this writing, the video outputs that can do this blending are:

  • Direct3D, default on Vista and 7
  • OpenGL,
  • x11.

However, notable video outputs like DirectDraw and Xv are not able to work in this mode.

Deinterlacers

In addition to this work, an important amount of work was done on the VLC deinterlacers by Juha.

Notably, he has written new deinterlacer modes, fixed bugs, cleaned the code and written an impressive documentation.

The most notable parts of the work include:

  • a complete InVerse TeleCine deinterlacer, very useful for old NTSC anime,
  • a framerate doubling CRT TV simulator mode, named Phosphor.

And all of them are properly documented on our .

Moreover, as previously told, all modes of deinterlacing should be transcodable or streamable.

Thanks for the support. To be continued…

Read: Update of this article

Jean-Baptiste Kempf

Comments

  1. On 25 May 25250, 5:26 by airp13

    I can’t explain it by comment. Can i upload a picture, please.

  2. On 9 May 9090, 1:31 by Jack

    Hi,I am a fun of Vlc but the last update version 1.1.10 has disappointed me,it is not robust and crashes when it encounters scratches on the Vcd,I send the bug report.ALSO why can’t vlc auto detect media type whether it is vcd,dvd or cd without manual selection the way other players do?Thank you

  3. On 2 May 2020, 8:52 by H4CK3R

    When will it release?
    Whats the official release date?
    Is it fixed or not?
    Thanks, and reply please.

  4. On 28 May 28280, 5:42 by H4CK3R

    Thanks for the quick reply.
    Keep up the great work….

  5. On 28 May 28280, 2:15 by Jean-Baptiste Kempf

    Fontcache is already fixed in 1.1.10

  6. On 28 May 28280, 11:44 by H4CK3R

    Hello,
    I am a user and a big fan of vlc.
    I want to know something,
    Its for windows na?, and when it will get released, i want to use it asap.
    And, what is font-cache rebuild, it takes a long time, is it fixed in this version?
    Please reply.

  7. On 16 May 16160, 1:39 by Jean-Baptiste Kempf

    @neonp: direct2D source. However, D2D only supports RGB, not YUV, so it isn’t a nice fit for Video.

  8. On 16 May 16160, 11:38 by neonp

    Hi,

    I have just found your post after having started to code a Direct3D interface in WPF. Is there any chance to get the source of the Direct2D vout module so that I can take inspiration from it to do it in WPF ?

    Thanks,
    Nicolas

  9. On 15 May 15150, 2:23 by Advarryvoxror

    I just book marked your blog on Digg and StumbleUpon.I enjoy reading your commentaries.

  10. On 8 May 8080, 4:54 by Ken

    will 1.2 support GPU acceleration transcoding?

  11. On 7 May 7070, 10:47 by Jean-Baptiste Kempf

    @TU: many developers? Last time I checked the number of developers was holding on one hand. We have a new sharpen and a new debanding algorithm in VLC.

  12. On 7 May 7070, 12:37 by TU

    will one of the many windows developers please consider helping out the core VLC devs ASAP and make the 1.1. or 1.2 branch auto tuning of DVB USB sticks work and save their channel info to a default that can be picked up next runtime please ?

    currently setting tune of zero on windows does not work here in windows XPSP3 , but works fine in Linux OC, and i and many others have waited a very long time for some win dev to try and improve these windows DVB-T tuner problems, please make the time and help out ASAP if you can.

    also if a 3rd party dev or two could find their way to also port to vlc 1.1/1.2 a working and tested msharpen and Mplayer hqn3d filter for streaming and cleaning up crap low bit-rate DivX and related encodes please do so as the limited time of the core VLC devs dont have the time for these visual quality streaming niceties

  13. On 7 May 7070, 10:17 by svetlisashkov

    @Jean-Baptiste Kempf: Good to hear that! Keep up the good work!

  14. On 7 May 7070, 9:46 by Jean-Baptiste Kempf

    @svetlisashkov: see above comment

  15. On 7 May 7070, 9:46 by svetlisashkov

    I would like to know will this new version of VLC be able to display the subtitles in the black part of the letterbox, e.g. when witching widescreen movie on display with different aspect? Another much needed feature (at least for me) is the possibility to remember the playlist from the last launch of VLC,

  16. On 7 May 7070, 9:45 by Jean-Baptiste Kempf

    @maglev45: we are working on that too.

    @2v1l: already there since a long time. Use the ‘o’ key.

  17. On 7 May 7070, 9:24 by 2v1l

    can you add a zoom feature cause i want to be able to zoom in the video not resize the window

  18. On 7 May 7070, 8:22 by maglev45

    also we need to show subs on black border under the movie

  19. On 6 May 6060, 8:10 by Jean-Baptiste Kempf

    @VLC4Ever: post-processing on the GPU, I doubt it. But we are working D3D shaders those days to do some filtering in the GPU.
    Moreover, we have a student that will work on Assembly Optimization for the video filters during the summer.

  20. On 6 May 6060, 6:33 by VLC4Ever

    what about doing post processing in the GPU like media player classic, and add more feature to enhance video quality, there is also something else that i will not call it a problem but it’s pretty annoing, when having 10 instance of vlc opened and paused (video) there still a big amount of cpu used let’s say 3% each process plus a big use of gpu which cause a temperature hit in my laptop

  21. On 5 May 5050, 10:04 by Jean-Baptiste Kempf

    @Runo: well, yes, this might be possible with this rework.

    @Yohan: if your computer is on Windows XP and has Direct3D support, it should work just fine with the D3D module. If it doesn’t, then just use the old DirectX module, that is unchanged from VLC 1.1.x

  22. On 5 May 5050, 9:22 by Yohan

    Hi !
    I’m very happy to see the “mintyness” of this French App ! Cocorico !

    But I’m wondering something: I use a very old and low power laptop (2004 with intel pentium with discrete graphic card), do the new subtitles rendering in VLC will use more CPU power than previous version of VLC ? Because this is one of the most popular feature/ability (for me and many others) is its very low CPU footprint !
    What do you think ?

  23. On 5 May 5050, 8:52 by Runo

    What I’d like to see somewhen and what seems to maybe be possible (to my unknowing mind) with the current method of subtitle rendering would be to be able to display the subtitles in the black part of the letterbox - there you always have good contrast, you don’t disturb the image, and with all the very widescreen movies the space is unused on most screens anyways.

    Yet if you plan to implement this or not, VLC is already hands-down the best (cross-plattform) AV-Player bar none, commercial or free. And that says something. Kudos and thanks to all you developers!

  24. On 5 May 5050, 7:31 by Jean-Baptiste Kempf

    @airp13: sorry, I don’t understand you. File a bugreport.

    @Slobo: thanks.

    @Trilly: we are adding multi-threading decoding to VLC 1.2 too… But that is for another post.

  25. On 5 May 5050, 7:07 by Trilly

    Hy and congratulations for your job! you are very great!

    I’d like if VLC can playback good and smoothly (without jumpiness or pixelated effects) the HD content: AVC h264 1080i50, 1080p25…on my Vista32 SP2 + platform upgrade, GeForce8800GT driver 266.58 (DXVA2) VLC’s GPU accel enabled. Interlaced content: bad playback with linear and yadif too! and jumpiness and pixelated effects in my TS files from DVB-T. But…the same files on the same machnine playback fine with divxplusplayer and powerdvd, so I think that this is not due to my (old??) PC. And please can you add the support for download smooth streaming content (A/V files chunked) in the future, here an example:
    http://www.rai.tv/dl/replaytv/repla…
    (not commercials at the beginning), this is very very hard, because I cannot find the \Menifest url. perhaps a good script in the folder Lua…Thanks a lot in advance. Best regards.

  26. On 5 May 5050, 7:00 by Slobo

    Subtitles look awesome… thanks for making my favorite program ever better. BTW i use it for music and movies :)

  27. On 5 May 5050, 5:51 by airp13

    Please add the ‘Add Picture’ in Media Information menu.