Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


BBC HLS Feeds have been changed
#21
(10-29-2023, 12:30 AM)TheOldPresbyope Wrote: A trick found on stackoverflow to detect video bitrate from his m3u8 file using ffprobe

Code:
ffprobe -print_format json -show_format -show_streams -show_error <filename_or_link>


So, for the BBC Radio One m3u8 link I get (eliding all the usual ffprobe/ffmpeg frontend output)


Code:
$ ffprobe -print_format json -show_format -show_streams -show_error http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d320000.norewind.m3u8
...
{
[hls @ 0x558ac0fa82c0] Skip ('#EXT-X-VERSION:3')
[hls @ 0x558ac0fa82c0] Skip ('## Created with Unified Streaming Platform(version=1.8.4)')
[hls @ 0x558ac0fa82c0] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0x558ac0fa82c0] Skip ('#USP-X-TIMESTAMP-MAP:MPEGTS=1995876768,LOCAL=2023-10-29T00:16:06.400000Z')
[hls @ 0x558ac0fa82c0] Skip ('#EXT-X-PROGRAM-DATE-TIME:2023-10-29T00:16:06.400000Z')
[hls @ 0x558ac0fa82c0] Opening 'http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio=320000-265396654.ts' for reading
[hls @ 0x558ac0fa82c0] Opening 'http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio=320000-265396655.ts' for reading
Input #0, hls, from 'http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d320000.norewind.m3u8':
 Duration: N/A, start: 22189.208533, bitrate: N/A
 Program 0
   Metadata:
     variant_bitrate : 0
 Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
   Metadata:
     variant_bitrate : 0
   "streams": [
       {
           "index": 0,
           "codec_name": "aac",
           "codec_long_name": "AAC (Advanced Audio Coding)",
           "profile": "LC",
           "codec_type": "audio",
           "codec_tag_string": "[15][0][0][0]",
           "codec_tag": "0x000f",
           "sample_fmt": "fltp",
           "sample_rate": "48000",
           "channels": 2,
           "channel_layout": "stereo",
           "bits_per_sample": 0,
           "r_frame_rate": "0/0",
           "avg_frame_rate": "0/0",
           "time_base": "1/90000",
           "start_pts": 1997028768,
           "start_time": "22189.208533",
           "disposition": {
               "default": 0,
               "dub": 0,
               "original": 0,
               "comment": 0,
               "lyrics": 0,
               "karaoke": 0,
               "forced": 0,
               "hearing_impaired": 0,
               "visual_impaired": 0,
               "clean_effects": 0,
               "attached_pic": 0,
               "timed_thumbnails": 0
           },
           "tags": {
               "variant_bitrate": "0"
           }
       }
   ],
   "format": {
       "filename": "http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d320000.norewind.m3u8",
       "nb_streams": 1,
       "nb_programs": 1,
       "format_name": "hls",
       "format_long_name": "Apple HTTP Live Streaming",
       "start_time": "22189.208533",
       "size": "598",
       "probe_score": 100
   }
}

I haven't played with the parameters available to ffprobe to see if the invocation can be simplified for audio streams.

Regards,
Kent

Basically, 48000 as reported by my VLC.
Reply
#22
(10-29-2023, 06:16 PM)Nutul Wrote:
(10-29-2023, 12:30 AM)TheOldPresbyope Wrote: A trick found on stackoverflow to detect video bitrate from his m3u8 file using ffprobe

Code:
ffprobe -print_format json -show_format -show_streams -show_error <filename_or_link>


...

Basically, 48000 as reported by my VLC.

Yep.

Nevertheless, I like this test for two reasons
  • two different programs reporting the same information on a stream format I don't know well gives me increased confidence in the result (especially since I automatically expect all GUI-based programs to prettify data)
  • like all good Linux/Unix programs this test can be piped, so, for example, I could write a script to report on all the BBC links or any other list of files and links I was interested in.
If you have a way to use vlc in a script, I'd love to see it. Reading through its command options I didn't see a way to do it.

Regards,
Kent
Reply
#23
Right but this is not the "bitrate".
The bitrate is the rate in bits-per-second at which the stream is being sent from the streaming server to the client.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#24
I'm in the UK. I appear to have got them all working with 320000 (in the URL), apart from the Beeb's World Service which is running the old URL.
Reply
#25
(10-29-2023, 10:16 PM)Tim Curtis Wrote: Right but this is not the "bitrate".
The bitrate is the rate in bits-per-second at which the stream is being sent from the streaming server to the client.

I’m like a student who didn’t know the answer to an exam question but hoped that writing same thing down would earn credit for effort. Smile 

I suppose one could develop some elaborate code to time-average the incoming bits but I'm not volunteering to be that “one”

Regards,
Kent
Reply
#26
My interest was in seeing if its somehow possible to verify the bitrate of the streams, but like in the past I'll simply go with the bitrate spec in the updated BBC URL's.

Hopefully the updated stream links are stable in terms of the URL's not changing for a while.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Forum Jump: