Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aliakseis/FFmpegPlayer
Simple FFmpeg video player
https://github.com/aliakseis/FFmpegPlayer
boost d2d direct2d download-videos ffmpeg fft mfc pitch pitch-shifter player python python-cpp simd sse vcpkg video-cutter wasapi youtube youtube-repeater youtube-video
Last synced: about 2 months ago
JSON representation
Simple FFmpeg video player
- Host: GitHub
- URL: https://github.com/aliakseis/FFmpegPlayer
- Owner: aliakseis
- License: mit
- Created: 2015-06-09T15:09:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-07-24T11:16:55.000Z (2 months ago)
- Last Synced: 2024-07-27T11:42:48.026Z (2 months ago)
- Topics: boost, d2d, direct2d, download-videos, ffmpeg, fft, mfc, pitch, pitch-shifter, player, python, python-cpp, simd, sse, vcpkg, video-cutter, wasapi, youtube, youtube-repeater, youtube-video
- Language: C++
- Homepage:
- Size: 8.34 MB
- Stars: 149
- Watchers: 13
- Forks: 44
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FFmpegPlayer
A simple FFmpeg based player. The player core is generic and made with multiplatformity in mind. UI / video / audio layer is MFC/Win32 specific. It turns out that there is no need to use multimedia libraries. There is also a Qt based demo example included. It offers:
- Basic Playback Controls: Play/Pause, Stop.
- Next/Previous Frame: Step through the video one frame at a time during pause.
- Speed Change: Increase or decrease the playback speed without altering the pitch of the audio.
- Separate Video and Audio Inputs: Ability to load and play video and audio from separate sources.
- Audio Track Selection: Choose between different audio tracks if available.
- Fragment Selection for Export: Mark in and out points to select a part of the video for exporting.
- Repeated Playing: Loop the entire video/playlist or selected fragment continuously.
- Subtitles: Load and display subtitle files in various formats.
- Super Resolution: Enhance the resolution of the video using upscaling techniques.
- Codec Support: Compatibility with a wide range of video and audio codecs.
- Streaming Support: Ability to stream video from online sources.[Semi transparent, click through full screen mode introduced.](https://bit.ly/2JLTbQn) It is invokable by holding ctrl+shift while pressing full screen button.
## Getting Started
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
### Prerequisites
- Visual Studio 2017 or higher.
- Intel SDK For OpenCL Applications installation is required for the super resolution functionality intergated.### Installing
Be sure to download git submodules.
To get a development env running:
Install vcpkg from https://github.com/Microsoft/vcpkg.
```
.\vcpkg integrate install
```Install Boost, FFmpeg, OpenCV etc... :
```
vcpkg install boost
vcpkg install ffmpeg[ffmpeg,x264,nonfree,gpl,vpx,webp,zlib,xml2]
...```
YouTube view support using https://github.com/pytube/pytube.git is turned on by default. It can be turned off by commenting define YOUTUBE_EXPERIMENT in YouTuber.cpp.
Python is also needed otherwise:```
vcpkg install python3```
The matching Python version has to be installed and added to the PATH environment variable for the accessory DLLs to be accessible.
It is also possible that Boost::Python stuff will have to be enabled:
```
vcpkg install --featurepackages --recurse boost[python]```
You may need to remove pytube stuff from your profile folder for the player application to set up the latest version, for example, by invoking remove_pytube.cmd.
You can also "patch" Python stuff by creating %LOCALAPPDATA%\git-subst.cfg mapping file that contains, for example,
```
https://github.com/pytube/pytube/archive/master.zip = https://github.com/garywu007/pytube/archive/refs/heads/master.zip
```Sometimes it is needed to visit pytube issues list and apply fixes, for example
- https://github.com/pytube/pytube/issues/1498Take into account https://www.psiphon3.com if you encounter HTTP Error 429.
Just in case: "In fact in boost-python, the default behavior is that even when debug boost libraries are created, these libraries are linked to the release pythonX.dll/lib - by intention, according to the docs." https://github.com/pybind/pybind11/issues/1295
Tiny demos here: https://www.youtube.com/watch?v=dySA4yEGdEc https://www.youtube.com/watch?v=t5iW2ZsEzrA
Tip: hold Ctrl+Shift while submitting File Open dialog to choose a separate audio file. It works for the file opening from the Windows Explorer as well.
Please take into account specific Windows 10 behavior while opening Internet shortcuts: https://community.spiceworks.com/topic/1968971-opening-web-links-downloading-1-item-to-zcrksihu You can avoid this by dragging and dropping them.
Note that the FFmpeg patch speeds up HEVC decoding without GPU support by ~10%:
![image](https://user-images.githubusercontent.com/11851670/171165625-3a111046-672c-4a75-8184-c91fde994e00.png)
### Bonus tip
Playing YouTube videos in browsers may result in poor performance on slow hardware. Assign a keyboard shortcut to the FFmpeg player by editing its shortcut. Hover your mouse over the YouTube link in Firefox and bring up the shortcut. A player pop-up window will appear, starting the video playback. The same can be achieved in Chrome with some tweaking. [Start Chrome with this flag: --force-renderer-accessibility](https://www.chromium.org/developers/design-documents/accessibility/) and / or [set up IAccessible2 COM proxy stub DLL](https://github.com/aliakseis/IAccessible2Proxy).
![redline](https://user-images.githubusercontent.com/11851670/184552270-73cb8ba4-31f7-47f2-9f50-2b4ceae601e7.gif)