Git Product home page Git Product logo

Comments (11)

n00kii avatar n00kii commented on August 17, 2024 1

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.

n00kii avatar n00kii commented on August 17, 2024

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.

Dr-42 avatar Dr-42 commented on August 17, 2024

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.

n00kii avatar n00kii commented on August 17, 2024

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.

Dr-42 avatar Dr-42 commented on August 17, 2024

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.

n00kii avatar n00kii commented on August 17, 2024

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.

Dr-42 avatar Dr-42 commented on August 17, 2024

Sir you are an absolute legend. Thank you so much. It works!!!.

from egui-video.

Dr-42 avatar Dr-42 commented on August 17, 2024

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.

Dr-42 avatar Dr-42 commented on August 17, 2024

#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.

n00kii avatar n00kii commented on August 17, 2024

thank you, i added a couple changes and merged that, gonna merge this one in now!

from egui-video.

Dr-42 avatar Dr-42 commented on August 17, 2024

That is pretty neat. Thank you. Push the new version to crates.io wen you can.

from egui-video.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.