我正在使用ffmpeg捕获SDI音频视频并将其传递到命名管道。我希望转换/指定传入视频的亮度范围。通常,当发布到RTMP服务器时,我可以指定-vf“ in_range = full:out_range:limited”,它可以解决我的输入范围问题。在下面的示例中,这没有什么不同。有什么想法吗?
ffmpeg -y -format_code 23ps -f decklink -channels 2 -i "UltraStudio Recorder 3G" -r 24000/1001 -s 1280x720 -vf "in_range=full:out_range:limited" -map 0:a:0 -f s16le -ar 48000 -ac 2 unix:///var/folders/4q/2_zlrlbx4vj5gmm3xwjp7t8r0000gp/T/CoreFxPipe_ffcapture_pcm_68975ac4 -map 0:v:0 -f yuv4mpegpipe -pix_fmt yuv420p unix:///var/folders/4q/2_zlrlbx4vj5gmm3xwjp7t8r0000gp/T/CoreFxPipe_ffcapture_i420_648c8512
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple clang version 11.0.3 (clang-1103.0.32.29)
configuration: --prefix=/usr/local --pkg-config-flags=--static --extra-cflags='-fno-stack-check -I/Users/me/Documents/working_vid_capture/ffmpeg_build/include -I/Users/me/Documents/working_vid_capture/BDS/Mac/include' --extra-ldflags=-L/Users/me/Documents/working_vid_capture/ffmpeg_build/lib --extra-libs='-lpthread -lm' --bindir=/Users/patrickcusack/Documents/working_vid_capture/ffmpeg_build/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-decklink
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
[decklink @ 0x7f816e810e00] Found Decklink mode 1920 x 1080 with rate 23.98
[decklink @ 0x7f816e810e00] Frame received (#1) - No input signal detected - Frames dropped 1
Guessed Channel Layout for Input Stream #0.0 : stereo
答案 0 :(得分:1)
选项放置很重要。您正在音频输出中混合视频选项,因此这些放错位置的选项将被忽略。放置的简化为:
ffmpeg [global options] [input options] -i input [output #0 options] output0 [output #1 options] output1
in_range
/ out_range
不是独立的过滤器,而是scale filter的选项。您当前的命令应输出错误No such filter: 'in_range'
。
固定命令:
ffmpeg -y -format_code 23ps -f decklink -channels 2 -i "UltraStudio Recorder 3G" -map 0:a:0 -f s16le -ar 48000 unix:///var/folders/4q/2_zlrlbx4vj5gmm3xwjp7t8r0000gp/T/CoreFxPipe_ffcapture_pcm_68975ac4 -map 0:v:0 -vf "fps=24000/1001,scale=1280:720:in_range=full:out_range=limited,format=yuv420p" -f yuv4mpegpipe unix:///var/folders/4q/2_zlrlbx4vj5gmm3xwjp7t8r0000gp/T/CoreFxPipe_ffcapture_i420_648c8512