npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

youtube-live-streaming

v1.0.4

Published

This is a simple node js code to create live streaming on YouTube 24/7 hours with ffempg

Downloads

65

Readme

Publish package nodejs

youtube-live-streaming

This is a simple node js code to create live streaming on YouTube 24/7 hours with ffempg

Using NPM for simple and dev any code

using npm js

Just Need To Install Modules ffmpeg and enjoy with simple command :

Npmjs : https://www.npmjs.com/package/youtube-live-streaming

Firts one :

sudo apt update
sudo apt install ffmpeg

Step 2 :

Install Node js

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs

Create file index.mjs And Install module using this In terminal :

npm i youtube-live-streaming

And Paste This Simple Code to your File index.mjs :

import youtube from "youtube-live-streaming";

const api = "jwze-rrs-tmwd-pwaz-a5m5"; //change with your streamkey
const video = "hajilok.mov"; //change with your video file name or video link 
const audio = "https://stream.zeno.fm/ez4m4918n98uv"; //change with your mp3 link or audio file name  

youtube(api, video, audio);

or

import youtube from "youtube-live-streaming";

const data = {
   api: "jwze-rrs-tmwd-pwaz-a5m5",
   video: "hajilok.mov",
   audio: "https://stream.zeno.fm/ez4m4918n98uv",
}

youtube(data.api, data.video, data.audio);

Save You file and run in terminal with node index.mjs

Note : if not working or show any error plz ignore , check in youtube for your livestreaming is working or not because is module need any developetment , you can contribute with me

plz install express js and ffmpeg in your sistem if need using this module

Link Github : https://github.com/hajilok/youtube-live-streaming

Example in this case, I Using Codespace on github For Start Livestream

proft livestream menggunakan node js

In case I will try to deploy and run livestreaming wit render

in the case deply with render

in case i using cirleci ci/D for streaming in my youtube channel

cirleci streaming yt

In case I Will Create Livestreaming Radio Ncs Song With Gitlab CI/CD

deploy with gitlab

And Finally With Bitbucket Pipelines :

create livestreaming with bitbucked

Is proof Live streaming with this Project with render hosting and run 24 hours nonstop if my render is not suck 😂

Link Live Youtube for result of this project and listening music ncs : https://www.youtube.com/live/PfrvJBagIUc?si=LnTiU2CAAoo8LonV

Tutorial How To Use and Deploy To Render Hosting :

Clichttps://www.youtube.com/live/PfrvJBagIUc?si=LnTiU2CAAoo8LonVhttps://www.youtube.com/live/PfrvJBagIUc?si=LnTiU2CAAoo8LonVk Link This :

https://www.youtube.com/watch?v=0oz94rCzf7A

Deploy On

Deploy to Render Deploy

If Need Depploy to render or any hosting using main.js file and edit on line 7 for your video art content like lofi girl and plz add your .env if you need to deploy on render or any hosting

Example

 streamkey = " " your screet key live in youtube

In This You can get Stream Key On Youtube

kuncistrey

Note :

in this repository , you dont not need audio lofi because me have add in default with link audio lofi if you need livestream with content 24/7 hours nonstop lofi hiphop

update command ffmpeg in vaiabel " command " with your command ffmpeg for better result and any content live streaming never working

How To Deploy or using this Projects :

Deploy Using CirlecI Ci/D

This A simple , Just Need too Fork this project and Copy this Yaml File and paste : :

version: 2.1

jobs:
  build:
    machine:
      image: ubuntu-2204:2023.10.1
    steps:
      - checkout
      - run: sudo apt-get update -y  && sudo apt-get install nodejs -y

      - run:
          name: cloning github
          command: git clone https://github.com/hajilok/youtube-live-streaming && cd youtube-live-streaming 
      
      - run:
          name: Install Node.js dependencies
          command: npm install
      
      # Store .env file
      - run:
          name: Store .env file
          command: echo 'streamkey=jtze-r9se-tm7d-p8yez-a5m5' > .env

      # Run your Node.js app
      - run:
          name: Run Your Node.js App
          command: node main.js  # Replace with your Node.js application's entry point


workflows:
  version: 2
  build-deploy:
    jobs:
      - build

Note : jtze-r9se-tm7d-p8yez-a5m5 Replace With your key streaming in Youtube

Deploy With Gitlab CI/CD :

This A simple , Fork My Gitlab Repository and Copy This Yaml File and Paste to Editor Pipeline

Links Gitlab Repository : https://gitlab.com/yukikatodo/youtube-live-streaming

stages:
 - build

variables:
 STREAM_KEY: jwze-r5ss-tm8d-p0az-a5d3

before_script:
 - apt-get update -y
 - apt-get install -y ffmpeg
 - apt-get install -y nodejs
 - apt-get install -y npm
 - npm install


build:
 stage: build
 script:
   - echo "streamkey=$STREAM_KEY" > .env
   - node main.js

In Variabels Stream Key Replace with Your streamkey in youtube

Deploy With Bitbucket Pipelines CI/CD :

Link Bitbucket : https://bitbucket.org/gohashindi/youtube-live-streaming

Simple You Need To Fork This Link Bitbucket And Edit In Pipelines Yaml With This :

#  Template NodeJS build

#  This template allows you to validate your NodeJS code.
#  The workflow allows running tests and code linting on the default branch.

image: ubuntu

pipelines:
  default:
    - parallel:
        - step:
            name: Build and Test
            deployment: production
            caches:
              - node
            script:
              - apt-get update -y 
              - apt-get install ffmpeg -y
              - apt-get install nodejs npm -y
              - echo "streamkey=jwze-r5ss-tm8d-p0az-a5d3" > .env
              - npm install
              - node main.js
        

Replace This jwze-r5ss-tm8d-p0az-a5d3 Your Stream Key in youtube

Deploy Manual on Your Os system

Requirement

ffmpeg
node js with new version

How To Install :

Note : On build command on render or any hosting site using node main.js

sudo su - 
apt install ffmpeg ( install if you dont have ffmpeg in your system or you using codespace in github you need to install with this command on terminal with user root  )
npm install ( to install any package required on node js in codespace auto installing )
node main.js or  node index.js