fawazahmed0 / islamic-project

List of Islamic Projects
2 stars 0 forks source link

Restream iptv m38u with ffmpeg #3

Closed fawazahmed0 closed 2 years ago

fawazahmed0 commented 3 years ago

Bash


PRESET="ultrafast" # ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
SOURCE="http://199.223.252.162:8032/english_adaptive/index.m3u8"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
KEY="xxxx-xxxx-xxxx-xxxx" # Your youtube key. (https://www.youtube.com/live_dashboard > encoder config > name/key)

ffmpeg \
    -re -i "$SOURCE" -vcodec libx264 -preset $PRESET -maxrate 3000k -b:v 2500k \
    -bufsize 600k -pix_fmt yuv420p -g 60 -c:a aac -b:a 160k -ac 2 \
    -ar 44100 -f flv -s 1280x720 "$YOUTUBE_URL/$KEY"

Reference

use github actions