8 पॉइंट द्वारा GN⁺ 1 일 전 | 2 टिप्पणियां | WhatsApp पर शेयर करें
  • Castor एक terminal tool है जो web page या direct stream URL से असली video stream खोजकर उसे TV के लिए convert करता है, और screen mirroring के बिना original quality में real-time भेजता है
  • यह headless Chrome और Chrome DevTools Protocol से network traffic observe करता है, और page click, सबसे बड़े iframe में entry, फिर re-click के जरिए stream extract करता है; लेकिन जिन pages में autoplay allowed नहीं है, वहाँ यह काम नहीं कर सकता
  • इसे DLNA/UPnP support करने वाले smart TV और Kodi, VLC, Plex में इस्तेमाल किया जा सकता है; Chromecast support implement किया गया है, लेकिन अभी experimental है और test नहीं हुआ है
  • playable H.264 video को re-encode किए बिना pass करता है, और जरूरत पड़ने पर hardware encoder या libx264 से convert करता है; whisper से बनाए गए subtitles को video में embed भी कर सकता है
  • यह video, catalog या sources provide नहीं करता और DRM bypass नहीं करता; इसे केवल वे pages और streams transmit करने के लिए design किया गया है जिन्हें user खुद specify करता है और जिनका use करने का अधिकार रखता है

Web video को असली stream के रूप में भेजना

  • Castor arbitrary web video को directly transmit न कर पाने वाले smart TV और latency व resolution loss वाली screen mirroring के विकल्प के रूप में, actual video stream को full quality में transmit करता है
  • Web page या direct stream URL डालने पर यह video खोजता है, stream extract करता है, फिर TV के मुताबिक transcode करके real-time में भेजता है
  • User-configured sources से IMDB/TMDB ID lookup कर सकता है या auto-generated subtitles को video में embed कर सकता है
  • castor cast चलाने पर terminal-based interactive browser में titles browse करके transmit किए जा सकते हैं

Stream extraction का तरीका और limitations

  • Headless Chrome चलाकर Chrome DevTools Protocol से network traffic observe करता है और stream खोजता है
  • Playback start करने के लिए एक छोटा action pipeline perform करता है
    • Page click
    • सबसे बड़े iframe में जाना
    • fallback action के रूप में फिर से click
  • Autoplay allow करने वाले pages पर काम करता है, और सभी sites support नहीं करता

Installation और runtime requirements

  • Recommended तरीका TV के same network पर चलने वाला native binary है
  • Runtime environment के PATH में ये tools चाहिए
    • Chrome या Chromium: headless stream extraction
    • ffmpeg: transcoding
    • ffprobe: media format detection
  • macOS पर इसे Homebrew से install किया जा सकता है
brew install --cask stupside/tap/castor
  • Source build के लिए Go 1.26+ और CMake चाहिए
    • whisper.cpp binding cgo use करती है और locally built libwhisper.a से link होती है
    • local replace और prebuilt static library चाहिए, इसलिए go install काम नहीं करता
git clone --recurse-submodules https://github.com/stupside/castor.git
cd castor
make

Basic usage flow

  • castor scan से TV का नाम खोजें और config.yaml के device में exact name और device type specify करें
device:
  name: "Living Room TV"
  type: dlna
  • Web page या direct stream URL को cast player से transmit करें
castor cast player https://example.com/watch/some-video
  • Interactive title search के लिए TMDB API key और user-configured sources चाहिए; पूरा command और flags castor --help में देखे जा सकते हैं

Configuration और user-provided sources

  • config.yaml current directory या --config से specified path से read होता है, और required item केवल transmission target की device setting है
  • Timeouts, discovery, capture, transcoding, network interface, Chrome navigation के default values provided हैं
  • Secret values को Git से excluded config.local.yaml से override किया जा सकता है, या CASTOR_SECTION__FIELD format के environment variables से specify किया जा सकता है
  • cast movie, cast episode, interactive browser user-configured sources में title ID substitute करते हैं
    • Castor में खुद sources, catalog या lookup functionality शामिल नहीं है
    • User-written templates में ID substitute करता है, हर proxies को prefix करके page खोलता है, फिर cast player जैसे तरीके से stream extract करता है
    • Multiple proxies specified order में try किए जाते हैं
sources:
  - proxies: ["https://your-source.example";]
    templates:
      movie: "/embed/movie/{itemID}"
      episode: "/embed/tv/{itemID}/{season}-{episode}"

TMDB search और automatic subtitles

  • Interactive browser title search के लिए TMDB API key use करता है
    • Key themoviedb.org से मिल सकती है
    • cast movie <id> जैसे direct commands के लिए TMDB key की जरूरत नहीं है
  • Automatic subtitles whisper से audio transcribe करके video में embed करते हैं और default रूप से disabled रहते हैं
    • Default language English है
    • Default model करीब 75MB का ggml-tiny.en है और automatically download होता है

