0

I'm using FFMPEG to take an RTMP stream and output it to a Decklink device. Here's the command I'm using:

ffmpeg -i rtmp://192.168.1.4:1935:/publish/internal -async 1 -r 60 -b:a 320k -aspect 16:9 -vf "scale=1920:-1:flags=bicubic" -f decklink -vcodec v210 "DeckLink Mini Monitor HD"

Occasionally (also randomly) the output will get what I can best describe as "crunchy" audio. I see this error in the ffmpeg output:

Jan 02 22:47:36 kiri bash[505081]: [decklink @ 0x5653d27e0f00] There's no buffered audio. Audio will misbehave!
Jan 02 22:47:36 kiri bash[505081]: [decklink @ 0x5653d27e0f00] There are not enough buffered video frames. Video may misbehave!

I suspect this is due to a hiccup from the device sending the RTMP stream or the RTMP server, but I'd like to find a way to have ffmpeg handle this situation. I was hoping that the -async 1 flag would tell ffmpeg to speed up or slow down the audio to catch up to the video, but I still ran into issues doing this.

The full ffmpeg output is here:

Input #0, flv, from 'rtmp://192.168.1.4:1935:/publish/internal':
  Metadata:
    |RtmpSampleAccess: true
    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
    displayWidth    : 1920
    displayHeight   : 1080
    fps             : 60
    profile         :
    level           :
  Duration: 00:00:00.00, start: 6.508000, bitrate: N/A
  Stream #0:0: Video: h264, yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 8192 kb/s, 60 fps, 60 tbr, 1k tbn
  Stream #0:1: Audio: aac, 48000 Hz, stereo, fltp, 327 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> v210 (native))
  Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[decklink @ 0x563c7fb34440] Found Decklink mode 1920 x 1080 with rate 60.00
Output #0, decklink, to 'DeckLink Mini Monitor HD':
  Metadata:
    |RtmpSampleAccess: true
    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
    displayWidth    : 1920
    displayHeight   : 1080
    fps             : 60
    profile         :
    level           :
    encoder         : Lavf59.27.100
  Stream #0:0: Video: v210, yuv422p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 2654208 kb/s, 60 fps, 60 tbn
    Metadata:
      encoder         : Lavc59.37.100 v210
  Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
    Metadata:
      encoder         : Lavc59.37.100 pcm_s16le

Anybody have any ideas of what I can change with my command to better address this?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.