[Open source] Video clips and players based on ffmpeg and libvlc

[Open source] Video clips and players based on ffmpeg and libvlc

When I was researching before, I wrote a simple VLC-based video player. Later, due to various projects, sometimes for the convenience of testing, and other reasons, some functions were added one after another. Now, functions such as video playback, video acceleration and deceleration, video cutting, and video merging (increasing) are integrated. Sometimes when watching videos downloaded from the Internet, you can watch and deal with the advertisements before and after the video. I feel that it is still usable, so I want to open source it. It is hoped that it can promote its further rich functions, and finally realize a simple and sufficient video editing software.

Program framework

First screenshot of the previous program

Basically, its playback function is based on VLC, and its editing function is based on FFmpeg. The current function is relatively simple. Of course, my purpose is not to make a complicated video editor. It is a professional software thing, just want to do A simple and easy-to-use editing tool. The overall framework is shown in the following figure:

Introduction to source code

project

The program is currently developed using VS2013, and a QT project is created through Qt VS Addin, and the interface is written based on QT5. In the future, it will be changed to the QtCreator project in order to facilitate porting to the linux platform.

The main logic is: QT draws the interface, interacts with the user, and realizes local file playback by calling libvlc. Set the clipping parameters in the appropriate place, and then realize the video file clipping through FFMPEG. After completion, feedback to the QT interface.

Similar to the normal player, the program supports the shortcut keys of left "<-", right "->" to fast forward and backward the video, and can also be used with Ctrl and Shift keys.

code directory

Development Plan

  • The development tool is switched from VS2013 to QtCreator
  • In the file playback part, the current call libvlc is changed to be decoded by FFMPEG, and then rendered and played.
  • Clip operation, call the FFMPEG program by the process, and change it through the FFMPEG API method
  • Add video file merging and format conversion
  • interface improvements

Source address

https://github.com/hbstream/hb-cut-player

Interested friends can take a look. It is still relatively elementary and will be updated slowly. Welcome to submit suggestions and codes.


haibindev.cnblogs.com, please contact QQ for cooperation. (Please indicate the author and source for reprinting~)


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326061901&siteId=291194637