Closed ilim0t closed 5 years ago
これはその端末がデフォルトframerateの29.970030に対応してないから発生するエラーであり,
-framerate 30
という引数をつけ
ffmpeg -framerate 30 -f avfoundation -re -i 0 -r 10 -vcodec libx264 -pix_fmt yuv420p -preset veryfast -tune zerolatency,stillimage,film -vb 2500k -vf "drawtext=text='%{localtime}':fontcolor=white@0.8:x=0:y=h-lh*1.2:fontsize=24" -f flv rtmp://localhost:1935/live/bushitsuchan -loglevel warning
に変更すると解消する
ただこの変更をすべての端末に対して行うと,今度は30fpsに対応していない端末で同様のエラー
[avfoundation @ 0x7fa860008400] Selected framerate (29.970030) is not supported by the device
[avfoundation @ 0x7fa860008400] Supported modes:
以下省略
と出てしまう。
対応framerateを調べそれに応じ引数を変えられるようにしたい
docker化に従いmacでのサポートをdebug用のみに限定し カメラの代わりにビデオファイルで代用できるようにしました よってcloseします
ffmpegのコマンド (一例)
のようなコマンドを内部で実行しているが,そのときに
上記のエラーが発生する