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

Patch: DCSubtitle support (not supported by FFmpeg) #20352

Closed
forthrin opened this issue Mar 14, 2019 · 1 comment
Closed

Patch: DCSubtitle support (not supported by FFmpeg) #20352

forthrin opened this issue Mar 14, 2019 · 1 comment
Labels

Comments

@forthrin
Copy link

@forthrin forthrin commented Mar 14, 2019

FFmpeg does not support converting of the DCSubtitle format used on at least on site (Viafree), causing subtitle conversion to fail with an error.

$ youtube-dl --verbose --write-sub --sub-lang no --convert-subtitles srt -o "%(title)s.%(ext)s" https://www.viafree.no/programmer/underholdning/black-widows/sesong-1/episode-1
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--verbose', u'--write-sub', u'--sub-lang', u'no', u'--convert-subtitles', u'srt', u'-o', u'%(title)s.%(ext)s', u'https://www.viafree.no/programmer/underholdning/black-widows/sesong-1/episode-1']
[debug] Encodings: locale UTF-8, fs utf-8, out utf8, pref UTF-8
[debug] youtube-dl version 2019.04.30
[debug] Python version 2.7.16 (CPython) - Darwin-16.7.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3, rtmpdump 2.4
[debug] Proxy map: {}
[Viafree] episode-1: Downloading webpage
[debug] Using fake IP 84.213.87.216 (NO) as X-Forwarded-For.
[mtg] 701057: Downloading video JSON
[mtg] 701057: Downloading streams JSON
[mtg] 701057: Downloading m3u8 information
[mtg] 701057: Downloading f4m manifest
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: Black Widows - Ep. 1.no.xml
[debug] Invoking downloader on u'https://mtgxno04-vh.akamaihd.net/i/open/20xxxxxx/2026xxxx/202689xx/20268968/e1ac784ca167cf95ece3e93d9b2c23b1_20268968_,225,512,908,1400,2000,3500,.mp4.csmil/index_5_av.m3u8?null=0&id=AgBU0TVjVNANPPa80lwKzXdzDVFusH50SozUjT4RobYP%2frCDnYnwex6JiYwTALm707%2fo9Vtao82XwQ%3d%3d&hdntl=exp=1557401206~acl=%2f*~data=hdntl~hmac=11477aa66190af94b722fa651537fd2d46b635e35e40242cf3e92a5089f2bf15'
[download] Black Widows - Ep. 1.mp4 has already been downloaded
[download] 100% of 1.03GiB
[debug] ffmpeg command line: ffprobe -show_streams 'file:Black Widows - Ep. 1.mp4'
[ffmpeg] Fixing malformed AAC bitstream in "Black Widows - Ep. 1.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Black Widows - Ep. 1.mp4' -c copy -f mp4 '-bsf:a' aac_adtstoasc 'file:Black Widows - Ep. 1.temp.mp4'
[ffmpeg] Converting subtitles
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Black Widows - Ep. 1.no.xml' -f srt 'file:Black Widows - Ep. 1.no.srt'
ERROR: file:Black Widows - Ep. 1.no.xml: Invalid data found when processing input
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2054, in post_process
    files_to_delete, info = pp.run(info)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 638, in run
    self.run_ffmpeg(old_file, new_file, ['-f', new_format])
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 239, in run_ffmpeg
    self.run_ffmpeg_multiple_files([path], out_path, opts)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError: file:Black Widows - Ep. 1.no.xml: Invalid data found when processing input

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 14, 2019

FYI, if you want such patches to be reviewed and merged you should file a PR. Also you must provide clean explanation of what it supposed to fix.

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.

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