Supported devices

  • DLNA/UPnP MediaRenderer:1 profile implement करने वाले TV support करता है
    • Samsung test किया गया है, और LG, Sony Bravia, Panasonic Viera, Philips, Hisense, TCL, VIZIO, Sharp target support में हैं
    • Kodi, VLC, Plex जैसे network players भी use किए जा सकते हैं
  • castor scan से same network के devices query करता है
  • Chromecast support implement किया गया है, लेकिन experimental है और test नहीं हुआ है

Docker constraints और network configuration

  • Linux-only Docker image Chrome, ffmpeg, ffprobe के साथ आती है
  • Docker में TV के same LAN पर Linux host चाहिए, और SSDP multicast discovery व Castor playback server connection के लिए --network host use करना होगा
  • Docker Desktop के macOS और Windows में --network host LAN से connect नहीं होता
    • Container Docker Desktop internal VM subnet में रखा जाता है, जिससे scan devices नहीं खोज पाता और transmission भी fail होता है
    • macOS और Windows में native binary use करें या Linux VM को LAN में bridge करें
  • /config.yaml mount करके settings provide की जा सकती हैं, और volume में automatically downloaded whisper model preserve किया जा सकता है
  • latest के बजाय release tag use करने से version pin किया जा सकता है

Media passthrough और encoding

  • अगर TV allowed profile और level वाला H.264 video पहले से play कर सकता है, तो stream copy use करके CPU usage लगभग 0 तक घटा देता है
  • अगर TV codec reject करता है या subtitles embed करने हैं, तो re-encoding करता है
    • Linux के VA-API या native macOS binary के VideoToolbox जैसे सच में काम करने वाले hardware H.264 encoder को पहले चुनता है
    • उपलब्ध न होने पर software libx264 पर fallback करता है
  • Docker container में Intel GPU का VA-API use करने के लिए --device /dev/dri चाहिए; केवल --network host से GPU expose नहीं होता

Use cases और limitations

  • Castor किसी specific site से जुड़ी service नहीं, बल्कि general-purpose transmission tool है
  • यह videos, catalogs या sources host या bundle नहीं करता; केवल user-specified pages, streams और sources process करता है जिनका use करने का user के पास अधिकार है
  • यह DRM decrypt या bypass नहीं करता और DRM-protected services transmit नहीं कर सकता
  • Site terms of service और local laws का पालन करने की जिम्मेदारी user की है, और इसे legal personal व educational use के लिए as-is provide किया गया है

2 टिप्पणियां

 
xguru 1 일 전

वाह, नीचे वाले comment में दिया https://tvexplorer.live/channel/EBS1TV.kr.SD/country/KR यह बहुत सुविधाजनक है। हाहा
लगता है Korea में यह blocked है, लेकिन क्या विदेश में इसे सीधे देखा जा सकता है?

 
GN⁺ 1 일 전
Hacker News की राय
  • बिना किसी अलग bypass के, channels द्वारा public किए गए HLS streams को सीधे browser में चलाने वाला TV Explorer बनाया। इसमें 10,000 से ज़्यादा free channels वाली public GitHub list का उपयोग किया गया है
    https://tvexplorer.live

    • यह हैरान करने वाली हद तक smooth और lightweight है, लगभग तुरंत respond करता है, और back button भी ठीक से काम करता है। Subtitle popup कुछ screen elements से overlap करता है, लेकिन सामान्य desktop पर भी channel switching उतनी ही तेज़ है जितनी analog NTSC के दौर में channels घुमाने पर होती थी
      सोच रहा हूं कि दूसरे TV services ऐसा क्या करते हैं जो यहां नहीं किया जा रहा
    • खासकर Japanese channels देखें तो https://tv.garden/ पर channels ज़्यादा लगते हैं
    • Mobile पर भी बहुत तेज़ load होता है और दुनिया भर के channels देखे जा सकते हैं, इसलिए यह अलग post में परिचय कराने लायक है
    • अगर यह Jellyfin plugin के रूप में आए तो अच्छा होगा
    • अब तक देखी गई IPTV sites में सबसे polished लगती है
  • Bots को हर बार नए profile वाला headless browser चलाना पड़े, यह स्थिति बेतुकी है। Cloudflare bots को रोक नहीं पाता, बस दोनों तरफ के resources बर्बाद कराता है, और access logs व passwords NSA को सौंपने जैसा है; पुराने internet पर लौटना चाहता हूं

  • Explanation कहता है, “Chromecast या AirPlay नहीं था, इसलिए laptop के web video को TV पर भेजने के लिए बनाया,” लेकिन यह Claude द्वारा बनाया हुआ लगता है

    • हां, Claude की मदद ली थी और मैं DLNA या FFMPEG expert भी नहीं हूं, लेकिन अहम बात यह है कि इससे मेरी समस्या हल हुई। अगर इससे दूसरों की समस्या भी हल हो तो और अच्छा
    • यह भी कहा जा सकता है कि compiler ने Google आदि की libraries का उपयोग करके बनाया। जब तक Claude deploy करने योग्य machine code सीधे output नहीं करता, यह इंसानी intent और final output के बीच एक और intermediate layer भर है
  • मुझे लगा था Turnstile का core headless browsers को detect करके bypass मुश्किल बनाना है, इसलिए संदेह है कि सिर्फ check mark click की नकल करके वाकई pass हो सकता है या नहीं

    • Turnstile site operators को अस्पष्ट सुरक्षा-भावना बेचने, JavaScript बंद करने वाले Tor users को block करने, और सभी traffic की copy Cloudflare को देने के लिए प्रेरित करने वाला tool ज़्यादा लगता है
      वास्तविक security से ज़्यादा Cloudflare के लिए humans और bots में फर्क किए बिना aggregate किए गए blocked users count को marketing में इस्तेमाल करने वाली fake security अहम लगती है
    • सही events की नकल की जाए तो platform detection के बिना headless browser और real browser में फर्क करना मुश्किल है। हालांकि Linux के software renderer को ढूंढना कठिन नहीं, इसलिए अगर ऐसे bypass जारी रहे तो Linux users पर एक या अधिक extra verification थोपे जाने की संभावना है
      Checkbox सिर्फ एक हिस्सा है; उससे पहले browser के सभी actions और event responses को observe करके bot होने की संभावना के आधार पर decide किया जाता है कि extra verification चाहिए या नहीं
    • सिर्फ check click की नकल नहीं, बल्कि कई browser properties भी spoof की जाती हैं। सामान्य headless browser हो तो detect होने की संभावना बड़ी है
    • लाखों डॉलर के defense systems होने के बावजूद लोग लंबे समय से vibrating fan पर peripherals tape करके WoW automate करते आए हैं। Headless browser automation भी FPS cheating जैसा है; attack side के पास initiative होता है, और पर्याप्त समय व पैसा खर्च करे तो आखिर जीत सकता है
    • अगर ऐसा browser बनाया जा सके जो background में होने वाली बाकी सभी checks pass कर दे, तो अंत में बस check mark click ही बचता है
  • आमतौर पर piracy tools कम से कम plausible deniability छोड़ते हैं, लेकिन यहां तो यह claim करता है कि इस weekend release होने वाली 250 million dollar budget वाली blockbuster तक stream कराने में मदद करेगा

    • मैंने सोचा था कि यह configured sources में movie खोजता है और न मिले तो “not found” return करता है। Stremio भी legal app है, लेकिन illegal Torrentio plugin जोड़ दें तो media अपने आप pirate किया जा सकता है, इसलिए core development publicly हो सकता है
      Emulator Azahar और games को automatically decrypt करने वाला illegal fork Azahar Plus भी वैसा ही है, लेकिन फिर से देखने पर यह project illegal streaming sites को built-in रखता है
    • Interface https://www.themoviedb.org/ की currently popular movies दिखाता है
    • शुरुआत में यह पहले से accessible website के video को laptop से TV पर भेजने वाला tool लगा। लेकिन “random website” जैसी AI-generated लगने वाली description और TVDB API key option के कारण असल focus क्या है, यह confusing है
    • संभव है कि यह असली movie नहीं, सिर्फ trailer ही play करता हो
  • 15 साल से भी पुराने साधारण Samsung TV पर तुरंत काम कर गया। सोच रहा हूं कि https://vsembed.ru/movies/latest/page-1.json जैसी सभी JSON pages को analyze करने के लिए खुद search function लिखना सबसे बेहतर होगा या नहीं

  • Description में context कम है, इसलिए यह किस काम का tool है और piracy के लिए है या नहीं, समझना मुश्किल है

    • यह एक command-line tool है: movie चुनने पर streaming site से matching video खोजता है, transcode करता है, subtitles real-time में burn/overlay करता है, और TV को play करने का command देता है
    • यह सिर्फ उन streams को play करता है जिन तक पहले से access है और encryption भी नहीं तोड़ता, इसलिए यह piracy में कैसे मदद करता है, यह साफ नहीं
    • Website या service से streaming video निकालकर TV पर भेजने का alternative casting method है
    • बड़े existing services पहले से screen casting support करते हैं, इसलिए संदेह है कि असली use case आखिर illegal sports streams जैसी चीज़ें ही हैं या नहीं
  • Torrent इस्तेमाल करने जितनी ही मेहनत लगती है, इसलिए इसे इस्तेमाल करने की खास वजह समझ नहीं आती

  • macOS के Docker version में TV नहीं मिल सकता

    • macOS पर Docker के लिए जरूरी virtual machine के जरिए UPnP इस्तेमाल करना हो तो संबंधित network को बाहर expose करने के लिए configure करना पड़ सकता है
  • “random fingerprints और stealth scripts से automation छिपाने वाला headless Chrome चलाता है” वाले हिस्से पर भरोसा उठ गया

    • मैं browser fingerprinting के क्षेत्र में काम करता हूं; repository देखकर लगा कि यह बस navigator, Audio API, Canvas API को modify करता है। यह बहुत basic level है, इसलिए आसानी से detect होने की संभावना बड़ी है