Comments (11)
alright the baseline parser is complete. the only things that are currently being parsed are style overrides for position, primary text color, and alignment.
unfortunately, i am completely lost for figuring out how to load the style specific info from ffmpeg; either documentation doesnt exist (unlikely) or i just don't know what to search for. we are still missing alot of styling effects, many of which seem impossible to do in egui at the moment, but ill leave that to the future.
please test this out with your videos and let me know if you notice any critical issues
from egui-video.
I'll look into it. I might need to rewrite the streamer trait or figure out a way to read and buffer all the subtitle data at player instantiation.
from egui-video.
I was trying out a crude solution to store the packet that was passed at send packet in the Player struct and tried to render that at the apply frame stage, But since there are no safe bindings to the underlying subtitle data, I was getting only empty strings and null pointers in the rect data. Notify me if you find something helpful.
I was experimenting with mkv videos embedded with ass subtitles.
from egui-video.
hi there! sorry for the delay, first few weeks of semester are hectic.
i swam around in the source code until i found ffmpeg::codec::subtitle::Subtitle
which seems to be what we needed. it seems the API for decoding video and audio frames has been changed/updated from what it was originally was, but the API for decoding subtitles stayed the same (Decoder::decode
). putting that all together i made a very rough implementation for the subtitle support. i only have one video with subtitles to test on, so please checkout the branch subtitles
and see if it works on your videos!
from egui-video.
Yes, the subtitles display for sure. Thanks for putting in the effort. The videos I have been testing with have subtitles in the ass format which need further parsing and also the subtitles display at the middle right of the video. But I think I can look into these issues. I am currently a little bit swamped (I am actually a doctor and not a programmer by profession), But I will look into it and try to fix it. Thank you so much.
from egui-video.
no problem! just skimming the ass spec, i think i might be able to make a very basic parser, though some things like \fn
for selecting font name wont work unless that font has already been loaded into egui. but ill see what i can do for now
from egui-video.
Sir you are an absolute legend. Thank you so much. It works!!!.
from egui-video.
Now all this player requires is a way to switch between various audio and subtitle streams and then it will have all the features I need to replace mpv from my project. Thank you so much for all work.
from egui-video.
#5 : I just create a pull request for stream cycling. Some subtitles are rendering weirdly though after I tested it with a lot of different videos, most of them seem to work fine.
from egui-video.
thank you, i added a couple changes and merged that, gonna merge this one in now!
from egui-video.
That is pretty neat. Thank you. Push the new version to crates.io wen you can.
from egui-video.
Related Issues (4)
- Make elapsed time and duration public HOT 3
- Video and audio desync HOT 1
- compile error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from egui-video.