{"id":16958449,"url":"https://github.com/dohliam/stream2chromecast","last_synced_at":"2025-03-22T13:32:30.140Z","repository":{"id":40583337,"uuid":"42429152","full_name":"dohliam/stream2chromecast","owner":"dohliam","description":"Chromecast media streamer for Linux (fork of the no-longer maintained stream2chromecast by @Pat-Carter)","archived":false,"fork":false,"pushed_at":"2019-07-28T06:12:35.000Z","size":139,"stargazers_count":46,"open_issues_count":3,"forks_count":96,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-18T11:48:27.438Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/Pat-Carter/stream2chromecast","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dohliam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-14T05:35:15.000Z","updated_at":"2025-03-01T09:34:54.000Z","dependencies_parsed_at":"2022-08-27T02:49:31.373Z","dependency_job_id":null,"html_url":"https://github.com/dohliam/stream2chromecast","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fstream2chromecast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fstream2chromecast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fstream2chromecast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohliam%2Fstream2chromecast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dohliam","download_url":"https://codeload.github.com/dohliam/stream2chromecast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244963018,"owners_count":20539256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T22:42:37.889Z","updated_at":"2025-03-22T13:32:29.862Z","avatar_url":"https://github.com/dohliam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Stream2Chromecast\n=================\n\nA Chromecast media streamer for Linux.\n\nStream2Chromecast casts audio and video files to a Chromecast device from Linux.\n\nIt can also transcode any unsupported files in real time and play them on the Chromecast.\n\nIt is written in Python 2.7 and uses either ffmpeg or avconv for transcoding.\n\n\n\n\nInstallation\n------------\nTo play media file types that are unsupported by Chromecast, either ffmpeg or avconv need to be installed to do the transcoding.\n\nOn Ubuntu, either install ffmpeg:-\n\n    sudo apt-get install ffmpeg\n\n...or avconv:-\n\n    sudo apt-get install libav-tools\n   \n   \nOn some older Ubuntu versions (e.g. 14.04), a third party PPA is required to install ffmpeg:-\n\n    sudo add-apt-repository ppa:mc3man/trusty-media\n    sudo apt-get update\n    # sudo apt-get dist-upgrade # optional\n    apt-get install ffmpeg\n   \n\n\n\nFunctionality\n-------------\nTo stream supported media files to a Chromecast.\n\n        stream2chromecast.py my_media.mp4\n\n\nTo transcode and stream unsupported media files to a Chromecast.\n    (This requires either ffmpeg or avconv to be installed. See Installation.)\n\n        stream2chromecast.py -transcode my_mpeg_file.mpg\n\nTo play a supported file from a URL.\n    This plays the file directly from the remote address, so the file must be streamable and cannot be transcoded. This option will only play downloadable files, it will not stream internet radio stations. In situations where this option does not work, the transcode option will accept URLs as well as local file paths and will often cope better.\n\n        stream2chromecast.py -playurl http://www.example.com/my_media.mp4\n\n\n### Control playback\n\n - pause playback (currently only works when not transcoding)\n   \n        stream2chromecast.py -pause\n       \n - continue (unpause) playback (currently only works when not transcoding)\n   \n        stream2chromecast.py -continue\n       \n - stop playback\n   \n        stream2chromecast.py -stop  \n\n\n### Volume control\n\n - set volume (takes a value between 0.0 and 1.0)\n\n        stream2chromecast.py -setvol \u003cvolume\u003e\n\n - increase or decrease volume by 0.1\n \n        stream2chromecast.py -volup\n        stream2chromecast.py -voldown\n        \n - mute volume\n\n        stream2chromecast.py -mute\n        \n        \n          \n### Status\n\n - get Chromecast status\n\n        stream2chromecast.py -status\n        \n        \n### Specifying a device when there are multiple Chromecasts on the network\nTo specify a device by name or IP address, use the -devicename parameter.\ne.g.\n\n - To play a file on a device named \"my_chromecast\"\n \n        stream2chromecast.py -devicename my_chromecast my_media.mp4\n\n - To play a file on a device at IP address 192.168.1.10\n \n        stream2chromecast.py -devicename 192.168.1.10 my_media.mp4\n\n - To search the network and list the available devices\n        \n        stream2chromecast.py -devicelist\n\n\n### Specify which transcoder to use\nIf both ffmpeg and avconv are installed, ffmpeg will be used by default. \n\n - To specify avconv to be used and transcode a playback, use the -transcoder option\n\n        stream2chromecast.py -transcoder avconv -transcode \u003cfile\u003e\n        \n\n### Supply custom transcoder parameters\nIt is possible to pass in specific parameters to ffmpeg or avconv using the -transcodeopts parameter with the options surrounded by quotes.\nThese options are applied to the transcoder output.\n\n - To specify an output video bitrate of 1000k and an audio bitrate of 128k\n\n        stream2chromecast.py -transcodeopts '-b:v 1000k -b:a 128k' -transcode \u003cfile\u003e\n        \nIt is also possible to pass in parameters to the transcoder to be applied to the transcoder input using the -transcodeinputopts parameter, again with the options surrounded by quotes. This can be useful for specifying a \"seek\" position.\n\n - To specify a seek position of 15 minutes from the start of the media file\n \n        stream2chromecast.py -transcodeinputopts '-ss 00:15:00' -transcode \u003cfile\u003e\n        \n            \n### Specify a port to use for streaming media.\nBy default, a random unused port will be selected to serve the media from. In a firewalled environment, it can be useful to be able to specify the port to open\n\n - To specify port 8765 to serve media from\n \n        stream2chromecast.py -port 8765 \u003cfile\u003e\n\n\n### Subtitles\nOnly the WebVTT format is currently supported and not when transcoding.\n\n - to cast the subtitles on /path/to/subtitles.vtt\n\n        stream2chromecast.py -subtitles /path/to/subtitles.vtt \u003cfile\u003e\n\n\nTo specify the port from which the subtitles file is streamed. In a firewalled environment, it can be useful to be able to specify the port to open\n\n - to serve the subtitles on port 8765\n\n        stream2chromecast.py -subtitles /path/to/subtitles.vtt -subtitles_port 8765 \u003cfile\u003e\n\n\nTo specify the subtitles language. The language format is defined by RFC 5646. (in most cases, this option should not be needed)\n\n - to serve the subtitles french subtitles\n \n        stream2chromecast.py -subtitles /path/to/subtitles.vtt -subtitles_language fr \u003cfile\u003e\n    \n    \n    \n### Specify a buffer-size for the transcoder process\nBy default, the transcoder process returns its data to be sent to the device without buffering. Buffering the data can help in situations where the network connection is slow.\n\n - To specify a buffer size of 5 megabytes\n\n        stream2chromecast.py -transcodebufsize 5242880 -transcode \u003cfile\u003e\n\n \n\nNotes\n-----\navconv is a fork of ffmpeg. For a time, (when this script was first written) it was included in the Ubuntu repositories rather than ffmpeg. There was a PPA repository available which contained the latest builds of ffmpeg (see the installation notes). For those who are using the 14.04 release, this might still be a good option.\n\n\nTo Do\n-----\n    Automatic identification of media types that need transcoding.\n    Python 3 compatibility...?\n    curses interface.\n    \n\nLicense\n-------\nstream2chromecast.py is GPLv3 licensed.\n\n\n\nThanks\n------\nThe excellent PyChromecast library by Paulus Schoutsen has been a great help for information on building the interface.\n\nhttps://github.com/balloob/pychromecast\n\n\nThanks to TheCrazyT for this gist:-\n\nhttps://gist.github.com/TheCrazyT/11263599\n\n\nThanks to [dohliam](https://github.com/dohliam) for bug fixes and additional functionality.\n\nThanks to [interlocuteur](https://github.com/interlocuteur) for bug fixes, error reports \u0026 advice.\n\nThanks to [jsalatiel](https://github.com/jsalatiel) for suggestions \u0026 advice.\n\nThanks to [palaviv](https://github.com/palaviv) for the subtitles functionality.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohliam%2Fstream2chromecast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdohliam%2Fstream2chromecast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohliam%2Fstream2chromecast/lists"}