aajanki / yle-dl

Download videos from Yle servers
https://aajanki.github.io/yle-dl/index-en.html
GNU General Public License v3.0
309 stars 51 forks source link

--pipe is broken #291

Closed 2-4601 closed 2 years ago

2-4601 commented 2 years ago
$ yle-dl --pipe https://areena.yle.fi/tv/suorat/yle-areena/1-60895352                                                     
Unsupported codec with id 100358 for input stream 2
Unsupported codec with id 100358 for input stream 5
Unsupported codec with id 100358 for input stream 8
Unsupported codec with id 100358 for input stream 11
Unsupported codec with id 100358 for input stream 14
Unsupported codec with id 100358 for input stream 17
Unsupported codec with id 100358 for input stream 20
Unsupported codec with id 100358 for input stream 23
Unsupported codec with id 100358 for input stream 26
Unsupported codec with id 100358 for input stream 29
Unsupported codec with id 100358 for input stream 32
Unsupported codec with id 100358 for input stream 35
Traceback (most recent call last):
  File "/usr/bin/yle-dl", line 33, in <module>
    sys.exit(load_entry_point('yle-dl==20211203', 'console_scripts', 'yle-dl')())
  File "/usr/lib/python3.9/site-packages/yledl/yledl.py", line 471, in main
    res = execute_action(url, action, io, httpclient, title_formatter,
  File "/usr/lib/python3.9/site-packages/yledl/yledl.py", line 287, in execute_action
    return dl.pipe(clips(), io, stream_filters)
  File "/usr/lib/python3.9/site-packages/yledl/downloader.py", line 75, in pipe
    return self.process(clips, pipe_clip, needs_retry, filters)
  File "/usr/lib/python3.9/site-packages/yledl/downloader.py", line 113, in process
    res = self.try_all_streams(
  File "/usr/lib/python3.9/site-packages/yledl/downloader.py", line 133, in try_all_streams
    (latest_result, output_file) = streamfunc(clip, stream)
  File "/usr/lib/python3.9/site-packages/yledl/downloader.py", line 69, in pipe_clip
    res = downloader.pipe(io)
  File "/usr/lib/python3.9/site-packages/yledl/backends.py", line 362, in pipe
    commands = [self.build_pipe_args(io)]
  File "/usr/lib/python3.9/site-packages/yledl/backends.py", line 355, in build_pipe_args
    self._map_video_and_audio_streams() +
TypeError: _map_video_and_audio_streams() missing 1 required positional argument: 'io'

yle-dl version: 20211203

It seems that those "Unsupported codec..." errors come from ffmpeg (I have n4.4.1). However, I tried this also with the previous version of yle-dl (20210917) and --pipe works fine with it. So I guess one of the commits made after that version broke the --pipe option (which is also something that the Python TypeError suggests).

aajanki commented 2 years ago

Thanks for reporting! I had indeed broken the --pipe switch by accident in the previous version. I just published a new release (20211207) that fixes the problem.

The "Unsupported codec" errors are not serious problems, like you suspected. They are related to some metadata streams but ffmpeg is able to record video and audio streams even when it prints those warnings.