【问题标题】:FFMPEG: Can i set an audio to be played at night only?FFMPEG:我可以设置只在晚上播放的音频吗?
【发布时间】:2020-09-04 14:03:03
【问题描述】:

这是我的工作命令:

ffmpeg -rtsp_transport tcp -i rtsp://stream1video -i rtsp://stream2audio -re -stream_loop -1 -i 1.aac -re -stream_loop -1 -i 2.aac -filter_complex "[1:a][2:a][3:a]amix=inputs=3[a]" -map 0:v -map "[a]" -c:a aac -f flv rtmp://a.rtmp.youtube.com/

现在,我可以以某种方式设置仅在晚上播放音频流吗?例如每天 22:00-06:00 之间?剩下的时间就是沉默:)

编辑:我正在使用 linux。

【问题讨论】:

  • 使用 cronjob(或类似你的操作系统未知)在你想要的时间执行上述命令。

标签: audio ffmpeg youtube stream


【解决方案1】:

在 windows 上使用 un cron job (linux/mac) 或计划任务

【讨论】:

  • 这可以工作,但我的相机不喜欢重新启动 ffmpeg 脚本,通常它们会挂起。
  • 来自 FFMPEG,这是不可能的。 FFMPEG 没有嵌入类似 cron 的系统,但可能使用命令脚本作为“暂停”?我与 cron 合作,我无法解释更多...
猜你喜欢
  • 1970-01-01
  • 2011-01-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-11-09
相关资源
最近更新 更多