nitter icon indicating copy to clipboard operation
nitter copied to clipboard

don't require HLS playback: mp4 for all videos

Open xnaas opened this issue 3 years ago • 4 comments

Similar issues: #263, #464


Would be nice to be able to get MP4 format for all videos. When you go through the Real™ Twitter API, you can get the MP4 link for any video, not sure if you can through however Nitter is doing the scraping. Example:

  • nitter link: https://nitter.net/sahilkapur/status/1527092111195226114
  • twitter link: https://twitter.com/sahilkapur/status/1527092111195226114
  • direct mp4: https://video.twimg.com/ext_tw_video/1527078073073651712/pu/vid/1280x592/co45-zhhUMy1vBC1.mp4?tag=12

For nitter, you end up with a plethora of .m3u8 and .m4s URLs after HLS playback is enabled. You cannot play any non-GIF videos without HLS playback enabled.

xnaas avatar May 22 '22 01:05 xnaas

This is implemented and (almost) fully working, but requires an implementation of video streaming I haven't gotten flawless yet due to a weird quirk with how Twitter's CDN/cache works. I want to look into it again soon, I made the implementation about two years ago.

zedeus avatar May 22 '22 22:05 zedeus

I look forward to it. \o/

ghost avatar May 22 '22 23:05 ghost

This would be only thing remaining to make Nitter perfect 👌 Hope you guys are able to implement it soon.

ericpa06 avatar Jun 08 '22 07:06 ericpa06

It's implemented here #634 but needs more testing since Twitter's mp4 streams seemingly aren't meant to be streamed. Weird handling of cache misses is necessary by retrying requests for up to several seconds.

zedeus avatar Jun 08 '22 07:06 zedeus