-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twitcasting not working #24868
Comments
It looks like the way I was getting the video is broken now (along with the code to get the m3u8 url). Using the m3u8 url in ffmpeg still produces a broken video file. |
It looks like VLC can play the video and avconv produces a normal file so it looks like an ffmpeg issue of some sort. I'll keep working on the extractor. Is there an established convention for what to do if the output isn't expected to work with mpv/ffmpeg? It seems like there should at least be some sort of warning. A side note this looks like potentially the same underlying issue as #24933 (https://trac.ffmpeg.org/ticket/6191) but I'm not sure. |
About the URLError: it looks like the slashes in the m3u8 URL are escaped with backslashes and urllib is parsing the entire url (without the scheme) as the path, with netloc (host) being returned empty. Removing the backslashes seems to fix this issue but, is it common to have escaped slashes in URLs? Should this be normalized in the sanitize_url function? e.g.: Still, the HLS native downloader doesn't seem to handle the file correctly as it ends up corrupted. I didn't look too much into it, but using ffmpeg (with the |
Did you ever get this working? I tried your pull request but just get URLErrors. |
It also looks like ffmpeg is able to play the files it couldn't before so that issue may be fixed. |
@rivke41levp656 I pushed a change so it can download a video now. That said I tried downloading a video and it was unplayable in mpv and vlc so it looks like there is some new issue. |
It appears to work with |
@Yarn I tried your new commit but get the same results you describe in OP. |
@rivke41levp656 What version of ffmpeg are you using? Try a new version from ffmpeg's site (https://ffmpeg.org/download.html) if you don't have a new version available through your package manager.
I'm on 4.3.1 (the latest stable release). |
@Yarn Indeed my ffmpeg was quite old, didn't consider that. It seems to work now, thanks! |
Checklist
Verbose log
Description
TLDR:
it looks like most of the below doesn't actually need to be addressed since live streams are handled differently and there is an alternative for VODs. I'm planning to make a PR once I get stuff working. I could use guidance on how to handle data coming from a websocket within youtube-dl.Live streams use websockets so as for as I can tell they can't be supported in ytdl, not sure how to support vods anymore without fixing the issue below.
I've fixed the extractor to get the m3u8 file (url changes, can be found in chrome inspector) but I'm still getting broken videos. A video file is created but it does not play back correctly. Manually downloading and concatenating the segments or passing the m3u8 url directly to ffmpeg produces the same result. I've attached one of the resulting files.
out.mp4.zip
For me in mpv the file plays a frame every 6 or 7 seconds. The frames look like they are probably the correct ones for a given time. Audio seems to work (it cuts out in the original video viewed on twitcasting).
During playback mpv gives warnings like
Reset playback due to audio timestamp reset.
andInvalid audio PTS: 0.325500 -> 7.402667
.ffmpeg -i out.mp4 -vn -acodec copy out.aac
produces a mostly playable audio file. mpv gives a warning[ffmpeg/demuxer] aac: Estimating duration from bitrate, this may be inaccurate
when played back.Twitcasting provides mp4 downloads and I modified the extractor to download those
but that doesn't work for live broadcasts. Just checked and it looks like twitcasting uses websockets to transfer live video so I guess it will be a different extractor anyway. I'll see if I can get this working but I have no idea how to integrate that into youtube-dl.ffmpeg logs
Related Issues:
#21225 similar ffmeg output but I do get a playable, if incorrect, file.
The text was updated successfully, but these errors were encountered: