{"id":21648164,"url":"https://github.com/pzhlkj6612/streamlink-eplus_jp-object_storage","last_synced_at":"2025-04-11T19:33:35.004Z","repository":{"id":54673423,"uuid":"469420560","full_name":"pzhlkj6612/streamlink-eplus_jp-object_storage","owner":"pzhlkj6612","description":"Process the live streaming or VOD from eplus.jp .","archived":false,"fork":false,"pushed_at":"2024-11-05T16:14:23.000Z","size":117,"stargazers_count":16,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-04-10T11:17:53.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pzhlkj6612.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-13T16:01:21.000Z","updated_at":"2025-04-09T10:20:58.000Z","dependencies_parsed_at":"2023-10-01T17:36:59.313Z","dependency_job_id":"ce33939c-a24a-4f27-8b74-c8771910c80c","html_url":"https://github.com/pzhlkj6612/streamlink-eplus_jp-object_storage","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzhlkj6612%2Fstreamlink-eplus_jp-object_storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzhlkj6612%2Fstreamlink-eplus_jp-object_storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzhlkj6612%2Fstreamlink-eplus_jp-object_storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pzhlkj6612%2Fstreamlink-eplus_jp-object_storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pzhlkj6612","download_url":"https://codeload.github.com/pzhlkj6612/streamlink-eplus_jp-object_storage/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248467295,"owners_count":21108622,"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":["azure-storage-blob","bento4","digitalocean-spaces","docker-images","linode-storage","podman-pod","s3cmd","streamlink","vultr-storage","yt-dlp"],"created_at":"2024-11-25T06:53:46.809Z","updated_at":"2025-04-11T19:33:34.974Z","avatar_url":"https://github.com/pzhlkj6612.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streamlink, eplus.jp and Object Storage\n\n\u003e DMCA is coming...?\n\n## What does this docker image do\n\n- Download the live streaming or VOD from [eplus](https://ib.eplus.jp/) and other websites via Streamlink, yt-dlp or N_m3u8DL-RE.\n- Upload the video file to S3-compatible object storage via S3cmd or to Azure Storage container via Azure CLI.\n\n## Details\n\n### Storage requirement\n\nFor a 4-hour live event, the size of a MPEG-TS recording with the best quality is about 9.88 GB (9.2 GiB).\n\n### Downloader support\n\nThe support of yt-dlp \u0026 N_m3u8DL-RE is experimental.\n\n### Output\n\nThe output file is in \".ts\" format. I believe that your media player is smart enough to get to know the actual codec.\n\nThe file is located in the \"/SL-downloads\" directory in the container. You are able to access those files by mounting a volume into that directory **before** creating the container (otherwise you may have to play with [`docker cp`](https://docs.docker.com/reference/cli/docker/container/cp/) or anonymous volumes).\n\nYou will see some intermediate files. Those files will be renamed to \"final files\" finally:\n\n```shell\n# template:\n${datetime}.${OUTPUT_FILENAME_BASE}.ts # full\n${OUTPUT_FILENAME_BASE}.ts             # NO_AUTO_PREFIX_DATETIME\n\n# example:\n'20220605T040302Z.name-1st-Otoyk-day0.ts' # full\n'name-1st-Otoyk-day0.ts'                  # NO_AUTO_PREFIX_DATETIME\n\n```\n\nFinal files:\n\n```shell\n# template:\n${datetime}.${OUTPUT_FILENAME_BASE}.${size}.${md5}.ts # full\n${OUTPUT_FILENAME_BASE}.${size}.${md5}.ts             # NO_AUTO_PREFIX_DATETIME\n${datetime}.${OUTPUT_FILENAME_BASE}.${md5}.ts         # NO_AUTO_FILESIZE\n${datetime}.${OUTPUT_FILENAME_BASE}.${size}.ts        # NO_AUTO_MD5\n\n# example:\n'20220605T040302Z.name-1st-Otoyk-day0.123456789.0123456789abcdef0123456789abcdef.ts' # full\n'name-1st-Otoyk-day0.123456789.0123456789abcdef0123456789abcdef.ts'                  # NO_AUTO_PREFIX_DATETIME\n'20220605T040302Z.name-1st-Otoyk-day0.0123456789abcdef0123456789abcdef.ts'           # NO_AUTO_FILESIZE\n'20220605T040302Z.name-1st-Otoyk-day0.123456789.ts'                                  # NO_AUTO_MD5\n\n```\n\n| Variable | Description\n| - | -\n| OUTPUT_FILENAME_BASE | base file name (env)\n| datetime | datetime at UTC in ISO 8601 format. \u003cbr\u003e `strftime(${datetime}, 17, \"%Y%m%dT%H%M%SZ\", gmtime(\u0026(time(0))))`\n| size | file size. \u003cbr\u003e `du -b \"$filepath\"`\n| md5 | file hash. \u003cbr\u003e `md5sum \"$filepath\"`\n\n### Prepare your object storage\n\n#### AWS S3-compatible preparation (simpler)\n\nCreate your own object storage:\n\n- AWS:\n  - [Creating, configuring, and working with Amazon S3 buckets - Amazon Simple Storage Service](https://docs.aws.amazon.com/AmazonS3/latest/userguide/creating-buckets-s3.html)\n- DigitalOcean:\n  - [How to Create Spaces :: DigitalOcean Documentation](https://docs.digitalocean.com/products/spaces/how-to/create/)\n  - [Setting Up s3cmd 2.x with DigitalOcean Spaces :: DigitalOcean Documentation](https://docs.digitalocean.com/products/spaces/resources/s3cmd/)\n- Linode:\n  - [Object Storage - Get Started | Linode](https://www.linode.com/docs/products/storage/object-storage/get-started/)\n  - [Deploy a Static Site using Hugo and Object Storage | Linode](https://www.linode.com/docs/guides/host-static-site-object-storage/)\n- Vultr:\n  - [Vultr Object Storage - Vultr.com](https://www.vultr.com/docs/vultr-object-storage)\n- DreamObjects:\n  - [DreamObjects overview – DreamHost Knowledge Base](https://help.dreamhost.com/hc/en-us/articles/214823108-DreamObjects-overview)\n  - [Installing S3cmd – DreamHost Knowledge Base](https://help.dreamhost.com/hc/en-us/articles/215916627-Installing-S3cmd)\n\nEnvironment variables:\n\n| Name | Description\n| - | -\n| S3_BUCKET | URL in `s3://bucket-name/dir-name/` style\n| S3_HOSTNAME | For example: \u003cbr\u003e `s3-eu-west-1.amazonaws.com` \u003cbr\u003e `nyc3.digitaloceanspaces.com` \u003cbr\u003e `us-east-1.linodeobjects.com` \u003cbr\u003e `ewr1.vultrobjects.com` \u003cbr\u003e `objects-us-east-1.dream.io`\n| AWS_ACCESS_KEY_ID | The access key\n| AWS_SECRET_ACCESS_KEY | The secret key\n\n#### Azure preparation\n\nCreate a service principal on Azure.\n\n- [Create an Azure AD app and service principal in the portal - Microsoft identity platform | Microsoft Docs](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal)\n- [Create an Azure service principal – Azure CLI | Microsoft Docs](https://docs.microsoft.com/en-us/cli/azure/create-an-azure-service-principal-azure-cli)\n\nFor [`azure-cli`](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) :\n\n```console\n$ az login --use-device-code\n$ az ad sp create-for-rbac --role 'Contributor' --name \"${name}\" --scopes \"/subscriptions/${subscription}/resourceGroups/${resourceGroup}/providers/Microsoft.Storage/storageAccounts/${AZURE_STORAGE_ACCOUNT}\"\n\n```\n\nEnvironment variables:\n\n| Name | Description\n| - | -\n| AZ_SP_APPID | Application (client) ID\n| AZ_SP_PASSWORD | Client secret\n| AZ_SP_TENANT | Directory (tenant) ID\n| AZURE_STORAGE_ACCOUNT | Azure storage account\n| AZ_STORAGE_CONTAINER_NAME | Storage container name\n\n### Launch the container\n\n#### Docker\n\nInstall [Docker Engine](https://docs.docker.com/engine/) and use the [`docker compose`](https://docs.docker.com/engine/reference/commandline/compose/) command to manipulate Docker Compose.\n\nCreate a service:\n\n```YAML\n# docker-compose.yml\n\nservices:\n  sl:\n    image: docker.io/pzhlkj6612/streamlink-eplus_jp-object_storage\n    volumes:\n      - ./SL-downloads:/SL-downloads:rw\n      - ./YTDLP:/YTDLP:rw  # edit \"cookies.txt\" in it\n    environment:\n      # base file name; will use a random one if leaving empty.\n      - OUTPUT_FILENAME_BASE=\n\n      # output file name configuration\n      - NO_AUTO_PREFIX_DATETIME=\n      - NO_AUTO_FILESIZE=\n      - NO_AUTO_MD5=\n\n      # Input control\n      # only one input allowed; using file has the highest priority.\n\n      # file\n      # does NOT imply \"NO_AUTO_PREFIX_DATETIME\", \"NO_AUTO_FILESIZE\" and \"NO_AUTO_MD5\".\n      # does imply \"NO_DOWNLOAD_TS\".\n      - USE_EXISTING_MPEG_TS_VIDEO_FILE=\n\n      # proxy for streamlink, yt-dlp and N_m3u8DL-RE\n      - HTTPS_PROXY=http://127.0.0.1:1926  # empty by default.\n\n      # streamlink\n      - STREAMLINK_STREAM_URL=           # enable streamlink.\n      - STREAMLINK_STREAM_QUALITY=       # \"best\" by default.\n      - STREAMLINK_OPTIONS=              # options passed into streamlink after default ones; see https://streamlink.github.io/cli.html\n\n      # yt-dlp\n      - YTDLP_STREAM_URL=      # enable yt-dlp.\n      - YTDLP_OPTIONS=         # options passed into yt-dlp after default ones; see https://github.com/yt-dlp/yt-dlp\n\n      # N_m3u8DL-RE\n      - N_m3u8DL_RE_STREAM_URL=      # enable N_m3u8DL-RE.\n      - N_m3u8DL_RE_OPTIONS=         # options passed into N_m3u8DL-RE after default ones; see https://github.com/nilaoda/N_m3u8DL-RE\n\n      # direct download\n      - VIDEO_FILE_URL=  # download a video file.\n\n      # ffmpeg\n      - GENERATE_STILL_IMAGE_MPEG_TS=  # generate a still image MPEG-TS video.\n\n      # Output control\n      # multiple outputs supported.\n\n      # file\n      - NO_DOWNLOAD_TS=  # do not save the video file. it may not be a MPEG-TS file, but a MKV one.\n\n      # rtmp\n      - RTMP_TARGET_URL=     # enable RTMP streaming.\n      - RTMP_FFMPEG_USE_AAC_ENCODING=      # enable audio re-encoding, otherwise just copy the stream.\n      - RTMP_FFMPEG_USE_LIBX264_ENCODING=  # enable video re-encoding, otherwise just copy the stream.\n      - RTMP_FFMPEG_CRF=     # CRF value for video re-encoding, 23 by default, see https://trac.ffmpeg.org/wiki/Encode/H.264#a1.ChooseaCRFvalue .\n\n      # uploading control\n\n      - ENABLE_S3=           # enable s3cmd.\n      - ENABLE_AZURE=        # enable azure-cli.\n\n      # s3cmd\n      - AWS_ACCESS_KEY_ID=\n      - AWS_SECRET_ACCESS_KEY=\n      - S3_BUCKET=\n      - S3_HOSTNAME=\n      - S3CMD_MULTIPART_CHUNK_SIZE_MB=  # \"--multipart-chunk-size-mb\", 15 by default.\n\n      # azure-cli\n      - AZURE_STORAGE_ACCOUNT=\n      - AZ_SP_APPID=\n      - AZ_SP_PASSWORD=\n      - AZ_SP_TENANT=\n      - AZ_STORAGE_CONTAINER_NAME=\n\n```\n\nRun it:\n\n```console\n$ docker compose up sl\n\n```\n\nFor developers who want to build the image themselves:\n\n```console\n$ docker build --tag ${tag} .\n\n```\n\n#### Podman\n\n[Install Podman](https://podman.io/getting-started/installation). Create a pod and a \"[hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath)\" volume:\n\n```YAML\n# pod.yaml\n\napiVersion: v1\nkind: Pod\nmetadata:\n  name: sl\nspec:\n  volumes:\n    - name: SL-downloads\n      hostPath:\n        path: ./SL-downloads\n        type: Directory\n  restartPolicy: Never\n  containers:\n    - name: sl\n      image: docker.io/pzhlkj6612/streamlink-eplus_jp-object_storage\n      resources: {}\n      volumeMounts:\n        - mountPath: /SL-downloads\n          name: SL-downloads\n      env:\n        # Please refer to the \"Docker\" section.\n        - name: # ...\n          value: # \"...\"\n\n```\n\nFinally, play it:\n\n```console\n$ podman play kube ./pod.yaml  # 開演！\n\n```\n\nFor developers who want to build the image themselves:\n\n```console\n$ podman build --tag ${tag} .\n\n```\n\n## Credits\n\n- Container Technologies:\n  - Open Container Initiative (OCI).\n  - Docker and Docker Compose.\n  - Podman and Kubernetes.\n- Useful open-source programs and tools:\n  - [s3tools/s3cmd](https://github.com/s3tools/s3cmd).\n  - [Azure/azure-cli](https://github.com/Azure/azure-cli).\n  - [streamlink/streamlink](https://github.com/streamlink/streamlink) and [pmrowla/streamlink-plugins](https://github.com/pmrowla/streamlink-plugins).\n  - [yt-dlp/yt-dlp](https://github.com/yt-dlp/yt-dlp)\n  - [nilaoda/N_m3u8DL-RE](https://github.com/nilaoda/N_m3u8DL-RE)\n  - [BtbN/FFmpeg-Builds](https://github.com/BtbN/FFmpeg-Builds).\n  - I used to format my bash shell script with [shell-format - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=foxundermoon.shell-format).\n- Platforms:\n  - AWS, DigitalOcean, Linode, Vultr and DreamHost.\n  - Microsoft Azure.\n  - [Stack Exchange](https://stackexchange.com/) website group.\n  - Linux and Ubuntu.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpzhlkj6612%2Fstreamlink-eplus_jp-object_storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpzhlkj6612%2Fstreamlink-eplus_jp-object_storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpzhlkj6612%2Fstreamlink-eplus_jp-object_storage/lists"}