如何在 VLC 播放器中裁剪视频
VLC 视频
![](/data/attachment/album/202211/11/153202yhomxyc1ysuq57x1.jpg)


VLC 媒体播放器是 [最好的媒体播放器](https://itsfoss.com/video-players-linux/) 之一。这款跨平台播放器功能丰富，可以播放任何可用的媒体格式。


你会惊讶地发现 VLC 不仅仅是一个视频播放器。它可以对你的媒体文件做很多事情。


我们分享过 [使用 VLC 下载 YouTube 视频](https://itsfoss.com/download-youtube-videos-vlc/) 的 [VLC 技巧](https://itsfoss.com/simple-vlc-tips/)。


让我再和你分享一个。用 VLC 裁剪视频怎么样？这不是 [裁剪视频](https://itsfoss.com/video-trimmer/) 的最佳方式，但它可以作为一个选择使用。


### 使用 VLC 裁剪视频


在 VLC 中裁剪视频本质上意味着从所需部分的开头到结尾录制视频。默认情况下，录制控制工具通常在 VLC 面板中不可见。


让我详细介绍一下步骤。


#### 步骤 1：启用高级控件


要获取控件，你需要使其在主控制面板上可见。


首先选择“<ruby> 视图 <rt>  View </rt></ruby>”选项，然后选中“<ruby> 高级控件 <rt>  Advanced Controls </rt></ruby>”复选框。现在，如截图所示，出现了带有几个按钮的新控件行。


![在 vlc 播放器中启用高级控件视图](/data/attachment/album/202211/11/153221gzuxxndmjm6534wd.png)


#### 步骤 2：打开视频


为了裁剪视频，你需要在 VLC 中打开它。你可以通过“<ruby> 媒体 <rt>  Media </rt></ruby> > <ruby> 打开文件 <rt>  Open File </rt></ruby>”在 VLC 播放器中打开视频：


![通过 vlc 文件菜单打开媒体文件](/data/attachment/album/202211/11/153222rmg5t19655zy7tl9.png)


或者你可以使用 Nautilus 文件管理器中的 VLC 打开视频文件：


![使用 nautilus 文件管理器中的 vlc 播放器打开媒体文件](/data/attachment/album/202211/11/153222ojzh0m84j4zhmm2i.png)


#### 步骤 3：使用 VLC 的录制功能裁剪视频


打开视频文件后，将时间线设置为所需输出的起点并暂停视频。之后，按“录制”按钮并播放视频。


![在起点暂停，按录制键开始录制](/data/attachment/album/202211/11/153223by2027h4zkhni3iz.png)


当达到所需输出的终点时，暂停视频并再次按下“录制”按钮停止录制。


![在终点暂停并按下录制](/data/attachment/album/202211/11/153224mjzqe8xzwyk1cwjw.png)


这应该将裁剪后的输出保存到你的 `~/Videos` 目录中。


![nautilus 文件管理器中的原始和裁剪后文件](/data/attachment/album/202211/11/153224r5whm4nvxiizl4yk.png)


### 故障排除：无法识别的输出文件


VLC 以 .ts 文件格式录制视频。这在 VLC 中受支持，你可以根据需要使用它。但是 Ubuntu 中的许多其他播放器，包括本地视频播放器，都无法识别该格式。因此，在这种情况下，有两种解决方案。


#### Gnome-Video 提示安装 GStreamer 包


当你尝试打开文件时，GNOME-Videos 会提示错误并建议安装 Gstreamer 多媒体编解码器。


![转换后的视频在 gnome 视频播放器中显示播放错误](/data/attachment/album/202211/11/153225wa6qyq90yaj0zvoy.png)


你可以点击上图所示的 “<ruby> 在 Ubuntu 软件应用中查找 <rt>  Find in Ubuntu Software </rt></ruby>” 按钮，这将打开 Ubuntu 软件中心。你可以在那里安装所需的编解码器包。


![根据 GNOME 视频播放器的提示从软件中心安装 gstreamer](/data/attachment/album/202211/11/153225abnnub4zz8v46hy4.png)


同样安装 Gnome-videos 并使用它打开视频将解决问题。


#### 使用 VLC 转换视频文件


如果你不想为此安装任何额外的软件包，你可以使用 VLC 本身将 .ts 文件转换为 mp4 格式以在任何其他播放器中播放。


为此，打开 VLC 并在“<ruby> 媒体 <rt>  Media </rt></ruby>”菜单下选择“<ruby> 转换/保存 <rt>  Conver/Save </rt></ruby>”选项。


![从媒体菜单中选择转换](/data/attachment/album/202211/11/153226tguplld7lccz2aup.png)


现在，使用“<ruby> 添加 <rt>  Add </rt></ruby>”按钮提供需要转换的文件的位置，然后选择“<ruby> 转换/保存 <rt>  Conver/Save </rt></ruby>”，如截图所示。


![在媒体转换对话框中选择要转换的文件](/data/attachment/album/202211/11/153226v4y3q41j0joy11w0.png)


选择所需的输出配置（MP4）并为输出设置文件名，然后按“<ruby> 开始 <rt>  Start </rt></ruby>”。


![在 vlc 媒体转换菜单中设置转换配置和输出文件名](/data/attachment/album/202211/11/153227hyaqjaoaaaqr77er.png)


这将开始转换，并根据源的时长决定转换时间。完成后，你可以从 `~/Videos` 目录访问转换后的输出。


![nautilus 文件管理器中的原始裁剪和转换文件](/data/attachment/album/202211/11/153227c73j6dtah883ia0i.png)


### 总结


虽然确实可以使用 VLC 播放器来裁剪视频，但整个过程与专门的 [视频编辑器](https://itsfoss.com/open-source-video-editors/) 完全不同。


最大的问题是你需要观看所有裁剪部分才能完成裁剪，如果你要裁剪跨越数分钟的视频的一大部分，这就不方便了。


无论如何，这个很酷的功能在某些情况下可能是一个方便的工具，比如你想要的只是裁剪一个特定的小剪辑或从电影场景中制作一个 Gif。




---


via: <https://itsfoss.com/vlc-trim-video/>


作者：[Sreenath](https://itsfoss.com/author/sreenath/) 选题：[lkxed](https://github.com/lkxed) 译者：[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)

VLC media player is one of the [best media players](https://itsfoss.com/video-players-linux/) out there. This cross-platform player is feature rich and it can literally play any media format that’s available.

You’ll be surprised to know that VLC is much more than just a video player. It can do a lot of things with your media files.

[Downloading YouTube video with VLC](https://itsfoss.com/download-youtube-videos-vlc/) is one of the [VLC tips](https://itsfoss.com/simple-vlc-tips/) we have shared on It’s FOSS.

Let me share another one with you. How about trimming a video with VLC? It’s not the best way to [trim videos](https://itsfoss.com/video-trimmer/) but it is available as an option.

## Trim videos using VLC

Trimming a video in VLC essentially means recording the video from the beginning to end of the required portion. The recording control tools are usually not visible in the VLC panel by default.

Let me show the steps in detail.

**Step 1: Enable advanced controls**

To get the controls, you need to make it visible on the main control panel.

First select the view option and then check the Advanced controls check box. Now, a new row of controls with a couple of buttons appears as shown in the screenshot.

![enable advanced controls view in vlc player](https://itsfoss.com/content/images/wordpress/2022/11/enable-advanced-controls-view-in-vlc-player.png)

### Step 2: Open the video

In order to trim a video, you need to open it in VLC. You can either open the video in VLC player by Media > Open File:

![open media file through vlc file menu](https://itsfoss.com/content/images/wordpress/2022/11/open-media-file-through-vlc-file-menu.png)

Or you can open the video file with VLC from Nautilus file manager:

![open media file with vlc player from nautilus file manager](https://itsfoss.com/content/images/wordpress/2022/11/open-media-file-with-vlc-player-from-nautilus-file-manager.png)

### Step 3: Trim video using VLC’s recording feature

Once video file is opened, set the timeline to the starting point of the required output and pause the video. After that, press the record button and play the video.

![pause at start point and start record by pressing record button](https://itsfoss.com/content/images/wordpress/2022/11/pause-at-start-point-and-start-record-by-pressing-record-button.png)

When the end point of the required output is reached, pause the video and press the record button again to stop recording.

![pause at end point and press record](https://itsfoss.com/content/images/wordpress/2022/11/pause-at-end-point-and-press-record.png)

This should save the trimmed output to your ~/Videos directory.

![original and trimmed file in nautilus file manager](https://itsfoss.com/content/images/wordpress/2022/11/original-and-trimmed-file-in-nautilus-file-manager.png)

## Troubleshooting: Unrecognized Output File

VLC records the videos in .ts file format. This is supported in VLC, and you can use that as you want. But many other players in Ubuntu, including the native video player doesn’t recognize the format. So, in this case, there are two solutions.

**Gnome-Video prompts Installation of GStreamer package**

When you try to open the file, GNOME-Videos will prompt an error and suggestion to install Gstreamer multimedia codecs.

![converted video shows a play error in gnome video player app](https://itsfoss.com/content/images/wordpress/2022/11/converted-video-shows-a-play-error-in-gnome-video-player-app.png)

You can click on the “Find in Ubuntu Software” button as shown above, which will open ubuntu software center. There you can install the required codec package.

![install gstreamer from software as prompted by the gnome video player](https://itsfoss.com/content/images/wordpress/2022/11/install-gstreamer-from-software-as-prompted-by-the-gnome-video-player.png)

Install the same and open the video with Gnome-videos again will solve the problem.

**Convert the Video file using VLC**

If you don’t want to install any additional packages for the purpose, you can use VLC itself to convert the .ts file to mp4 format to play in any other player.

For this, open VLC and select Convert option under File menu.

![select convert from media menu](https://itsfoss.com/content/images/wordpress/2022/11/select-convert-from-media-menu.png)

Now, provide the location of the file that needs to be converted using the “Add” button and select Convert/Save as shown in the screenshot.

![select file to convert in the media convert dialog box](https://itsfoss.com/content/images/wordpress/2022/11/select-file-to-convert-in-the-media-convert-dialog-box.png)

Select the required output profile (MP4) and set a file name for the output and press Start.

![set conversion profiles and output file name in vlc media convert menu](https://itsfoss.com/content/images/wordpress/2022/11/set-conversion-profiles-and-output-file-name-in-vlc-media-convert-menu.png)

This will start the conversion and will be completed as per the duration of the source. Once done, you can access the converted output from your ~/Videos directory.

![original trimmed and converted file in nautilus file manager](https://itsfoss.com/content/images/wordpress/2022/11/original-trimmed-and-converted-file-in-nautilus-file-manager.png)

## Wrapping Up

While it is true that VLC player can be used to trim videos, the entire process is in no way similar to a dedicated [video editor](https://itsfoss.com/open-source-video-editors/).

The biggest issue is that you need to watch the entire trim portion to complete the trimming, which is not convenient if you are trimming a large portion of a video spanning several minutes.

Anyway, this cool feature can be a handy tool on some occasions, where you only want to trim a small clip or make a gif from a movie scene.