gpodder / gpodder

The gPodder podcast client.

Home Page:http://gpodder.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow downloading of m3u8 streams from a podcast.

F3llFr0mTh3Sky opened this issue · comments

Hello,
I know this is a strange request, but I've a podcast from Radio-Canada which has 301 episodes and the 34 first ones are m3u8 files, the other ones are all mp4.
The podcast in question :
https://ohdieux.ligature.ca/rss?programme_id=110&tag_segments=true

So basically gPodder should be able to use either ffmpeg or hlsdl in order to download the stream of the m3u8 and convert it losslessly to mp4 or ogg.
The stream should be named with the name of the podcast and should be linked as the video to play in the podcast entries of gPodder.

I'm not sure why, but gpodder is using the filename instead of title, and dropping the m3u8 extension. Not using the title is only annoying, but if it had the extension it might open in your media player when played from gpodder. I'll look into this.

The audio converter extension could also get support for m3u8 to produce an mp3 or ogg file.

Same behavior for me, except all m3u8 files don't have the extension and are named "master".

but if it had the extension it might open in your media player when played from gpodder

It would be better to download the m3u8 stream permanently through ffmpeg or hlsdl.

#1237 (comment) is probably the cause of the dropped file extension.

It would be better to download the m3u8 stream permanently through ffmpeg or hlsdl.

That won't happen, but enabling the audio converter extension, after it gets support, would do exactly that.

That won't happen, but enabling the audio converter extension, after it gets support, would do exactly that.

Then if what you mean doesn't work, it would be great to add the feature I requested.
What I mean is that a m3u8 file only contains some metadata that allows downloading audio or video files.

Ya, the m3u8 is a playlist. Opening the file gpodder downloaded in a media player would let you selectively play each entry. However, using the audio or video converter would concatenate every entry in the playlist. There might need to be some settings in the converters to control this, because some feed might have hundreds of videos in a playlist.

The actual downloading of each entry might be a problem. FFmpeg might be able to do it for us. But that would bypass proxy settings the user provided to gpodder. There is also the issue of no feedback for the downloads. Gpodder won't display that ffmpeg is downloading files, therefore, the user can't pause or cancel the downloads. If gpodder crashes during the download, it has no way to tell the converter extension to resume, nor would ffmpeg know how to resume.

Adding support for gpodder to handle the m3u8 downloads without an extension would be complex. It would need to associate multiple files with each episode.

Someone could write a complex m3u8 extension that opens a dialog, prompting the user to select entries from the playlist to concatenate, it then uses some of gpodder's download code to fork managed downloads, and show progress in its dialog. When restarting gpodder, the extension could detect prior downloads, open its dialog and resume them.

The most that will come of this is probably fixing the #1237 issue so the files get an m3u8 extension. And then your OS will open them in a program that is associated with the format. This of course doesn't work for anyone uploading the files to an offline media player device.

Also make sure that the file name of the m3u8 isn't dropped too:
currently they're all dropped and named 'master'.

True names:
image
Files names:
image

Also make sure that the file name of the m3u8 isn't dropped too:
currently they're all dropped and named 'master'.

Well, that is entirely the fault of the feed. They named every file "master.m3u8" and when downloaded, their server reports the filename as "master". Gpodder's problem is that it uses whatever the feed gives it, and doesn't account for feeds like this. See the #1237 comment link I posted above, Soundcloud has the same issue.