Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

will-it-play

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

will-it-play

I was tired of having local home video files not play on my **Playstation 4**. Now at least I'll know that's the case before I get all the way to the console w/ a flash drive. This is also compatible with **Playstation 5**.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

will-it-play (on a PS5/4)

I was tired of having local home video files not play on my Playstation 4. Now at least I'll know that's the case before I get all the way to the console w/ a flash drive. This is also compatible with Playstation 5.

npm

Installation

yarn global add will-it-play

or using your JS package manager of choice.

You must also have ffmpeg available. Follow these instructions to download it and these to ensure the ffmpeg binary is available at runtime.

Usage

This is best used as a CLI tool:

% will-it-play ~/Desktop/raindrops.mp4
raindrops.mp4: ✅

% will-it-play ~/Desktop/raindrops-bad-video.ogv
raindrops-bad-video.ogv: ❌

There's also detailed mode, which tells you why a video will or won't play:

% will-it-play ~/Desktop/raindrops-bad-video.ogv -d
raindrops-bad-video.ogv: ❌
┌───────────┬────────┬────────┐
│ Factor    │ Value  │ Valid? │
├───────────┼────────┼────────┤
│ video     │ theora │ ⚠️     │
├───────────┼────────┼────────┤
│ audio     │ vorbis │ ⚠️     │
├───────────┼────────┼────────┤
│ extension │ .ogv   │ ❌     │
└───────────┴────────┴────────┘

It can also be used by its' JS/TS API:

import { willItPlay } from 'will-it-play'

willItPlay('~/Desktop/raindrops.mp4').then((result) => {
  if (result.videoWillPlay) {
    console.log('Yes!')
  } else if (result.videoWillPlay === false) {
    console.log('No.')
  } else {
    console.log('Maybe?')
  }
  // detailed info is found at `result.info`
})

See the CLI source for a more complete example of the code usage.

Improvements

There are probably a lot of audio and video codecs you might have files in. If you see a lot of "⚠️" when using this tool and know for sure if the file does or doesn't play, kindly file an issue with that information.

etc

Copyright-free test video provided by this entry on pexels.com.

Keywords

playstaion

FAQs

Package last updated on 26 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts