Ascoware / get-iplayer-automator

The goal of Get iPlayer Automator is to allow iTunes and your Mac to become the hub for your British Television experience regardless of where in the world you are. Currently, Get iPlayer Automator allows you to download and watch BBC and ITV shows on your Mac. Series-Link/PVR functionality ensures you will never miss your favourite shows. Programmes are fully tagged and added to iTunes automatically upon completion. It is simple and easy to use, and runs on any machine running Mac OS X 10.7 or later. And since the shows are in iTunes, it is extremely easy to transfer them to your iPod, iPhone, or Apple TV allowing you to enjoy your shows on the go or on your television.
GNU General Public License v3.0
146 stars 26 forks source link

"Problem unknown" error when downloading from STV (with subtitles) #444

Closed PDWLF closed 1 year ago

PDWLF commented 1 year ago

Hi,

First time I've raised an issue but couldn't see it raised previously.

Firstly, a quick thank you for GIA - I love it and have been using it for a long time.

I've attempted to download from STV with the latest version (1.25.1 (20230118001)). The download gets to 100% but Im then advised "Problem Unknown. Please submit a bug report from the application menu".

I did look at the app menu but couldn't find an option for bug report so am raising it here.

When I look at the download directory I see:

programme.s01e02.Episode 1 of 3.en.srt dated 31/12/22 at 18:56 zero bytes programme.s01e02.Episode 1 of 3.jpg dated today 330KB programme.s01e02.Episode 1 of 3.mp4 dated 1/1/2016 at 1.48Gb

I am downloading subtitles but when I try and view the MP4 file there are no subtitles.

The log states: [download] 100% of 1.38GiB

[EmbedSubtitle] Embedding subtitles in "/Volumes/G-DRIVE/Movies/TV Shows/Stonehouse/Stonehouse.s01e01.Episode 1 of 3.mp4"

ERROR: Postprocessing: file:/Volumes/G-DRIVE/Movies/TV Shows/Stonehouse/Stonehouse.s01e01.Episode 1 of 3.en.srt: Invalid data found when processing input

yt-dlp finished downloading

A few things about my machine: iMac 21.5 2017 OS Monterey 12.6 GIA default directory is on an external drive (G-Drive as above).

Happy to provide any extra info

skovatch commented 1 year ago

What happened here is that the conversion of the subtitles from webvtt to .srt format failed, but an empty file was written out anyway, and ffmpeg choked on it when trying to embed the subtitles.

I'm not sure what GiA can do about this... it may be unique to this program as other programs have no issues with embedding subtitles. I'll have to experiment with downloading different subtitle formats (only dfxp and webvtt appear to be available) to see what can be done.

sleaux-meaux commented 1 year ago

i'm not sure what GiA can do about this... it may be unique to this program as other programs have no issues

Don't restrict yt-dlp to webvtt. ffmpeg chokes on style and region blocks for that programme. Use --sub-format dfxp/vtt. dfxp appears to be selected if --sub-format is omitted, but that may not be deterministic.

hugofalkman commented 1 year ago

Downie has a line item in the release notes for the new 4.6.6: "Improved: WebVTT parsing", As Downie since a couple of releases supports STV, this probably means the STV implementation of webvtt, either changed or always was non-standard.

sleaux-meaux commented 1 year ago

STV implementation of webvtt, either changed or always was non-standard.

Neither. This programme is simply one that uses some webvtt definition blocks (cue styles and display regions) that ffmpeg does not handle or ignore. It is a limitation of ffmpeg's webvtt decoder. Those webvtt features aren't used by the video player on the STV site, though cue styles appear to be used by the video player on the ITVX site.

skovatch commented 1 year ago

Fixed in v1.25.3 (newer version of ffmpeg)