{"id":15197193,"url":"https://github.com/dennmtr/phomxplayer","last_synced_at":"2026-02-17T14:01:36.667Z","repository":{"id":56965726,"uuid":"320400227","full_name":"dennmtr/phomxplayer","owner":"dennmtr","description":"OMXPlayer wrap shell script","archived":false,"fork":false,"pushed_at":"2021-08-28T20:20:27.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-04T18:48:19.334Z","etag":null,"topics":["dbus","omxplayer","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dennmtr.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":"2020-12-10T22:00:41.000Z","updated_at":"2021-08-28T20:20:30.000Z","dependencies_parsed_at":"2022-08-21T05:30:09.238Z","dependency_job_id":null,"html_url":"https://github.com/dennmtr/phomxplayer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dennmtr/phomxplayer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennmtr%2Fphomxplayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennmtr%2Fphomxplayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennmtr%2Fphomxplayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennmtr%2Fphomxplayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dennmtr","download_url":"https://codeload.github.com/dennmtr/phomxplayer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennmtr%2Fphomxplayer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29546746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T13:00:00.370Z","status":"ssl_error","status_checked_at":"2026-02-17T12:57:14.072Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dbus","omxplayer","raspberry-pi"],"created_at":"2024-09-28T00:44:42.803Z","updated_at":"2026-02-17T14:01:36.633Z","avatar_url":"https://github.com/dennmtr.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dennmtr/phOMXPlayer\n\n![myImage](https://img.shields.io/github/license/dennmtr/phomxplayer?style=social)\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D_7.3-8892BF.svg)](https://github.com/symfony/symfony)\n\nOMXPlayer wrap shell script, ready for REST/XML-RPC APIs or CLI implementations.\n\n[Official OMXPlayer Documentation](https://github.com/popcornmix/omxplayer#help-and-docs)\n\n## Installation\n\n### Clone\n\n```console\n\n$ git clone https://github.com/dennmtr/phomxplayer.git\n\n```\n\n### Using Composer\n\nThe **recommended** way to install phOMXPlayer is through Composer\n\n```console\n\n$ composer require dennmtr/phomxplayer:dev-main\n\n```\n\n#### Laravel framework\n\nPublish configuration with **artisan** command `optional`\n\n```console\n\n$ php artisan vendor:publish --tag phOMXPlayer\n\n```\n\n## Prepare Raspberry Pi OS\n\nAdd user to **video group** `required`\n\n```console\n\n# usermod -a -G video \u003cusername\u003e\n\n```\n\nAdd user to **audio group**\n\n```console\n\n# usermod -a -G audio \u003cusername\u003e\n\n```\n\nReserve at least 128MB of system memory to the GPU `required`\n\n```console\n\n# echo \"gpu_mem=128\" \u003e\u003e /boot/config.txt\n\n```\n\n\u003e **NOTICE**: *Reboot required...*\n\n## Usage\n\n#### Initialize\n\n```php\n$player = new OMXPlayer([\n  'adev' =\u003e 'hdmi',\n  'blank' =\u003e true\n]);\n\n$player-\u003eplay('sample.mp4');\n```\n\n#### Request\n\n```php\n\necho 'Movie duration: ' . $player-\u003egetDuration();\n\n//same as...\n\n$command = new Commands\\Duration();\n\necho 'Movie duration: ' . $command-\u003egetFormattedOutput();\n\n```\n\nSee [Predefined command list](#predefined-commands)\n\n#### Validate\n\n```php\n\n$input = 0.5;\n\nif (Commands\\Volume::validateInput($input)) {\n  $command = new Commands\\Volume($input);\n  echo 'New volume level: ' . $command-\u003egetFormattedOutput();\n}\n\n```\n\n#### Proper configure\n\n```php\n\n$arguments = [\n  'adev' =\u003e 'hdmi',\n  'blank' =\u003e true,\n  'no-keys' =\u003e true\n];\n\n$player = new OMXPlayer($arguments);\n\n$player-\u003eadev;                  // Returns the Arguments\\Adev instance via magic method if exists or null.\n$player-\u003eadev-\u003egetShellArg();   // Returns '--adev hdmi' string, later passed in omxplayer execution.\n$player-\u003eadev-\u003egetValue();      // Returns 'hdmi' string.\n$player-\u003eadev = 'local';        // Sets a new adev argument instance with its variant value via magic method.\n$player-\u003eadev-\u003egetValue();      // Returns 'local' string.\n\n$player-\u003emap([\n  'adev' =\u003e 'both',\n  'with-info' =\u003e false\n]);\n\n$player-\u003eadev-\u003egetValue();      // Returns 'both' string.\n$player-\u003ewith_info-\u003egetValue(); // Returns false bool.\n$player-\u003eblank-\u003egetValue();     // Returns true bool.\n\n$player-\u003emap([\n  'adev' =\u003e new Arguments\\Adev(Arguments\\Adev::HDMI),\n  'blank' =\u003e new Arguments\\Blank(false),\n  'with-info' =\u003e true,\n]);\n\n$player-\u003eadev-\u003egetValue();      // Returns 'hdmi' string.\n$player-\u003egetShellArgs(false, false);    // Returns '--adev hdmi --no-keys --with-info' string.\n\n$input = true;\n\nif (Arguments\\Adev::isValid($input)) {\n  $player-\u003eadev = $input;       // It will never reach here because boolean true is not a valid Adev value.\n}\n\n$player-\u003eadev = $input;         // It will throw an ArgumentException because boolean true is not a valid Adev value.\n\n```\n\nSee [Argument list](#argument-List)\n\n#### Direct call\n\n```php\n\n$dbus_client = new DBusClient();\n\n$player = new OMXPlayer([], $dbus_client); // Optional\n\nif (!empty($player-\u003epid)) {\n  $stdout = $dbus_client-\u003ecall( 'org.freedesktop.DBus.Properties.Get', [\n    ['string', 'org.mpris.MediaPlayer2.Player'],\n    ['string', 'CanControl'],\n  ]); // Assumes an active DBus session. Returns the raw stdout buffer as string\n}\n\n```\n\n## Predefined Commands\n\nA list of predefined commands ready to use...\n\n|Command|Param Type|Return Type|Method Alias|Description|\n|---|---|---|---|---|\n|Action|int `enum`|-|action|Executes a \"keyboard\" command|\n|CanControl|-|bool|canControl|Whether or not the player can be controlled|\n|CanGoNext|-|bool|canGoNext|Whether or not the play can skip to the next track|\n|CanGoPrevious|-|bool|canGoPrevious|Whether or not the player can skip to the previous track|\n|CanPause|-|bool|canPause|Whether or not the player can play|\n|CanPlay|-|bool|canPlay|Whether or not the player can seek|\n|CanSeek|-|bool|canSeek|Returns the total length of the playing media|\n|Duration|-|int|getDuration|Returns the total length of the playing media|\n|GetSource|-|string|getSource|The current file or stream that is being played|\n|HideSubtitles|-|-|hideSubtitles|Turns off subtitles|\n|ListAudio|-|array|listAudio|Returns and array of all known audio streams|\n|ListSubtitles|-|array|listSubtitle|Returns a array of all known subtitles|\n|ListVideo|-|array|listVideo|Returns and array of all known video streams|\n|Mute|-|-|mute|Mute the audio stream. If the volume is already muted, this does nothing|\n|Next|-|-|nextChapter|Skip to the next chapter|\n|OpenUri|string|string|openUri|Restart and open another URI for playing|\n|Pause|-|-|pause|Pause the video. If the video is playing, it will be paused, if it is paused it will stay in pause (no effect)|\n|Play|-|-|resume|Play the video. If the video is playing, it has no effect, if it is paused it will play from current position|\n|PlaybackStatus|-|bool|playbackStatus|The current state of the player, either \"Paused\" or \"Playing\"|\n|Position|int `optional`|int|setPosition, getPosition|Returns the current position, seeks to a specific location in the file. This is an absolute seek|\n|Previous|-|-|previousChapter|Skip to the previous chapter|\n|Rate|float `optional`|float|setRate, getRate|Set the playing rate and return the current rate, or gets the current rate|\n|Seek|int|int|seek|Perform a relative seek|\n|SelectAudio|int|-|selectAudio|Selects the audio stream at a given index|\n|SelectSubtitle|int|-|selectSubtitle|Selects the subtitle at a given index|\n|ShowSubtitles|-|-|showSubtitles|Turns on subtitles|\n|Stop|-|-|stop|Stops the video|\n|SupportedMimeTypes|-|string|getSupportedMimeType|Supported mime types|\n|SupportedUriSchemes|-|string|getSupportedUriScheme|Playable URI formats|\n|Toggle|-|-|toggle|Toggles the play state. If the video is playing, it will be paused, if it is paused it will start playing|\n|Unmute|-|-|unmute|Unmute the audio stream. If the stream is already unmuted, this does nothing|\n|Volume|float `optional`|float|setVolumeLevel, getVolumeLevel|Set the volume and return the current volume, return's the current volume|\n\n## Argument List\n\nA list of OMXPlayer shell arguments...\n\n|Argument|Named Key|Param Type|Acceptable Values|Description|\n|---|---|---|---|---|\nAdev|`adev`|string|`hdmi` `local` `both` `alsa`|Audio out device|\nAdvanced|`advanced`|int|`0` `1`|Enable/disable advanced deinterlace for HD videos (default enabled)|\nAidx|`aidx`|int|-|Audio stream index|\nAlign|`align`|string|`left` `center` `right`|Subtitle alignment (default: left)|\nAllowMvc|`allow-mvc`|bool|-|Allow decoding of both views of MVC stereo stream|\nAlpha|`alpha`|int|`0...255`|Set video transparency|\nAmp|`amp`|float|`0...1`|Set initial amplification in millibels (default 0)|\nAspectMode|`aspect-mode`|string|`letterbox` `fill` `strech`|Letterbox, fill, stretch. Default: letterbox|\nAvdict|`avdict`|string|-|Options passed to demuxer, e.g., 'rtsp_transport:tcp,...'|\nBlank|`blank`|bool|-|Set the video background color to black|\nCookie|`cookie`|string|-|Send specified cookie as part of HTTP requests|\nDeinterlace|`deinterlace`|bool|-|Force deinterlacing|\nDisplay|`display`|int|-|Set display to output to|\nFontSize|`font-size`|int|-|Font size in 1/1000 screen height (default: 55)|\nFont|`font`|string|-|Subtitle font absolute file path|\nFps|`fps`|int|`16...120`|Set fps of video where timestamps are not present|\nHdmiClockSync|`hdmiclocksync`|bool|-|Display refresh rate to match video (default)|\nHw|`hw`|bool|-|Hw audio decoding|\nItalicFont|`italic-font`|string|-|Subtitle font absolute file path|\nLavfdopts|`lavfdopts`|string|-|Options passed to libavformat, e.g. 'probesize:250000,...'|\nLayer|`layer`|int|-|Set video render layer number (higher numbers are on top)|\nLayout|`layout`|string|`x.x`|Set output speaker layout (e.g. 5.1)|\nLines|`lines`|int|-|Number of lines in the subtitle buffer (default: 3)|\nLive|`live`|bool|-|Set for live tv or vod type stream|\nLoop|`loop`|bool|-|Loop file. Ignored if file not seekable|\nMode3D|`mode3d`|string|`FP` `TB` `SBS`|Switch tv into 3d mode|\nNativeDeinterlace|`nativedeinterlace`|bool|-|let display handle interlace|\nNoBoostOnDownmix|`no-boost-on-downmix`|bool|-|Don't boost volume when downmixing|\nNoDeinterlace|`nodeinterlace`|bool|-|Force no deinterlacing|\nNoGhostBox|`no-ghost-box`|bool|-|No semitransparent boxes behind subtitles|\nNoHdmiClockSync|`nohdmiclocksync`|bool|-|Do not adjust display refresh rate to match video|\nNoOsd|`no-osd`|bool|-|Do not display status information on screen|\nOrientation|`orientation`|int|`0` `90` `180` `270`|Set orientation of video|\nPassthrough|`passthrough`|bool|-|Audio passthrough|\nPos|`pos`|int|-|Start position|\nRefresh|`refresh`|bool|-|Adjust framerate/resolution to video|\nSid|`sid`|int|-|Show subtitle with index|\nSubtitles|`subtitles`|string|-|External subtitles in UTF-8 srt format|\nThreshold|`threshold`|int|-|Amount of buffered data required to finish buffering [s]|\nTimeout|`timeout`|int|-|Timeout for stalled file/network operations (default 10s)|\nUserAgent|`user-agent`|string|-|Send specified User-Agent as part of HTTP requests|\nVol|`vol`|float|`0...1`|set initial volume in millibels (default 0)|\nWithInfo|`with-info`|bool|-|dump stream format before playback|\n\n## Development\n\n#### Unit Testing\n\nDon't forget to define a valid absolute file path, or a valid url address for the tests process in phpunit.xml\nconfiguration file\n\n```xml\n\u003cconst name=\"TEST_URI\" value=\"/file/path/sample.mp4\"/\u003e\n```\n\n## Support\n\n\u003cdennmtr+phomxplayer@gmail.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennmtr%2Fphomxplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdennmtr%2Fphomxplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennmtr%2Fphomxplayer/lists"}