Solution to the Problem of VLC Chinese subtitle display in Ubuntu

Source: Internet
Author: User
In order to prepare for possible lab internships, we re-installed Ubuntu today, and today's installation is still much smoother. In the playback software, I chose VLC this time, because although mplayer is powerful, the interface is not very friendly. VLC is also very powerful. However, when playing movies in Linux, we often encounter Garbled text. Let's talk about my experience. There may be two possible causes for subtitle garbled characters: 1. GB character decoding: Because Chinese Characters in Linux adopt UTF-8 encoding by default

In order to prepare for possible lab internships, we re-installed Ubuntu today, and today's installation is still much smoother. In the playback software, I chose VLC this time, because although mplayer is powerful, the interface is not very friendly. VLC is also very powerful.

However, when playing movies in Linux, we often encounter Garbled text. Let's talk about my experience.

There may be two possible causes for subtitle garbled characters:

1. Decoding of GB characters:
Because UTF-8 encoding is used for Chinese Characters in Linux by default, garbled characters are generated when decoding GB characters. In addition to converting subtitle files to UTF-8 encoding using gedit, you can also set VLC, the specific method was discussed in the ubuntu Forum. The following is an excerpt:

1. Start VLC, press Ctrl + P, and select all in the lower left corner.

2. Click video-subtitle/OSD-text Renderer and select a Chinese font in the font column on the right. (I chose/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc)

3. Click Next: Input/encoding-Other encoder-select GB18030 for the subtitle text encoding on the right of the subtitle

4. Then remove the hook before the automatic detection UTF-8 subtitle formatting. (This item does not seem to exist in the new version)


2. Reasons for the system font configuration file
This is also a specific problem I encountered. Fortunately, the flash plug-in has encountered the same phenomenon. In another blog, I found a solution to this problem, which is also excerpted as follows:

Input: cd/etc/fonts/conf. d/

For security, back up sudo cp 49-sansserif.conf 49-sansserif.conf_backup.

Enter the following command: sudo gedit./49-sansserif.conf

The content of the file is displayed.

Replace "sans-serif" or "serif" after "1st, 2, and 4" with the names in Chinese fonts supported by your system. Note that the font names are case-sensitive.

For example, if wqy-zenhei.ttf is installed in my system, I replace the above-mentioned field with wqy-zenhei. The result is as follows:



Wqy-zenhei


Wqy-zenhei


Monospace


Wqy-zenhei

OK, the above two problems, that is, the problems I encountered in playing software under Linux, will be introduced together to facilitate friends who may encounter the same problem. In fact, it is the wisdom of others.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.