Skip to content
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

While watching streams on twitch, the first few seconds are repeated once #10421

Closed
dragons4life opened this issue Aug 24, 2016 · 11 comments
Closed

Comments

@dragons4life
Copy link

@dragons4life dragons4life commented Aug 24, 2016

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.08.24. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • [x ] I've verified and I assure that I'm running youtube-dl 2016.08.24

Before submitting an issue make sure you have:

  • [x ] At least skimmed through README and most notably FAQ and BUGS sections
  • [x ] Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • [x ] Bug report (encountered problems with youtube-dl)

Description of your issue, suggested solution and other information

Basically the first few seconds of the stream repeat themselves once.

https://i.lithi.io/cfXu.webm

It works fine if you use livestreamer however.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 24, 2016

This should be addressed to mpv developers.

@dstftw dstftw closed this Aug 24, 2016
@dragons4life dragons4life changed the title While watching streams on twitch, the first few seconds are repeated once time. While watching streams on twitch, the first few seconds are repeated once Aug 24, 2016
@dragons4life
Copy link
Author

@dragons4life dragons4life commented Aug 24, 2016

Are you sure, it's not youtube-dl? because livestreamer works perfectly fine.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 24, 2016

livestreamer runs videoplayer on its own. Here you don't run youtube-dl directly. Instead you run mpv that somehow runs youtube-dl. Even with this approach it plays fine for me in mpv.

@dragons4life
Copy link
Author

@dragons4life dragons4life commented Aug 24, 2016

Since using help, or looking trough the options didn't give me a result on how to play videos on certain players.

I will go ahead and ask if you know the right command for it, I've look trough google and it seems that

I used youtube-dl http://twitch.tv/godglove | "C:\mpv\mpv.exe" based on google results, but it gives me

$ youtube-dl http://twitch.tv/godglove | "C:\mpv\mpv.exe" Traceback (most recent call last): File "__main__.py", line 19, in <module> File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\__init__.py", line 433, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\__init__.py", line 423, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\YoutubeDL.py", line 1786, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\YoutubeDL.py", line 691, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\common.py", line 347, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\twitch.py", line 406, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\twitch.py", line 55, in _call_api File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\common.py", line 539, in _download_json File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\common.py", line 507, in _download_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\common.py", line 414, in _download_webpage_handle File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\common.py", line 384, in _request_webpage File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\extractor\common.py", line 564, in to_screen File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\YoutubeDL.py", line 448, in to_screen File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\YoutubeDL.py", line 462, in to_stdout File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\YoutubeDL.py", line 451, in _write_string File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp3vpw27pc\build\youtube_dl\utils.py", line 1314, in write_string OSError: [Errno 22] Invalid argument Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='cp1252'> OSError: [Errno 22] Invalid argument

on CMD.

Looking at it from here, it's looking in "c:\users\dst" but there is no such directory.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 24, 2016

youtube-dl -o - URL | mpv -.

@dragons4life
Copy link
Author

@dragons4life dragons4life commented Aug 24, 2016

`` youtube-dl -o - http://twitch.tv/goldglove | mpv
mpv git-6980575 (C) 2000-2016 mpv/MPlayer/mplayer2 projects
built on Tue Aug 23 10:05:22 BST 2016
ffmpeg library versions:
libavutil 55.28.100
libavcodec 57.48.101
libavformat 57.41.100
libswscale 4.1.100
libavfilter 6.47.100
libswresample 2.1.100
ffmpeg version: 3.1.2

Usage: mpv [options] [url|path/]filename

Basic options:
--start= seek to given (percent, seconds, or hh:mm:ss) position
--no-audio do not play sound
--no-video do not play video
--fs fullscreen playback
--sub-file= specify subtitle file to use
--playlist= specify playlist file

--list-options list all mpv options

