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

[TVer] insufficient/improper titles for some videos #28418

Closed
5 tasks done

Comments

@ghost
Copy link

ghost commented Mar 12, 2021

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2021.03.03
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

Example 1.

$ youtube-dl --ignore-config -v --hls-prefer-native -f worst -o '%(title)s.%(ext)s' https://tver.jp/corner/f0069218 
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '-v', '--hls-prefer-native', '-f', 'worst', '-o', '%(title)s.%(ext)s', 'https://tver.jp/corner/f0069218']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.03.03
[debug] Python version 3.9.2 (CPython) - macOS-10.12.6-x86_64-i386-64bit
[debug] exe versions: ffmpeg N-101345-g3072438, ffprobe N-101345-g3072438, phantomjs 2.1.1
[debug] Proxy map: {}
[TVer] Downloading JSON metadata
[TVer] f0069218: Downloading JSON metadata
[FujiTVFODPlus7] 2359810114: Downloading m3u8 information
[debug] Invoking downloader on 'https://fod-plus7.hls.wseod.stream.ne.jp/www08/fod-plus7/_definst_/mp4:video/01234/2359/2359810114me1104e46.mp4/chunklist.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 180
[download] Destination: #114「鉄拳7」.m3u8
[download] 100% of 76.40MiB in 00:43
[debug] ffmpeg command line: ffprobe -show_streams 'file:#114「鉄拳7」.m3u8'
[ffmpeg] Fixing malformed AAC bitstream in "#114「鉄拳7」.m3u8"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:#114「鉄拳7」.m3u8' -c copy -f mp4 -bsf:a aac_adtstoasc 'file:#114「鉄拳7」.temp.m3u8'
$ ls -1
#114「鉄拳7」.m3u8

Example 2.

$ youtube-dl --ignore-config -v --hls-prefer-native -f worst -o '%(title)s.%(ext)s' https://tver.jp/corner/f0068870
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '-v', '--hls-prefer-native', '-f', 'worst', '-o', '%(title)s.%(ext)s', 'https://tver.jp/corner/f0068870']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2021.03.03
[debug] Python version 3.9.2 (CPython) - macOS-10.12.6-x86_64-i386-64bit
[debug] exe versions: ffmpeg N-101345-g3072438, ffprobe N-101345-g3072438, phantomjs 2.1.1
[debug] Proxy map: {}
[TVer] Downloading JSON metadata
[TVer] f0068870: Downloading JSON metadata
[FujiTVFODPlus7] 3291810202: Downloading m3u8 information
[debug] Invoking downloader on 'https://fod-plus7.hls.wseod.stream.ne.jp/www08/fod-plus7/_definst_/mp4:video/01234/3291/3291810202me110acee.mp4/chunklist.m3u8'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 50
[download] Destination:  .m3u8
[download] 100% of 20.57MiB in 00:11
[debug] ffmpeg command line: ffprobe -show_streams 'file: .m3u8'
[ffmpeg] Fixing malformed AAC bitstream in " .m3u8"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file: .m3u8' -c copy -f mp4 -bsf:a aac_adtstoasc 'file: .temp.m3u8'
$ ls -1
 .m3u8

Description

youtube-dl generates insufficient/improper titles for videos under https://tver.jp/cx .
For the above example 1, the title should be like 'いいすぽ! #114「鉄拳7」', but youtube-dl generates '#114「鉄拳7」' (only the episode part), and for the above example 2, the title should be 'きょうのわんこ', but youtube-dl generates ' ' (only a whitespace).

This line https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/extractor/tver.py#L51 'title': main.get('subtitle') or main['title'], could be improved to something like:
if main.get('subtitle') exists and not only whitespaces, then the title should be
main['title'] + delim + main.get('subtitle')
where delim be ' ' (a whitespace) or preferably '\u3000' (IDEOGRAPHIC SPACE), and
if main.get('subtitle') doesn't exist or only whitespaces, then the title should be
main['title']
which improves the above example 1 and 2 accordingly.

github-actions bot added a commit to hellopony/youtube-dl that referenced this issue Mar 12, 2021
* https://github.com/ytdl-org/youtube-dl:
  [pinterest] reduce the number of HLS format requests
  [peertube] improve thumbnail extraction(closes ytdl-org#28419)
  [tver] improve title extraction(closes ytdl-org#28418)
  [fujitv] fix HLS formats extension(closes ytdl-org#28416)
This was referenced Mar 15, 2021
leshasmlesha pushed a commit to leshasmlesha/youtube-dl that referenced this issue Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment