Git Product home page Git Product logo

amazon-music's People

Contributors

jaffa avatar meme avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

amazon-music's Issues

Add support for the MPEG-DASH response

In certain cases (it seems to be non-playlists and modern albums), Amazon will respond with an MPEG-DASH file format. This contains all of the little bits of the song which can be combined to produce the final song. VLC has support for playing and converting to .flac, .ogg, etc. as the returned response includes authentication tokens in the request URL for the audio segment.

Pseudo-code that extracts the manifest object (containing the MPEG-DASH, which can be fed into VLC):

const fs = require('fs')
// ...
const json = // Retrieve the dmls.json response
const manifest = JSON.parse(json).contentResponseList[0].manifest
fs.writeFileSync('example.mpd', manifest)

Then, either use cvlc example.mpd to stream the audio (note that the contentResponseList contains an expiry, so this .mpd will not be usable forever), or use VLC to convert the .mpd to a FLAC file:

#!/bin/bash

vlc -I dummy $1 ":sout=#transcode{vcodec=none,acodec=flac,ab=128,channels=2,samplerate=44100}:std{access=file{no-overwrite},mux=flac,dst=$2}" vlc://quit

And run the following script with: ./script.sh example.mpd example.flac, and VLC will start to download the segments and recombine to produce the DRM-free, distributable, audio file.

Options:

  1. Return the MPEG-DASH file from a function specific for this, then pipe the output to a file to be played by VLC
  2. Use libVLC bindings for Python (do these exist?) to convert the MPEG-DASH in memory (this would be the best solution)

The plan is to break this out into a separate project that is specifically suited for downloading albums and playlists to DRM-free FLAC files on disk (for personal use).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.