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

Some vids on tv4play.se not working #16650

Closed
jonsag opened this issue Jun 5, 2018 · 9 comments
Closed

Some vids on tv4play.se not working #16650

jonsag opened this issue Jun 5, 2018 · 9 comments

Comments

@jonsag
Copy link

@jonsag jonsag commented Jun 5, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

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

  • I've verified and I assure that I'm running youtube-dl 2018.06.04

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

youtube-dl -o 'Badehotellet.s05e04.%(ext)s' https://www.tv4play.se/program/badhotellet/3961519 --verbose --ignore-config
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-o', u'Badehotellet.s05e04.%(ext)s', u'https://www.tv4play.se/program/badhotellet/3961519', u'--verbose', u'--ignore-config']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.06.04
[debug] Python version 2.7.14 (CPython) - Linux-4.9.95-gentoo-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.4.1
[debug] exe versions: ffmpeg 3.3.6, ffprobe 3.3.6, rtmpdump 2.4
[debug] Proxy map: {}
[debug] Using fake IP 78.70.238.80 (SE) as X-Forwarded-For.
[TV4] 3961519: Downloading video info JSON
[TV4] 3961519: Downloading sources JSON
ERROR: Unable to download JSON metadata: HTTP Error 502: Bad Gateway (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
  File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 579, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2211, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 435, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 548, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 473, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 407, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)

...
<end of log>

Description of your issue, suggested solution and other information

Some sort of change on the site.
https://www.tv4play.se/program/badhotellet/3961172 that worked last week no longer downloads

Plays fine in browser.

Thanks
/jon

@ketoball
Copy link

@ketoball ketoball commented Jun 5, 2018

I have the same problem:

TV>youtube-dl.exe https://www.tv4play.se/program/sj%C3%B6lyckan/3959931
[TV4] 3959931: Downloading video info JSON
[TV4] 3959931: Downloading sources JSON
ERROR: Unable to download JSON metadata: HTTP Error 502: Bad Gateway (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

@jonsag
Copy link
Author

@jonsag jonsag commented Jun 5, 2018

The KODI addon Retrospect has been updated as the tv4 API obviously has changed:
https://bitbucket.org/basrieter/xbmc-online-tv/commits/ce204f98a59547b0132940eb494f1835dcc80640

New API seems to be:
https://playback-api.b17g.net/asset/3961519?service=tv4&device=browser&protocol=hls

It also seems like there is a new format for the subtitles

@Sopor
Copy link

@Sopor Sopor commented Jun 11, 2018

This isn't fixed. The audio is not working. It seems to merge two video streams, DASH and HLS.

@jonsag
Copy link
Author

@jonsag jonsag commented Jun 12, 2018

Works fine for me.
DLd https://www.tv4play.se/program/badhotellet/3961520

Resulted in
$ mediainfo Badehotellet.s05e05.Besøg\ sydfra.mp4
General
Complete name : Badehotellet.s05e05.Besøg sydfra.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 472 MiB
Duration : 44 min 0 s
Overall bit rate mode : Variable
Overall bit rate : 1 501 kb/s
Writing application : Lavf57.71.100

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 44 min 0 s
Bit rate mode : Constant
Bit rate : 1 404 kb/s
Width : 768 pixels
Height : 432 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.169
Stream size : 441 MiB (93%)
Language : English
Color range : Limited

Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : mp4a-40-2
Duration : 44 min 0 s
Bit rate mode : Variable
Bit rate : 93.5 kb/s
Maximum bit rate : 97.5 kb/s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 29.4 MiB (6%)
Language : English
Default : Yes
Alternate group : 1

/jon

@Sopor
Copy link

@Sopor Sopor commented Jun 12, 2018

@jonsag Try download https://www.tv4play.se/program/biggest-loser/3971023

[TV4] 3971023: Downloading video info JSON
[TV4] 3971023: Downloading JSON metadata
[TV4] 3971023: Downloading m3u8 information
[TV4] 3971023: Downloading MPD manifest
WARNING: [TV4] Unknown MIME type application/mp4 in DASH manifest
[TV4] 3971023: Downloading f4m manifest
[TV4] 3971023: Downloading ISM manifest
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 879
[download] Destination: Biggest_loser_-_starkare_tillsammans_del_20.fhls-4698.mp4
[download] 100% of 1.37GiB in 10:53
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 880
[download] Destination: Biggest_loser_-_starkare_tillsammans_del_20.fhls-98.mp4
[download] 100% of 30.25MiB in 01:32
[ffmpeg] Merging formats into "Biggest_loser_-_starkare_tillsammans_del_20.mp4"

I only have sound the first 3 seconds.

@jonsag
Copy link
Author

@jonsag jonsag commented Jun 12, 2018

$ youtube-dl --ignore-config https://www.tv4play.se/program/biggest-loser/3971023
[TV4] 3971023: Downloading video info JSON
[TV4] 3971023: Downloading JSON metadata
[TV4] 3971023: Downloading m3u8 information
[TV4] 3971023: Downloading MPD manifest
WARNING: [TV4] Unknown MIME type application/mp4 in DASH manifest
[TV4] 3971023: Downloading f4m manifest
[TV4] 3971023: Downloading ISM manifest
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 879
[download] Destination: Biggest loser - starkare tillsammans del 20-3971023.fhls-4698.mp4
[download] 100% of 1.37GiB in 02:47
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 880
[download] Destination: Biggest loser - starkare tillsammans del 20-3971023.fhls-98.mp4
[download] 100% of 30.25MiB in 00:28
[ffmpeg] Merging formats into "Biggest loser - starkare tillsammans del 20-3971023.mp4"
ERROR: Conversion failed!

Recieved two files called .mp4. The bigger one with video only, and the smaller one with audio only.

$ mediainfo Biggest\ loser\ -\ starkare\ tillsammans\ del\ 20-3971023.fhls-4698.mp4
General
ID : 16727 (0x4157)
Complete name : Biggest loser - starkare tillsammans del 20-3971023.fhls-4698.mp4
Format : MPEG-TS
File size : 1.37 GiB
Duration : 43 min 54 s
Overall bit rate mode : Variable
Overall bit rate : 4 462 kb/s
FileExtension_Invalid : ts m2t m2s m4t m4s tmf ts tp trp ty

Video
ID : 33 (0x21)
Menu ID : 16727 (0x4157)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.1
Format settings : CABAC / 3 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : 27
Duration : 43 min 55 s
Bit rate mode : Constant
Bit rate : 4 340 kb/s
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.188
Stream size : 1.30 GiB (95%)
Color range : Limited

$ mediainfo Biggest\ loser\ -\ starkare\ tillsammans\ del\ 20-3971023.fhls-98.mp4
General
Complete name : Biggest loser - starkare tillsammans del 20-3971023.fhls-98.mp4
Format : ADTS
Format/Info : Audio Data Transport Stream
File size : 30.2 MiB
Overall bit rate mode : Variable
FileExtension_Invalid : aac aacp adts

Audio
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Bit rate mode : Variable
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 30.2 MiB (100%)

Tried downloading again with my config. Same problem.
Then tried merging the files with:
$ ffmpeg -y -i 'file:NA.NAxNA.NA.fhls-1586.mp4' -i 'file:NA.NAxNA.NA.fhls-98.mp4' -c copy -map '0✌️0' -map '1🅰️0' 'file:NA.NAxNA.NA.temp.mp4'

Some way down
...
[AVBSFContext @ 0x560647e523b0] Error parsing ADTS frame header!
[AVBSFContext @ 0x560647e523b0] Failed to send packet to filter aac_adtstoasc for stream 0
av_interleaved_write_frame(): Invalid data found when processing input
...

Problem with source file, downloading or with the merging of the files?
You should file a new issue, or start watching better shows...

/jon

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Jun 12, 2018

update to FFmpeg 3.2 or newer.

@jonsag
Copy link
Author

@jonsag jonsag commented Jun 12, 2018

I am running 3.3.6

$ ffmpeg
ffmpeg version 3.3.6 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.4.0 (Gentoo 6.4.0-r1 p1.3)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --docdir=/usr/share/doc/ffmpeg-3.3.6/html --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-march=k8 -O2 -pipe' --disable-static --enable-avfilter --enable-avresample --disable-stripping --enable-nonfree --enable-version3 --disable-indev=oss --disable-outdev=oss --enable-version3 --enable-bzlib --enable-runtime-cpudetect --disable-debug --disable-gcrypt --enable-gnutls --disable-gmp --enable-gpl --enable-hardcoded-tables --enable-iconv --enable-lzma --enable-network --enable-openssl --enable-postproc --enable-libsmbclient --enable-ffplay --enable-sdl2 --enable-vaapi --enable-vdpau --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --enable-libdc1394 --disable-libcaca --disable-openal --enable-opengl --enable-libv4l2 --disable-libpulse --enable-libopencore-amrwb --enable-libopencore-amrnb --disable-libfdk-aac --enable-libopenjpeg --enable-libbluray --disable-libcelt --disable-libgme --enable-libgsm --disable-mmal --enable-libmodplug --enable-libopus --disable-libilbc --disable-librtmp --disable-libssh --enable-libschroedinger --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libzvbi --disable-libbs2b --disable-chromaprint --disable-libflite --disable-frei0r --disable-libfribidi --enable-fontconfig --disable-ladspa --enable-libass --enable-libfreetype --disable-librubberband --disable-netcdf --disable-libzmq --disable-libzimg --disable-libsoxr --enable-pthreads --disable-libvo-amrwbenc --enable-libmp3lame --disable-libkvazaar --disable-nvenc --disable-libopenh264 --disable-libsnappy --enable-libtheora --disable-libtwolame --disable-libwavpack --disable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-aesni --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop --cpu=k8 --disable-doc --disable-htmlpages --enable-manpages
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

/jon

@Sopor
Copy link

@Sopor Sopor commented Jun 12, 2018

@jonsag I'm not criticise your choice of shows...

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
4 participants
You can’t perform that action at this time.