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

Request: new option to integrate srt into file #192

Closed tonystower closed 5 years ago

tonystower commented 6 years ago

I currently use subler to add the srt file to the mp4. It would be much easier to have this automated as part of GiA.

I think it is already an option in get_iplayer

Thanks for your consideration.

hugofalkman commented 6 years ago

I second that request

Vangelis66 commented 6 years ago

I think it is already an option in get_iplayer

... You are right! 👍

--subs-embed    Embed soft subtitles in MP4 output file. Ignored with --audio-only and --ffmpeg-obsolete.

It was implemented in 3.13-dev; see https://github.com/get-iplayer/get_iplayer/commit/c0d7521 https://github.com/get-iplayer/get_iplayer/commit/c531691

tonystower commented 6 years ago

Any chance that this could be implemented? Thank you very much

raveem commented 5 years ago

Urgh. Created a new thread on this by accident, now closed/deleted once I discovered this one. Here's what I wrote, echoing the above:

_Given that m4v/mp4 containers natively support soft subtitles as part of the standard, there is no reason not to have them embedded in the container. Otherwise, one has to use third party tools to stitch together every single file after download, making the "add to iTunes after download" option pretty useless (iTunes itself, of course, also can use the soft subs capability).

getiplayer has already implemented this, so this frontend inheriting that switch/capability to download a single file with the subs inside would be a logical step. Please see: https://forums.squarepenguin.co.uk/thread-1606.html

hugofalkman commented 5 years ago

Yes PLEASE, am spending a lot of useless time with Subler.

Vangelis66 commented 5 years ago

... Since the feature is already implemented in the get_iplayer script itself (see previous comment), in theory it should be possible to add it as a permanent user option to get_iplayer, i.e. in the CLI type: get_iplayer --subs-embed --prefs-add

However, in the case of GiA on a Mac (i.e. not using the standalone get_iplayer app), one must compose a different incantation to invoke the embedded get_iplayer perl script inside GiA; from previous exchanges, I can recollect something along the following lines (with GiA exited, issue in the Terminal):

PERL5LIB="/Applications/Get iPlayer Automator.app/Contents/Resources/perl5" "/Applications/Get iPlayer Automator.app/Contents/Resources/get_iplayer" --profile-dir="$HOME/Library/Application Support/Get iPlayer Automator" --subs-embed --prefs-add

To undo that change (delete the permanent option), you'd have to type in the Teminal (again, GiA is exited):

PERL5LIB="/Applications/Get iPlayer Automator.app/Contents/Resources/perl5" "/Applications/Get iPlayer Automator.app/Contents/Resources/get_iplayer" --profile-dir="$HOME/Library/Application Support/Get iPlayer Automator" --subs-embed --prefs-del

DISCLAIMER: Not tested 😉 (If you're not feeling adventurous, wait for someone more knowledgeable and/or @skovatch to chime in...)

skovatch commented 5 years ago

PERL5LIB="/Applications/Get iPlayer Automator.app/Contents/Resources/perl5" "/Applications/Get iPlayer Automator.app/Contents/Resources/get_iplayer" --profile-dir="$HOME/Library/Application Support/Get iPlayer Automator" --subs-embed --prefs-add

Yes, this will work. If you also have the command line get_iplayer installed you don't even need the full path to the embedded get_iplayer and PERL5LIB; --profile-dir is the important argument.

What do you want this feature to do? The easiest thing to do is to use --subs-embed all the time if subtitles are requested, but I can also add another checkbox for those that just want the raw subtitles.

hugofalkman commented 5 years ago

@skovatch Think a message is enough so you know if subtitles are imbedded or if for some reason subtitles wern't provided. (Know this won't apply to ITV, but designing ahead, it's quite common for ITV not providing subtitles for reruns of older series.)

raveem commented 5 years ago

For myself, I would certainly want the equivalent of --subs-embed on all the time (since no functionality is lost if subs come embedded in the file), with an additional option to download the SRT for those that need it.

skovatch commented 5 years ago

Okay, this is looking good. I will likely release a version with BBC support soon, and will see if I can attach it to ITV downloads, since it looks like an ffmpeg command is all that's needed to embed the subtitles into the video.

tonystower commented 5 years ago

Fantastic! Thank you Scott!

hugofalkman commented 5 years ago

👍

skovatch commented 5 years ago

Now fixed in 1.13.18.