Skip to content

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

Description

@Tazeg

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 ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions