Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
da01c68
First commit
Elly2018 May 2, 2026
1736031
Update engine scripts blank and update readme
Elly2018 May 2, 2026
a250789
Updated build scripts
Elly2018 May 2, 2026
4398b0a
update
Elly2018 May 2, 2026
6413781
Update gitignore
Elly2018 May 2, 2026
882bba1
Update window build script, targeting visual studio 17 2022, prevent …
Elly2018 May 2, 2026
a35b67b
Update window build script
Elly2018 May 2, 2026
1582993
Update unity version in read me
Elly2018 May 3, 2026
4b11136
update
Elly2018 May 3, 2026
16b2183
Update
Elly2018 May 3, 2026
192dcc1
Update gitignore
Elly2018 May 3, 2026
634d6ae
Update, added echo, and remove example addon folder
Elly2018 May 3, 2026
8a805bf
Added imgui in the src native folder
Elly2018 May 3, 2026
24ea2b6
Remove dll from unity example folder
Elly2018 May 3, 2026
a63e54a
Added unity native script
Elly2018 May 3, 2026
b872b92
Update cmake
Elly2018 May 3, 2026
16adba9
Update cmake issue for unity build
Elly2018 May 3, 2026
6cdd48a
Update sample scene in example unity project
Elly2018 May 3, 2026
1e75c27
Update unity example build script
Elly2018 May 3, 2026
d86718d
Update a bit of hwaccel
Elly2018 May 4, 2026
207e01a
Update hwaccel part
Elly2018 May 4, 2026
1d508b7
Update
Elly2018 May 4, 2026
3ddcbae
Update hwaccel code
Elly2018 May 4, 2026
ccd0f46
SwsContext variable buffer
Elly2018 May 4, 2026
8f7829d
Optimization for playback swr decode process
Elly2018 May 4, 2026
37e24a2
Op;timizaed the sws context
Elly2018 May 4, 2026
4255b34
Update the default example media url
Elly2018 May 4, 2026
4e36cb6
update
Elly2018 May 4, 2026
2863c8a
Trying to add bench mark
Elly2018 May 4, 2026
154b849
Update utility function
Elly2018 May 5, 2026
a585e7a
Update comments
Elly2018 May 5, 2026
bbfdc94
Update encoder utility global function
Elly2018 May 5, 2026
2f1aabb
Fixed the definition issue
Elly2018 May 8, 2026
7b85997
Update project property
Elly2018 May 8, 2026
cdf40f9
Added slider
Elly2018 May 8, 2026
b568c3b
Update progress bar
Elly2018 May 8, 2026
7efbf9c
Added timecode support
Elly2018 May 8, 2026
18f1171
Fixed a bit of player issue in godot
Elly2018 May 8, 2026
3c78ab3
Fixed some bug
Elly2018 May 8, 2026
6239c28
Trying to figure out the gpu to gpu way
Elly2018 May 8, 2026
7b50330
Update hw decoder
Elly2018 May 9, 2026
f59ea02
Format a file
Elly2018 May 9, 2026
bd239da
...
Elly2018 May 9, 2026
cceb6f0
Software decoder in ffmpeg
Elly2018 May 9, 2026
b870dd6
Added example video getter
Elly2018 May 9, 2026
039c091
Update shader issue
Elly2018 May 9, 2026
afde7f6
Remove deffered call issue
Elly2018 May 9, 2026
66db7b2
Update
Elly2018 May 9, 2026
9e8ede7
Update export in godot example
Elly2018 May 9, 2026
a090ae8
Update
Elly2018 May 9, 2026
b65eec7
...
Elly2018 May 10, 2026
0677a3f
Added opaque in AVCodecContext
Elly2018 May 10, 2026
8f68526
Added cuda filter map
Elly2018 May 10, 2026
03fa67a
Added npp into the project
Elly2018 May 12, 2026
b70aaad
Added shader library in godot example
Elly2018 May 12, 2026
6c205c4
Fixed decoder init issue
Elly2018 May 13, 2026
8e09d75
Update decoder details
Elly2018 May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 26 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,28 @@
*.os
*.vs

