10-29-2023, 06:16 PM
(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.