Use Youtube-dl With FFmpeg. Examples

Use Youtube-dl With FFmpeg

How to Using youtube-dl with ffmpeg or How to grab YouTube video and re stream as live RTMP stream with FFMPEG

First you need install youtube-dl and ffmpeg last version (because last ffmpeg builds supports https protocol)

Here is examples how to use youtube-dl with ffmpeg

Get YouTube stream parameters:

$ ffmpeg  -i "`youtube-dl -g https://StreamAddress`"

Restream video with h264 transcoding and push as  RTMP to other streamer:

$ ffmpeg -re -i "`youtube-dl -g https://StreamAddress`" -preset medium -acodec aac -strict experimental -ar 44100 -ac 2 -b:a 96k -vcodec libx264 -b:v 1300k -maxrate 2600k -bufsize 2600k -f flv rtmp://Destination_Address:1935/Stream/stream_name

 


arstech

One Comment

  1. Before proceeding installation NVIDIA drivers on Ubuntu you must disable Nouveau kernel driver. To disable the default Nouveau Nvidia driver follow guide. In our case, it’s NVIDIA GP106 Pascal family GPU with NVENC support. Here is Video Encode and Decode GPU Support Matrix. If your GPU supporting NVENC.

Leave a Reply