# Solutions
NativeExtensionTemplate-build/
GDExtensionTemplate-build/
UnityExtensionTemplate-build/
UnrealExtensionTemplate-build/
example/Godot/Resource/*.mp4

build_godot_linux_amd64/
# Solutions
build_**/
reference
src/ffmpeg/
src/ffmpeg*/
src/npp/
src/npp*/
example/Godot/addons/videoplayer/lib/Linux-AMD64/*.so
example/Godot/addons/videoplayer/lib/Windows-AMD64/*.dll

src/lib/ffmpeg.zip
src/lib/ffmpeg.tar.xz
src/lib/ffmpeg-linux64/
src/lib/ffmpeg-win64/
example/Unity/Assets/EllyVideoPlayer/Plugin/Linux-AMD64/*.so
example/Unity/Assets/EllyVideoPlayer/Plugin/Windows-AMD64/*.dll

src/ffmpeg.zip
src/ffmpeg.tar.xz
src/ffmpeg-linux64/
src/ffmpeg-win64/
src/Makefile
src/platform.txt
src/NativeRenderingPlugin
src/NativeRenderingPlugin/

# SConstruct
.sconf_temp
Expand All @@ -36,11 +41,19 @@ libs/
VideoPlayer.dir/

# Extension
src/unity-native/
FFmpeg/
godot-cpp
godot-cpp/

# Editors
.vscode/
.idea
/SDL-main
/SDL-main

cmake_install.cmake
install_local_manifest.txt
install_manifest.txt

src/cmake_install.cmake
src/install_local_manifest.txt
src/install_manifest.txt
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 17)


if (NOT EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "" FORCE)
Expand Down Expand Up @@ -110,8 +109,8 @@ set( BUILD_OUTPUT_DIR "${PROJECT_BINARY_DIR}/${PROJECT_NAME}/" )

set_target_properties( ${PROJECT_NAME}
PROPERTIES
CXX_VISIBILITY_PRESET hidden
VISIBILITY_INLINES_HIDDEN true
CXX_VISIBILITY_PRESET default
VISIBILITY_INLINES_HIDDEN false
RUNTIME_OUTPUT_DIRECTORY "${BUILD_OUTPUT_DIR}/${LIB_DIR}"
LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_DIR}/${LIB_DIR}"
)
Expand Down Expand Up @@ -140,7 +139,7 @@ if(POLICY CMP0177)
cmake_policy(SET CMP0177 NEW)
endif()

add_subdirectory( templates )


# ccache
# Turns on ccache if found
Expand All @@ -152,6 +151,7 @@ include( ClangFormat )

# godot-cpp
if( "${Engine}" STREQUAL "Godot" )
add_subdirectory( templates )
# From here: https://github.com/godotengine/godot-cpp
if ( NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/godot-cpp/Makefile" )
message(
Expand Down
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# elly-videoplayer

A general video player for godot 4.x, unity, unreal to play video, this is a wrapper of ffmpeg for decode
A general video player for godot 4.x, unity, unreal to play video, this is a wrapper of ffmpeg

Below example use godot engine import gdextension for video player
I want a agnostic video player for different kinds of game engine, it's like VLC but with more heavy-duty video feed
Such as live-streaming or high quality video with custom decoder selection etc...

I also want to include the encoder and transcoder part of the feature into the extension,
This will make multimedia in game engine become so much easier.

My original plan is to make a simple VR video player using Godot game engine, but due to it's policy, not much codec supports right there. It's 3.x era, At the time VLC extension didn't exists yet. Since VLC extension came out at GoDot 4.3, Now this project become general purpose multimeida extension.

[Wiki](https://github.com/Elly2018/Plugin-Videoplayer/wiki)
[Plan](https://github.com/users/Elly2018/projects/12)

Below example use godot engine import gdextension for video player

![v8](img/v8.gif)

|![v5](img/v5.PNG)|![v6](img/v6.PNG)|![v7](img/v7.PNG)|
Expand All @@ -17,31 +25,31 @@ And apply to VR sphere mesh and a viewport texture in front of player

### Repository structure:
- `build/` - All the build scripts in here.
- `Godot/` - the godot project build scripts
- `Unity/` - the unity project build scripts
- `Unreal/` - the unreal engine project build scripts
- I provide scripts here for quick setup and build instructions
- `src/` - Source code of this extension.
- `ffmpeg/` - FFmpeg library.
- `ffmpeg/` - FFmpeg library. Targeting version 8.0
- [Source code download link](https://github.com/BtbN/FFmpeg-Builds/releases/tag/autobuild-2026-02-28-12-59)
- `src/` - Wrapper source code.
- `gd/` - Godot engine
- `ue/` - Unreal engine
- `unity/` - Unity engine
- `native/` - ImGui native engine
- `mobile/` - Mobile source code projects for Android, IOS
- `example/` - The video player implementation
- `Godot/` - the godot video player project
- `Unity/` - the unity video player project
- `Unreal/` - the unreal engine video player project

### Dependencise structure:
- `godot-cpp/` - Submodule needed for GDExtension compilation.

## known issues

- HLS will stuck at buffering sometimes
- hardware acceleration not include
- `godot-cpp/` - Submodule needed for GDExtension compilation.
- `src/ffmpeg/` - The FFmpeg library

### Supported engine

- [x] Godot 4.1+
- [ ] Unity
- [ ] Unreal
- [ ] Unity 2022.3.62f3
- [ ] Unreal 5
- [ ] Native

### Supported platfrom
Expand Down
Loading