Skip to content

Aria2c M3u8 · Instant & Trusted

Many streams require authentication. Save headers to a file (headers.txt):

Referer: https://example.com/video-page
User-Agent: Mozilla/5.0 ...
Cookie: sessionid=abc123

Then use:

aria2c --header="Referer: https://example.com" \
       --header="Cookie: sessionid=abc123" \
       -i segment_list.txt -j 16

For a fully automated approach, use this script: aria2c m3u8

#!/bin/bash
M3U8_URL="$1"
OUTPUT_NAME="video"

aria2c saves a control file (.aria2). Just rerun the same command; it resumes automatically.

First create a file list for ffmpeg:

for f in ./ts_segments/*.ts; do echo "file '$f'" >> merge.txt; done

Then merge:

ffmpeg -f concat -safe 0 -i merge.txt -c copy output.mp4

You now have a single MP4 file.

After downloading seg_001.ts, seg_002.ts, …, merge them:

# On Linux/macOS
cat ./video/*.ts > output.ts

rm -rf ./segments

All Rights Reserved © 2026 Ivory Line.P.A. · Registered Office: Via dei Pini, 32 · 31033 – Castelfranco Veneto (TV) · ITALY.
P.IVA/VAT/C.F.: 05142580264 – Iscrizione C.C.I.A.A. Treviso N. 05142580264 · Capitale sociale: Euro 1.500.000 i.v. · Iscrizione R.E.A. N. 427910.