ffmpeg - 如何让icecast从ffmpeg中继mp3流的元数据?

标签 ffmpeg icecast

我正在尝试使用以下命令中继互联网广播流:

ffmpeg -re -i 'http://internetradiourl'-vn -acodec copy -f tee -map 0:a "[f=mp3]icecast://source:pass@icecast:8000/a|[f=mp3]icecast://source:pass@icecast:8000/b"
输出流包含所有元数据:
Output #0, tee, to '[f=mp3]icecast://source:pass@icecast:8000/a|[f=mp3]icecast://source:pass@icecast:8000/b':
  Metadata:
    audiocodec      : MP3
    audiodevice     : IN  1+2 (Digigram LoLa280)
    audiodeviceid   : e08a462b-2944-4abf-894a-5d5e8649452d
    type            : event
    encoderMachineName: ERADIO
    hasAudio        : true
    hasCuePoints    : true
    hasKeyframes    : true
    hasVideo        : false
    source          : MediaProxy 4.4.13.6
    name            : ad
    ad_type         : endbreak
    cue_id          : b6c7ff39-2103-4442-bdc8-35f8ba2bb97d
    cue_time_duration: 44.365
    cue_time_start  : 1610035039552
    cue_title       : PSA - Danny - Parking (Jun 2020)
    encoder         : Lavf58.45.100
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 98304 kb/s
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
但是如果客户端连接到 icecast 服务器,元数据就会丢失:ffprobe https://icecasturl/a
Input #0, mp3, from 'https://icecasturl/a':
  Metadata:
    icy-pub         : 0
    icy-metadata    : 1
    StreamTitle     :
  Duration: N/A, start: 0.000000, bitrate: 96 kb/s
    Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 96 kb/s
如何配置 icecast 以便转发源流的所有元数据?

最佳答案

请考虑使用 Icecast 直接中继。
相关文档在这里:https://icecast.org/docs/icecast-2.4.1/relaying.html
在这个用例中没有特别的理由使用 ffmpeg。

关于ffmpeg - 如何让icecast从ffmpeg中继mp3流的元数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65615930/

相关文章:

bitmap - nreco 包装位图通过 rtmp 流式传输

ffmpeg - 我想将 libx264 编解码器与 ffmpeg 一起使用。但是ffmpeg libx264的配置失败

ffmpeg - ffmpeg 可以将音频转换为原始 PCM 吗?如果是这样,怎么办?

python - 使用 ffmpeg 处理的视频不是标志指定的 1080p

ffmpeg - 如何将 ASIO 设备的输出输出到 IceCast2 或 FFMpeg?

python - 使用 python 接收 icecast 元数据

php - 使用 ffmpeg 从视频中生成提取数量的缩略图

javascript - Icecast json-status.xls,歌曲标题为空白的无效 json 答案

html - 我如何使用 HTML5 播放 shoutcast/icecast 流?

streaming - 如何获取 `mpv --stream-record`以使用icecast标题作为文件名?