SoMuchForSubtlety / f1viewer

🏎️ TUI for F1TV
GNU General Public License v3.0
753 stars 66 forks source link

My player cannot read the m3u8 #13

Closed Oinie closed 5 years ago

Oinie commented 5 years ago

I do not know why it no longer works. F1viewer can get the m3u8 file easily but my video player cannot connect to the server of liberty.

this happens on pretty much any video in 2019, some in 2018. But for instance the padock pass plays well. I tried on two different computers with different ISPs and I disable the windows firewall. this is the data.m3u8 i try to play

in my player, I paste also the ''FullStreamURL'' of the stream i seek but that fails too. i try one fo the URL written in the m3u8 file directly, and it fails too.

I also try with the MPV player and the data stream is played

I also tried on portable vlc, VLCPortable_3.0.7.paf stock settings and it does not work. I can play other m3u8 files non-related to f1 without problem.

SoMuchForSubtlety commented 5 years ago

Yea F1TV changed their infrastructure so now you need a cookie to play some videos. Just the downloaded .m3u8 isnt enought anymore.

What player do you use? maybe I can find a solution for you.

Oinie commented 5 years ago

okay i jsut saw that here is my config file

{
    "preferred_language": "de",
    "check_updates": true,
    "custom_playback_options": [
        {
            "title": "Play with MPV custom",
            "commands": [
                ["mpv", "$url", "--alang=de"]
            ],
            "watchphrase": "Video",
            "command_to_watch": 0,
        "title": "save cookie",
        "commands": [
            ["cookie.bat", "$cookie", "$file"]
        ]
        }
    ]
}

and with the cookie.bat the cookie.txt is created. then i download the m3u8 and I use my player to play ti and it works.

I would like to create an entry in the f1viewer to directly launch the stream in MPV with the quality and audio I like and add an entry for the same quality and audio but with a custom player.

however, for MPV, I do not know how to select a quality of a stream.

And when i add my custom player, the f1viewer does not load the config.json. [so f1viewer displays the usual options, MPV+m3u8+the new option ''GET URL'', but not the custom options]

here is my config file which fails to load...

{
    "preferred_language": "de",
    "check_updates": true,
    "custom_playback_options": [
        {
            "title": "Play with MPV custom",
            "commands": [
                ["mpv", "$url", "--alang=de"]
            ],
            "title": "Play with custom player",
            "commands": [
                ["C:\Program Files (x86)\myplayer.exe", "$url", "--alang=de"]
            ],
            "watchphrase": "Video",
            "command_to_watch": 0,
        "title": "save cookie",
        "commands": [
            ["cookie.bat", "$cookie", "$file"]
        ]
        }
    ]
}

also, i need to launch f1viewer with the ''-d'' option (via a shortcut), otherwise if I click directly on the exe, it ignores the config file.

SoMuchForSubtlety commented 5 years ago

["C:\Program Files (x86)\myplayer.exe", "$url", "--alang=de"] The issue is probably the backslashes acting as escape characters. Try this instead: ["C:\\Program Files (x86)\\myplayer.exe", "$url", "--alang=de"]

Additionally you don't need to download the cookie if you don't do anything with it. MPV get's the cookie on it's own when you give it the $url.

Oinie commented 5 years ago

I tried the double slash \ but the option is not listed (but this time, option ''cookie'' is listed)

β”œβ”€β”€Main Feed β”‚ β”‚β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€save cookie β”‚ β”‚β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€Play with MPV β”‚ β”‚β”‚ β”‚ β”‚ β”‚ β”œβ”€β”€Download .m3u8 β”‚ β”‚β”‚ β”‚ β”‚ β”‚ └──GET URL

my config:

            "title": "Play with VLC custom",
            "commands": [
                ["D:\\pgm\\VLCPortable\\VLCPortable.exe", "$url", "--alang=de"]
            ],
SoMuchForSubtlety commented 5 years ago

Paste your config.json here and see if you get any errors. https://jsonlint.com/

Also try using this snapshot version of F1Viewer and tell me what the log.txt says

Oinie commented 5 years ago

okay it works now, my error was that the custom player was nested in the generic MPV command.

THere are 2 problems now: -first the player loads a video of length 2 minutes or so, then the player starts caching more minutes. i have to change the quality of the video (to anything) to get the 1h long video [actually that's true for the videos for 2018, not 2019]

-the other problem is that there are no sound at all whereas when MPV plays it, the sound is here . Same thing with ''youtube-dl'' option from the stock ''sample-config'' [but the .mp4 downloaded locally does not have th audio track]

here is my file

{
    "preferred_language": "fr",
    "check_updates": true,
    "live_retry_timeout": 60,
    "custom_playback_options": [
        {
            "title": "Play with MPV custom",
            "commands": [
                ["mpv", "$url", "--alang=de"]
            ],
            "watchphrase": "Video",
            "command_to_watch": 0
        },
        {
            "title": "download with youtube-dl and play with MPV",
            "concurrent": true,
            "commands": [
                ["youtube-dl", "$url"],
                ["mpv", "$url"]
            ],
            "watchphrase": "100%",
            "command_to_watch": 0
        },
        {
        "title": "save cookie",
        "commands": [
            ["cookie.bat", "$cookie", "$file"]]},
{
            "title": "download with POT-dl and play with MPV",
            "concurrent": false,
            "commands": [
                ["C:\\Program Files (x86)\\PlayerMini.exe", "$url"]
                ],
            "watchphrase": "100%",
            "command_to_watch": 0
        }
    ]
}
SoMuchForSubtlety commented 5 years ago

Incorrect video length and no sound is an issue with the player you use (I assume VLC?) I can't do anything about that.

To download videos take a look at ffmpeg. It is very powerful and you can select all or just one audio track.