如何检查 VLC 日志文件
![](/data/attachment/album/202309/11/100519hz58dpd9bdjbbrzd.jpg)



> 
> 解决 VLC 的视频播放问题？以下是检查 VLC 日志文件的方法。
> 
> 
> 


在 VLC 上观看你喜爱的视频时，你可能会遇到与编解码器、时间戳、视频播放等相关的问题。


但好消息是，就像 [检查防火墙的日志](https://learnubuntu.com/check-firewall-logs/) 一样，你可以使用 VLC 执行相同的操作来跟踪错误的根本原因。



> 
> ? 与 Linux 不同，VLC 不会自动保存日志，一旦关闭，所有日志都会自动删除，因此你必须手动保存它们。
> 
> 
> 


因此，请确保在关闭 VLC 播放器之前保存或读取日志文件。


### 检查并保存 VLC 日志文件


虽然听起来很复杂，但这是最简单的方法，它不仅允许你保存日志，还可以让你读取日志而不将其保存到文件中。


首先，从顶部菜单栏转到“<ruby> 工具 <rt>  Tools </rt></ruby>”菜单，然后选择“<ruby> 消息 <rt>  Messages </rt></ruby>”，或者，你也可以按 `Ctrl + M` 达到相同的效果：


![](/data/attachment/album/202309/11/100542noegxxd02302kkke.png)


它将显示与当前播放的视频文件相关的日志。


在这里，你有两种选择：你可以仅读取日志，也可以保存日志。


单击“消息”选项卡后，你会注意到 “<ruby> 冗余 <rt>  Verbosity </rt></ruby>” 选项，因此让我们看一下多个详细程度选项的效果。


* <ruby> 错误 <rt>  Errors </rt></ruby>: 只会记录错误信息
* <ruby> 警告 <rt>  Warnings </rt></ruby>: 它将总结错误和警告消息
* <ruby> 调试 <rt>  Debug </rt></ruby>：此级别将包括错误、警告和调试消息


选择适当的详细程度选项后，你很快就会看到与所选选项相关的日志。


![](/data/attachment/album/202309/11/100542h06bnbf5gg635a4q.png)


正如你所看到的，当我选择 “调试” 选项时，它还包含警告日志。


要保存日志，请点击 “<ruby> 另存为 <rt>  Save as... </rt></ruby>” 按钮，它将打开文件管理器，在这选择保存文件的位置并为其指定适当的名称：


![](/data/attachment/album/202309/11/100543zagkli85dviczd9u.png)


现在，你可以使用任何文本编辑器打开日志文件：


![](/data/attachment/album/202309/11/100544opv7rlzom9m9azd3.png)


从这里，你可以识别导致错误的罪魁祸首。


### 有关 VLC 的更多信息


你是否知道你可以使用 VLC 下载 YouTube 视频或使用 YouTube 链接来流式传输视频而无需广告？


嗯，VLC 能做的远不止这些。如果你有兴趣，请查看我们详细的 [让 VLC 更出色的技巧指南](https://itsfoss.com/simple-vlc-tips/)。


我希望本指南对你有所帮助。


*（题图：MJ/f614be05-cc16-40ef-9b2d-8f7a6864400f）*




---


via: <https://itsfoss.com/vlc-check-log/>


作者：[Sagar Sharma](https://itsfoss.com/author/sagar/) 选题：[lujun9972](https://github.com/lujun9972) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

While watching your favorite videos on VLC, you might encounter issues related to codecs, timestamps, video playback, and a lot more.

But the good news is like you [check the logs of your firewall](https://learnubuntu.com/check-firewall-logs/), you can do the same with VLC to trace the root cause of the error.

So make sure you save or read the log file before closing the VLC player.

## Check and save VLC log files

While it sounds complex, this is the easiest method that not only allows you to save logs but also lets you read them without saving them to a file.

First, go to the `Tools`

menu from the top menubar and select choose `Messages`

, alternatively, you can also press `Ctrl + M`

to save the same effect:

![Go to messages to read logs in VLC](https://itsfoss.com/content/images/2023/08/Go-to-messages-to-read-logs-in-VLC.png)

And it will show logs related to the currently playing video file.

Here, you have two choices: You can either read logs only or you can save them as well.

Once you click on the `Messages`

, you will notice a tab for the **Verbosity** so let's take a look at the effect of multiple verbosity options you have.

`Errors`

: This will only record the error messages only`Warnings`

: It will conclude error and warning messages`Debug`

: This level will include errors, warnings, and debug messages

After choosing the appropriate verbosity option, soon you will see logs related to the chosen option.

![](https://itsfoss.com/content/images/2023/08/Choose-verbosity-to-capture-different-types-of-logs-1.png)

As you can see when I choose the `debug`

option, it also included the warning logs.

To save logs, hit the `Save as...`

button and it will open the file manager, from there, choose where you can to save the file and give it the appropriate name:

![](https://itsfoss.com/content/images/2023/08/Save-VLC-logs-1.png)

And now, you can open the log file using any text editor:

![read saved VLC logs](https://itsfoss.com/content/images/2023/08/Open-VLC-log-file.png)

From here, you can identify the culprit causing errors.

## More on VLC

Did you know that you can download YouTube videos using VLC or use YouTube links to stream videos without ads?

Well, VLC can do a lot more than that. And if you're interested, check out our detailed [guide on tips to make VLC awesome](https://itsfoss.com/simple-vlc-tips/):

[Make VLC More Awesome With These Simple TipsVLC is one of the best open source video players, if not the best. What most people don’t know about it is that it is a lot more than just a video player. You can do a lot of complex tasks like broadcasting live videos, capturing devices etc. Just](https://itsfoss.com/simple-vlc-tips/)![](https://itsfoss.com/content/images/wordpress/2019/12/VLC_TIPS.png)


![](https://itsfoss.com/content/images/wordpress/2019/12/VLC_TIPS.png)

Want to [download VLC subtitles automatically](https://itsfoss.com/download-subtitles-automatically-vlc-media-player-ubuntu/)? Here's how you do it:

[Download Subtitles Automatically With VLC Media PlayerVLC is a versatile media player. One of the lesser known features is the automatic subtitle download. Here’s how to use it.](https://itsfoss.com/download-subtitles-automatically-vlc-media-player-ubuntu/)![](https://itsfoss.com/content/images/2023/05/download-subtitles-automatically-in-vlc.png)


![](https://itsfoss.com/content/images/2023/05/download-subtitles-automatically-in-vlc.png)

I hope you will find this guide helpful.