chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 585 forks source link

Set FFMPEG Location and Pull Video Metadata? #1568

Closed aravindp-git closed 6 years ago

aravindp-git commented 7 years ago

How would I set the location of ffmpeg.exe? Also, does Livestreamer support video metadata? Specifically YouTube, like automatically applying the title of the video as the title of the downloaded file?

intact commented 7 years ago

Specifically YouTube, like automatically applying the title of the video as the title of the downloaded file?

You can use youtube-dl

aravindp-git commented 7 years ago

I made this post.

flijloku commented 7 years ago

About title: https://github.com/rg3/youtube-dl/blob/master/README.md#output-template Example bat-file: @ @echo off youtube-dl https://www.youtube.com/watch?v=FVyMAyvCP3c --get-filename > info.txt set /p param=<"info.txt" Echo Title:%param% del info.txt pause

aravindp-git commented 7 years ago

Right..... So I would need to change the URL in the bat file every time. Can I at least set the ffmpeg location?

flijloku commented 7 years ago

I use "nircmd.exe" to assign variable values from the clipboard. Example here: https://github.com/chrippa/livestreamer/issues/1558#issuecomment-268737505 Here is another example of use: @echo off chcp 1251 >nul set p=E:\VODs\ set ls=C:\Program Files (x86)\Livestreamer\livestreamer.exe set yd=C:\youtube-dl\youtube-dl.exe set mkv=C:\mkvtoolnix-64bit-8.1.0\mkvtoolnix\mkvmerge.exe set l=language set to=track-order set o=output for /f "usebackq delims=" %%A in ("twitch.txt") do ( setlocal enabledelayedexpansion for /f "delims=" %%i in ('!yd! %%A --get-filename -o "%%(title)s-%%(id)s"') do set n=%%i for /f "delims=" %%N in ("Обработка вода: '!n!'") do >nul chcp 866& echo.%%N "!ls!" --!o! "!p!!n!.ext" --hls-segment-threads 10 %%A best "!mkv!" --ui-!l! en --!o! ^"!p!!n!.mp4^" --!l! 0:und --!l! 1:und ^"^(^" ^"!p!!n!.ext^" ^"^)^" --!to! 0:1,0:0 del *.ext endlocal ) pause

This bat-file and twitch.txt(with URL list) must be placed in the download folder.