Code Monkey home page Code Monkey logo

Comments (28)

theScrabi avatar theScrabi commented on May 8, 2024 4

We have exoplayer support this all isn't a big problem anymore. Just someone had to link things together :)

from newpipe.

antoninkriz avatar antoninkriz commented on May 8, 2024 2

Here is some help you might need. I am sorry for not working on this issue anymore, but I have a lot of work to do.

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

I'll keep it in mind.

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Hm could someone figure out how to extract subtitles? And how to read those?

from newpipe.

rrooij avatar rrooij commented on May 8, 2024

@theScrabi
youtube-dl is able to extract the subtitles, maybe it is worth looking at their source code.

As for reading them, I don't know. They are SRT-formatted, they use another file extension, but it is basically the same how Youtube uses it.

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Not yet.

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Still no. This may take a while untilIi finaly find time to care about that. Still there are hundred other things to do first.

from newpipe.

KOLANICH avatar KOLANICH commented on May 8, 2024

Here is the implementation http://google2srt.sourceforge.net/en/

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Good thanks :)

from newpipe.

ZatsuneNoMokou avatar ZatsuneNoMokou commented on May 8, 2024

Any change?

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Yep exoplayer actually supports subtitles, so at least its possible to implement something like that. But unless we get proper exoplayer support, it's no worth speaking about it. So far exoplayer support is still an experimental early bird.

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

I wished NewPipe development would go faster :/

from newpipe.

rrooij avatar rrooij commented on May 8, 2024

@theScrabi What about adding the label help needed to this issue or add a TODO list with things that need to be done (e.g. a TODO.md)? That way, volunteers can quickly get an overview of what needs to get done. There's an overview in README.md but it doesn't state what the status of those developments is.

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

That autosub thing is Python we cant integrate it into NewPipe.

Also guys if you want to have subtitles, and asome other advanced features, than help me make exoplayer possible :). One thing I'd really like to so see, and I think its not that hard, is a new UI for the new player. With version 0.7.7 I'll deliver an experimental support for exoplayer, than you will see how it looks. However the UI of the current player is kind of a mess, I don't like that ugly MediaInterface, and the hide/show UI thing never worked correctly. I'd really appreciate it if someone could try to help me a bit with that :)

from newpipe.

jeremy447 avatar jeremy447 commented on May 8, 2024

That's a really useful feature. I hope it will be implemented soon :)

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Still I had to implement exoplayer in order to make this feature work, it's just gowing forward realy realy slow :/

from newpipe.

veechiecooqu avatar veechiecooqu commented on May 8, 2024

I will just +1 it because that's the best I can do :D

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Yea this should come :)

from newpipe.

antoninkriz avatar antoninkriz commented on May 8, 2024

Ive checkes how 'youtube-dl' gets its subtitles, it's actually pretty simple method, even without understanding python, I am sure it's pretty easy to implement, since its just loading two files and parsing them.

Python code from youtube-dl:

 def _get_subtitles(self, video_id, webpage):
        try:
            subs_doc = self._download_xml(
                'https://video.google.com/timedtext?hl=en&type=list&v=%s' % video_id,
                video_id, note=False)
        except ExtractorError as err:
            self._downloader.report_warning('unable to download video subtitles: %s' % error_to_compat_str(err))
            return {}

        sub_lang_list = {}
        for track in subs_doc.findall('track'):
            lang = track.attrib['lang_code']
            if lang in sub_lang_list:
                continue
            sub_formats = []
            for ext in self._SUBTITLE_FORMATS:
                params = compat_urllib_parse_urlencode({
                    'lang': lang,
                    'v': video_id,
                    'fmt': ext,
                    'name': track.attrib['name'].encode('utf-8'),
                })
                sub_formats.append({
                    'url': 'https://www.youtube.com/api/timedtext?' + params,
                    'ext': ext,
                })
            sub_lang_list[lang] = sub_formats
        if not sub_lang_list:
            self._downloader.report_warning('video doesn\'t have subtitles')
            return {}
return sub_lang_list

from newpipe.

 avatar commented on May 8, 2024

@tonakriz: Could you implement it yourself and submit a PR to NewPipeExtractor?

from newpipe.

antoninkriz avatar antoninkriz commented on May 8, 2024

@wb9688 I can try to

from newpipe.

antoninkriz avatar antoninkriz commented on May 8, 2024

NewPipeExtractor supports subtitles from this moment. Would be great if someone could implement it to NewPipe.

from newpipe.

oxwivi avatar oxwivi commented on May 8, 2024

This is one of my pain points for me as a regular viewer of TED talks. I can do a but of Java, so if you've any leads, do tell if there's anyhow I can help.

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

Well someone had to pull the subtitles out of the extractor, and put them into ExoPlayer.

from newpipe.

oxwivi avatar oxwivi commented on May 8, 2024

from newpipe.

theScrabi avatar theScrabi commented on May 8, 2024

ExoPlayer is the player framework we use to display the video.

from newpipe.

KOLANICH avatar KOLANICH commented on May 8, 2024

How about using subtitles and audio with external players like VLC?

from newpipe.

moshpirit avatar moshpirit commented on May 8, 2024

Not a developer but I found that SimpleExoPlayer has SubtitleView but I'm not sure if this is relevant enough since it's a 2016 Nov post. This said, there's still a lot of issues related to the subs

from newpipe.

Related Issues (20)

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.