Help us understand the problem. What is going on with this article?

ffmpegでSRTを試す

More than 1 year has passed since last update.

ほぼ https://qiita.com/tetsu_koba/items/b8e1868a726c6201d3ab のままですが、自分の作業メモとして残しておきます。

環境: macOS Sierra 10.12.6

ビルド

$ curl -L https://ffmpeg.org/releases/ffmpeg-4.0.2.tar.bz2 > ffmpeg-4.0.2.tar.bz2
$ tar xf ffmpeg-4.0.2.tar.bz2
$ cd ffmpeg-4.0.2/
$ vim libavformat/libsrt.c   # 469行目に h->max_packet_size = 1316; を追加
$ ./configure --enable-libsrt --enable-libx264 --enable-gpl; say 'オワッタヨ'
$ make; say 'オワッタヨ'
$ ./ffmpeg -protocols | grep srt
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --enable-libsrt --enable-libx264 --enable-gpl
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
  srtp
  srt
  srtp
  srt

動作確認

先に受信側を起動(こちらはhomebrewでいれたffmpegのffplay)

ffplay -analyzeduration 100 -i 'srt://127.0.0.1:3000?mode=listener'

送信側を起動(こちらはさきほどビルドしたもの)

./ffmpeg -f avfoundation -framerate 30 -i "0:" -c:v libx264 -pix_fmt yuv420p -profile:v baseline -level 1 -preset ultrafast -tune zerolatency -x264opts bitrate=2000 -an -f mpegts 'srt://127.0.0.1:3000'

メモ

  • https://trac.ffmpeg.org/ticket/7187the mss option should be used per mss=1316 So not a bug.とあったのでsrt://127.0.0.1:3000?mss=1316も試してみたけど、やはりSRT.c: LiveSmoother: payload size: 15040 exceeds maximum allowed 1316といわれてしまう
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away