Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open video #319

Open
melroy89 opened this issue Jan 10, 2022 · 2 comments
Open

Open video #319

melroy89 opened this issue Jan 10, 2022 · 2 comments

Comments

@melroy89
Copy link
Contributor

Would it not be cool if we introduce a new command: show video 12 or open video 12. Which will show the video in the tweet with [id=12] in your OS's default video player?

Basically allowing you to watch videos, just like what show image does with images!?

I think this should not be too hard to implement.

Regards,
Melroy vd Berg

@slarrain
Copy link

Indeed, it should not be too hard to implement.
The method that implements the show image is here.

this is part of a tweet that has a video:

                    "type": "video",
                    "url": "https://t.co/agzj4I0BGh",
                    "video_info": {
                        "aspect_ratio": [
                            47,
                            26
                        ],
                        "duration_millis": 30093,
                        "variants": [
                            {
                                "content_type": "application/x-mpegURL",
                                "url": "https://video.twimg.com/ext_tw_video/1484906516817788929/pu/pl/wNA8xL_ENVExO-1P.m3u8?tag=12&container=fmp4"
                            },
                            {
                                "bitrate": 832000,
                                "content_type": "video/mp4",
                                "url": "https://video.twimg.com/ext_tw_video/1484906516817788929/pu/vid/752x416/74Psc2G5pmI_fNC7.mp4?tag=12"
                            },
                            {
                                "bitrate": 256000,
                                "content_type": "video/mp4",
                                "url": "https://video.twimg.com/ext_tw_video/1484906516817788929/pu/vid/488x270/SDWfzcP6DQJ9LUDm.mp4?tag=12"
                            }
                        ]
                    }

I think this is the part that should be parsed and made to be played by mpv of the default video player.

@melroy89
Copy link
Contributor Author

That would be great. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants