Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does'nt download the video but another m3u8 file #28

Open
Tazeg opened this issue May 6, 2019 · 3 comments
Open

Does'nt download the video but another m3u8 file #28

Tazeg opened this issue May 6, 2019 · 3 comments
Labels

Comments

@Tazeg
Copy link

Tazeg commented May 6, 2019

Try this :

const fs = require('fs');
const m3u8stream = require('m3u8stream')

m3u8stream('https://prod-fastly-eu-central-1.video.periscope.tv/Transcoding/v1/hls/rR3sEEtIYIXRbEx5ThxVpftu1BX4T8UN_x8ObMCkkhMy4Bg9F0bnU5nzMQVSfrmqMk0-_tGWcx3niQ9R5-0yxA/non_transcode/eu-central-1/periscope-replay-direct-prod-eu-central-1-public/master_dynamic_16889594913756400541.m3u8?type=replay').pipe(fs.createWriteStream('videofile.mp4'));

It downloads another m3u8 file but not the video.
As i understand that's because the given url contains several type of videos :

#EXTM3U
#EXT-X-DYNAMICALLY-GENERATED
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=500000,RESOLUTION=480x270, CODECS="avc1.640015,mp4a.40.2"
/Transcoding/v1/hls/rR3sEEtIYIXRbEx5ThxVpftu1BX4T8UN_x8ObMCkkhMy4Bg9F0bnU5nzMQVSfrmqMk0-_tGWcx3niQ9R5-0yxA/transcode/eu-central-1/periscope-replay-direct-prod-eu-central-1-public/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsInZlcnNpb24iOiIyIn0.eyJIZWlnaHQiOjI3MCwiS2JwcyI6NTAwLCJXaWR0aCI6NDgwfQ.0PLzHwJpzC4wA_jNo8XOma8zOx8uPmEDTD3WKSRLYOA/playlist_16889594913756400541.m3u8?type=replay
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1000000,RESOLUTION=848x480, CODECS="avc1.64001e,mp4a.40.2"
/Transcoding/v1/hls/rR3sEEtIYIXRbEx5ThxVpftu1BX4T8UN_x8ObMCkkhMy4Bg9F0bnU5nzMQVSfrmqMk0-_tGWcx3niQ9R5-0yxA/transcode/eu-central-1/periscope-replay-direct-prod-eu-central-1-public/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsInZlcnNpb24iOiIyIn0.eyJIZWlnaHQiOjQ4MCwiS2JwcyI6MTAwMCwiV2lkdGgiOjg0OH0.RFzmPpRYVt-M5xPGoWoifZwAR5Wj0QbokQ2FVsxVt9c/playlist_16889594913756400541.m3u8?type=replay
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2000000,RESOLUTION=1280x720, CODECS="avc1.64001f,mp4a.40.2"
/Transcoding/v1/hls/rR3sEEtIYIXRbEx5ThxVpftu1BX4T8UN_x8ObMCkkhMy4Bg9F0bnU5nzMQVSfrmqMk0-_tGWcx3niQ9R5-0yxA/transcode/eu-central-1/periscope-replay-direct-prod-eu-central-1-public/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsInZlcnNpb24iOiIyIn0.eyJIZWlnaHQiOjcyMCwiS2JwcyI6MjAwMCwiV2lkdGgiOjEyODB9.RYzh5rWQLNy-ZB1zO_EREmt9fkjSnJS2If9o7Ls4vOM/playlist_16889594913756400541.m3u8?type=replay
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=4000000,RESOLUTION=1280x720, CODECS="avc1.64001f,mp4a.40.2"
/Transcoding/v1/hls/rR3sEEtIYIXRbEx5ThxVpftu1BX4T8UN_x8ObMCkkhMy4Bg9F0bnU5nzMQVSfrmqMk0-_tGWcx3niQ9R5-0yxA/transcode/eu-central-1/periscope-replay-direct-prod-eu-central-1-public/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsInZlcnNpb24iOiIyIn0.eyJIZWlnaHQiOjcyMCwiS2JwcyI6NDAwMCwiV2lkdGgiOjEyODB9._lwcUhHeo_ZcTvj7C11_mnFYldhjIywdpF0kk3OHkBE/playlist_16889594913756400541.m3u8?type=replay

Can you set by default to get for example the first one ?

@fent
Copy link
Owner

fent commented May 7, 2019

This module only works on media m3u8 playlists, not master playlists. There is a note about this in the readme

https://github.com/fent/node-m3u8stream#limitations

@fent fent closed this as completed May 7, 2019
@fent fent added the invalid label May 7, 2019
@Tazeg
Copy link
Author

Tazeg commented Jul 10, 2019

In this case could you fire an event or an error so that i can manage with another way ?

@fent fent added the feature label Jul 10, 2019
@fent
Copy link
Owner

fent commented Jul 10, 2019

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants