Question: I want to download HLS videos from a site that needs to be logged in using FFmpeg, meaning I have to enter my username and password to access the videos, and I do not know how to enter the login information through FFmpeg...
Can anyone help me?

Answer: 
First login to site using `puppeteer` or any other automation tool and grab all related cookies.
then use command like that

```
ffplay -cookies "nlqptid=nltid=tsn; path=/; domain=somedomain.com;" http://somedomain.com/somestream.m3u8

```

for more details view [this](https://ffmpeg.org/ffmpeg-protocols.html#HTTP-Cookies) url
As per our knowledge, it's not possible because I am unable to get any method on FFmpeg from where we can set the password.

**Trick:**
you can create a password protucted page and where implemnet video downloads logic like this:
**download.php**

```
<?php
    /* Your password */
    $password = 'MYPASSWORD';

    if (isset($_POST['password']) && $_POST['password'] == $password) {
        // Download video logic here....
        exit;
    }
?>
<!DOCTYPE html>
<html>
<head>
    <title>Password protected</title>
</head>
<body>
    <div style="text-align:center;margin-top:50px;">
        You must enter the password to view this content.
        <form method="POST">
            <input type="text" name="password">
        </form>
    </div>
</body>
</html>

```

[![enter image description here](https://i.stack.imgur.com/Mf50l.png)](https://i.stack.imgur.com/Mf50l.png)