[twitch:stream] goldglove: Downloading stream JSON
[twitch:stream] goldglove: Downloading channel access token
[twitch:stream] goldglove: Downloading m3u8 information
[download] Destination: -
ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, hls,applehttp, from 'https://video-edge-8fa440.jfk03.hls.ttvnw.net/hls75/goldglove_22977895632_505387079/chunked/index-live.m3u8?token=id=2322442575789030747,bid=22977895632,exp=1472094198,node=video-edge-8fa440.jfk03,nname=video-edge-8fa440.jfk03,proto=https,fmt=chunked&sig=d34c4af5df9da662b9b86d88a1118fdca0454f0e':
Duration: N/A, start: 10890.933000, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 116 kb/s
Stream #0:1: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709/bt709/iec61966-2-1), 1280x720, 60 fps, 60 tbr, 90k tbn, 120 tbc
Stream #0:2: Data: timed_id3 (ID3 / 0x20334449)
Output #0, mpegts, to 'pipe:':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720, q=2-31, 60 fps, 60 tbr, 90k tbn, 90k tbc
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 116 kb/s Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Invalid argument
Error writing trailer of pipe:: Invalid argumentframe= 4 fps=0.0 q=-1.0 Lsize=
153kB time=00:00:00.05 bitrate=25051.1kbits/s speed=N/A
video:160kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!

ERROR: ffmpeg exited with code 1 ``

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 24, 2016

Read closely what I post.

@dragons4life
Copy link
Author

@dragons4life dragons4life commented Aug 24, 2016

Yes, you definitely wrote more than a command line command telling me to only change the URL text for the URL.

Or add the path to where mpv is at the end too, or maybe remove mpv for the mpv path. ( which I did )

So detailed. how can anyone go wrong, by guessing.

`` youtube-dl -o - http://twitch.tv/goldglove | mpv "c:/mpv/mpv.exe"
Playing: c:/mpv/mpv.exe
[ffmpeg/demuxer] nut: Error stream_count is (0)
[ffmpeg/demuxer] nut: No main startcode found.
[lavf] avformat_open_input() failed
[ffmpeg/demuxer] nut: Error stream_count is (0)
[ffmpeg/demuxer] nut: No main startcode found.
[lavf] avformat_open_input() failed
Failed to recognize file format.

Exiting... (Errors when loading file)
[twitch:stream] goldglove: Downloading stream JSON
[twitch:stream] goldglove: Downloading channel access token
[twitch:stream] goldglove: Downloading m3u8 information
[download] Destination: -
ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
[mpegts @ 000001c196188020] Could not find codec parameters for stream 1 (Video: h264 ([27][0][0][0] / 0x001B), none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[hls,applehttp @ 000001c1939a2900] Could not find codec parameters for stream 1 (Video: h264 ([27][0][0][0] / 0x001B), none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, hls,applehttp, from 'https://video-edge-a253d0.jfk03.hls.ttvnw.net/hls75/goldglove_22977895632_505387079/chunked/index-live.m3u8?token=id=6631670748439843762,bid=22977895632,exp=1472095143,node=video-edge-a253d0.jfk03,nname=video-edge-a253d0.jfk03,proto=https,fmt=chunked&sig=da7f92be7844783ba27f27f9136fbf24ac1b03fc':
Duration: N/A, start: 11820.831667, bitrate: 135 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 135 kb/s
Stream #0:1: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k tbn, 180k tbc
Stream #0:2: Data: timed_id3 (ID3 / 0x20334449)
Output #0, mpegts, to 'pipe:':
Metadata:
encoder : Lavf57.25.100
Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 135 kb/s Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Invalid argument
Error writing trailer of pipe:: Invalid argumentsize= 4kB time=00:00:00.23 bitrate= 134.6kbits/s speed=N/A
video:0kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 25.772539%
Conversion failed!

ERROR: ffmpeg exited with code 1 ``

This one gives the same error as the one I used before, except for this time.

It's okay though, I think I know what the problem is, so you can remove the label if you want to.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 24, 2016

Yes, you definitely wrote more than a command line command telling me to only change the URL text for the URL.

And you even failed to copy paste it correctly without omitting trailing -.

@dragons4life
Copy link
Author

@dragons4life dragons4life commented Aug 24, 2016

Well, I am sadden to tell you, that I tried it without removing that.

still the same error, but like I said, I think I know why it's doing it, so you can completely close the issue now.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Aug 24, 2016

Post the log of exactly this command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.