0

Here are the files; Z05_USEng.m3u8 and Z05_JPJpn.m3u8. I can use the command ffmpeg -i x -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4 , with x being the URL to the m3u8, to download the MP4 data to a file. I can also use VLC to play the stream. What I don't understand is how I can do these two things when all the files contain is

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1696000
Z05_USEng/Z05_USEng.m3u8

(with UsEng being replaced with JpJpn in the second file).

2
  • -vcodec copy -c copy -crf 50 does not make sense. The first option says "copy the video stream", the second option says "copy video, audio, and subtitle streams", and the third option says "use the CRF=50 parameter", which will be used when re-encoding the video with libx264. Do you want to just re-mux? Or re-encode the file? (CRF 50 is horrible quality, not sure where you got that from.)
    – slhck
    Aug 9, 2017 at 12:16
  • that wasn't my command, I just got one from another answer. thanks for the correction.
    – Hiccup
    Aug 9, 2017 at 21:19

2 Answers 2

1

If you follow the contents of the M3U8 file, it lists another M3U8 file, which actually indexes the files to be played:

$ curl https://www.nintendo.co.jp/pikpiksecret/movie/pikmin3_Zmovie_USEng/Z05_USEng/Z05_USEng.m3u8
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1696000
Z05_USEng/Z05_USEng.m3u8

$ curl https://www.nintendo.co.jp/pikpiksecret/movie/pikmin3_Zmovie_USEng/Z05_USEng/Z05_USEng/Z05_USEng.m3u8
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXTINF:10,
Z05_USEng-1.ts
#EXTINF:10,
Z05_USEng-2.ts
#EXTINF:10,
Z05_USEng-3.ts
#EXTINF:8,
Z05_USEng-4.ts
#EXT-X-ENDLIST

These individual MPEG-2 TS files will be downloaded and concatenated based on the second M3U8 file.

Note that

ffmpeg -i <url> -bsf:a aac_adtstoasc -c copy file.mp4

will suffice if you do not want to re-encode the video or audio streams.

1
  • thank you! i didn't realise that was a subdirectory. thanks for the correct command, you are right - I didn't want to reencode the video.
    – Hiccup
    Aug 9, 2017 at 21:26
1

Looks like there are subfolders in that directory with Z05_USEng/Z05_USEng.m3u8 files inside, try looking inside them for clues

1
  • that directory isn't browsable, but I see from slhck's answer that the folder listed in the m3u8 is in fact another folder with the same name inside the folder that the m3u8 is in. thanks anyway.
    – Hiccup
    Aug 9, 2017 at 21:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .