Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > Audio stream recording
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 03-23-2015, 02:10 AM
anctop anctop is offline
Junior Member
 
Join Date: Mar 2015
Posts: 15
anctop is on a distinguished road
Default

download audio streamed by JWPlayer


Hello,

I'm new in this forum & a novice in matters with streaming.
Recently I come across a couple of radio programmes on the www and I want to save a local copy of them, but enormous difficulties are encountered.

The site uses JWPlayer to stream multimedia contents. Here is a sample URL :

http://programme.rthk.hk/channel/rad...channel=radio4

The URL indicates that the audio should be an MP3, but in fact the player plays an .m3u8 :

http://stmw1.rthk.hk/aod/_definst_/r.../playlist.m3u8

and this .m3u8 directs to another .m3u8 :

http://stmw1.rthk.hk/aod/_definst_/r...061855960.m3u8

This last .m3u8 is a playlist with over 700 entries of .ts files :

http://stmw1.rthk.hk/aod/_definst_/r...061855960_0.ts
http://stmw1.rthk.hk/aod/_definst_/r...061855960_1.ts
http://stmw1.rthk.hk/aod/_definst_/r...061855960_2.ts
....

Since the URL's are known, I've retrieved a few of them, but none of these .ts files can be opened by local players (e.g. VLC). The file types of the .ts files are reported as :

media_w2061855960_0.ts: MPEG transport stream data
media_w2061855960_1.ts: TeX font metric data
media_w2061855960_2.ts: TeX font metric data
media_w2061855960_3.ts: data
media_w2061855960_4.ts: data
....

I've also tried to download using some Firefox add-on, but the stream keeps generating new entries with identical names instead of a single target.

I guess the .ts files are the fragments of the original MP3.
Even though I am patient enough to retrieve all such .ts files named in the playlist, the problem remains how to sew them together ? or is there any better way to download the programme as a single clip ?
Reply With Quote
  #2  
Old 03-23-2015, 05:42 AM
nullacht nullacht is offline
Senior Member
 
Join Date: Jan 2010
Posts: 230
nullacht will become famous soon enoughnullacht will become famous soon enough
Default

Re: download audio streamed by JWPlayer


LIVESTREAMER:

Code:
livestreamer "hlsvariant://stmw1.rthk.hk/aod/_definst_/radio/archive/radio4/Liveon4/mp3/mp3:20150321.mp3/playlist.m3u8" best -o 01.ts
Code:
[cli][info] Found matching plugin stream for URL hlsvariant://stmw1.rthk.hk/aod/_definst_/radio/archive/radio4/Liveon4/mp3/mp3:20150321.mp3/playlist.m3u8
[cli][info] Available streams: 70k (worst, best)
[cli][info] Opening stream: 70k (hls)
FFMPEG:

Code:
ffmpeg -i "http://stmw3.rthk.hk/aod/_definst_/radio/archive/radio4/Liveon4/mp3/mp3:20150321.mp3/playlist.m3u8" -c copy 01.ts
Reply With Quote
  #3  
Old 03-24-2015, 02:42 AM
anctop anctop is offline
Junior Member
 
Join Date: Mar 2015
Posts: 15
anctop is on a distinguished road
Default

Re: download audio streamed by JWPlayer


Many thanks for the suggestions.

I've tried the method of "ffmpeg". It starts and runs for a short while but then ends prematurely with an error :

Code:
[hls,applehttp @ 02fdd720] Failed to open segment of playlist 0
http://stmw3.rthk.hk/aod/_definst_/radio/archive/radio4/Liveon4/mp3/mp3:20150321.mp3/playlist.m3u8: Unknown error
size=    2500kB time=00:05:20.00 bitrate=  64.0kbits/s
video:0kB audio:2500kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.013008%
Is it possible to "resume" the download ?

Also, a couple of lines saying "[mpegts @ 030155c0] PES packet size mismatch" appeared during the execution.
How does this error affect the downloaded file ?
Reply With Quote
  #4  
Old 03-24-2015, 06:12 AM
nullacht nullacht is offline
Senior Member
 
Join Date: Jan 2010
Posts: 230
nullacht will become famous soon enoughnullacht will become famous soon enough
Default

Re: download audio streamed by JWPlayer


I can't confirm that. Everything is working fine here. Seems to be a connection problem (maybe a bad internet connection?). Try it again with the Livestreamer application.

Code:
http://docs.livestreamer.io/cli.html
Reply With Quote
  #5  
Old 03-24-2015, 09:17 PM
Mabel Mabel is offline
Junior Member
 
Join Date: Mar 2015
Posts: 3
Mabel is on a distinguished road
Default

Re: download audio streamed by JWPlayer


Quote:
Originally Posted by anctop View Post
Hello,

I'm new in this forum & a novice in matters with streaming.
Recently I came across a couple of radio programs on the www and I want to save a local copy of them, but enormous difficulties are encountered.

The site uses JWPlayer to stream multimedia contents. ... I guess the .ts files are the fragments ...
I too am a novice here (and to stream-ripping). I had a very similar problem over the last few days, and here is my (Windows-based) semi-automatic solution. It is somewhat crude, but it works. It requires two browser add-ons (which I have installed in Firefox) or workalikes: Video Download Helper and Download Them All.

The link above is to a zip-file which contains everything else you will need. Just open the file "Instructions.txt" and follow it. (The instructions assume the use of the above two browser add-ons.)

The method requires a bit of manual editing to the scripts used (they are Windows .cmd files) and the entering of some commands in a Command-Prompt window, but for about 5 minutes' work, you can download all the (.TS) segments comprising the whole download stream and concatenate them into a single file playable in VLC Media Player. (The concatenated file is somewhat bloated with multiple redundant headers throughout the file, but their existence doesn't seem to bother VLC and the overhead is slight.)

Note: the specific example used in the instructions may not work in some countries, as the stream I used it for may be geo-blocked for IP addresses outside Australia. Just adapt it to whatever stream you want.

I'd be interested in any feedback.
Reply With Quote
  #6  
Old 03-24-2015, 10:50 PM
anctop anctop is offline
Junior Member
 
Join Date: Mar 2015
Posts: 15
anctop is on a distinguished road
Default

Re: download audio streamed by JWPlayer


I've just tried the "livestreamer" method. It runs much faster than "ffmpeg", but there are still a couple of errors :

Code:
[cli][info] Found matching plugin stream for URL hlsvariant://stmw1.rthk.hk/aod/_definst_/radio/archive/radio4/Liveon4/mp3/mp3:20150321.mp3/playlist.m3u8
[cli][info] Available streams: 70k (worst, best)
[cli][info] Opening stream: 70k (hls)
[download][01.ts] Written 15.5 MB (2m4s @ 52.0 KB/s)
[stream.hls][error] Failed to open segment 188: Unable to open URL: http://stmw1.rthk.hk/aod/_definst_/radio/archive/radio4/Liveon4/mp3/mp3:20150321.mp3/media_w739913464_188.ts (timed out)
[download][01.ts] Written 43.4 MB (5m27s @ 73.1 KB/s)
[stream.hls][error] Failed to open segment 523: Unable to open URL: http://stmw3.rthk.hk/aod/_definst_/radio/archive/radio4/Liveon4/mp3/mp3:20150321.mp3/media_w1960685163_523.ts (timed out)
[download][01.ts] Written 59.6 MB (7m29s @ 516.6 KB/s)
[cli][info] Stream ended
The errors are fatal, because the resultant "01.ts" cannot be played.

I think nullacht's conclusion is right, that my network connection is not stable enough for lengthy downloading. I'll try at different times when the traffic is less busy.

Thanks again for recommending the useful tools.

Last edited by anctop : 03-24-2015 at 11:50 PM.
Reply With Quote
  #7  
Old 03-24-2015, 10:57 PM
Mabel Mabel is offline
Junior Member
 
Join Date: Mar 2015
Posts: 3
Mabel is on a distinguished road
Default

Re: download audio streamed by JWPlayer


Quote:
Originally Posted by Mabel View Post
... my (Windows-based) semi-automatic solution ... is somewhat crude, but it works. ... for about 5 minutes' work, you can download all the (.TS) segments comprising the whole download stream and concatenate them into a single file playable in VLC Media Player.
Hmmm. It seems that not all .ts files (?AKA .MP2T files) are the same. The files in the stream I tested my solution on, play in VLC (2.1.5) (try this one, for example), but when I tried the same with some of the files linked to by anctop, VLC would not play them. I noticed, in a hex editor, that there are some differences between them in their header blocks, but I don't know what the differences mean.

(I have just updated to ver 2.2.0 of VLC, and same behaviour!)

So, while my solution works for downloading the files, you may need to hunt around for a player that will play the particular version of .TS files used in your stream. Anctop, did you ever find such a player?

(Note: The above links are to ABC (Australia) radio programs that are kept online only for 1 month after the original broadcast date. That content will expire in 28 days, so if you're reading this after that time, the links won't work.)

Last edited by Mabel : 03-25-2015 at 06:41 PM. Reason: Added information
Reply With Quote
  #8  
Old 03-25-2015, 12:59 AM
Mabel Mabel is offline
Junior Member
 
Join Date: Mar 2015
Posts: 3
Mabel is on a distinguished road
Default

Re: download audio streamed by JWPlayer


Quote:
Originally Posted by Mabel View Post
So, while my solution works for downloading the files, you may need to hunt around for a player that will play the particular version of .TS files used in your stream. Anctop, did you ever find such a player?
I found an open source player that plays the files linked to by both anctop and me. It is MPC-HC.
Reply With Quote
  #9  
Old 03-26-2015, 11:49 PM
BarryJones BarryJones is offline
Junior Member
 
Join Date: Mar 2015
Posts: 1
BarryJones is on a distinguished road
Default

Re: download audio streamed by JWPlayer


Quote:
Originally Posted by Mabel View Post
I too am a novice here (and to stream-ripping). I had a very similar problem over the last few days, and here is my (Windows-based) semi-automatic solution. It is somewhat crude, but it works. It requires two browser add-ons (which I have installed in Firefox) or workalikes: Video Download Helper and Download Them All.

The link above is to a zip-file which contains everything else you will need. Just open the file "Instructions.txt" and follow it. (The instructions assume the use of the above two browser add-ons.)

The method requires a bit of manual editing to the scripts used (they are Windows .cmd files) and the entering of some commands in a Command-Prompt window, but for about 5 minutes' work, you can download all the (.TS) segments comprising the whole download stream and concatenate them into a single file playable in VLC Media Player. (The concatenated file is somewhat bloated with multiple redundant headers throughout the file, but their existence doesn't seem to bother VLC and the overhead is slight.)

Note: the specific example used in the instructions may not work in some countries, as the stream I used it for may be geo-blocked for IP addresses outside Australia. Just adapt it to whatever stream you want.

I'd be interested in any feedback.
Your method works for me. I downloaded an abc.net.au audio stream and the output plays fine within Windows/VLC. Now I want to convert the .ts file into a regular audio file (eg .mp3, .flac) so that I can tag it within my audio player (WinAmp).
Reply With Quote
Reply Post New Thread
Tags:



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 05:12 PM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons