Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am experimenting with live streaming my Windows 7 desktop to YouTube.

Firstly the list of devices:

ffmpeg-N-100616-gca21cb1e36-win64-gplinffmpeg.exe -list_devices true -f dshow -i dummy

Gives:

ffmpeg version N-100616-gca21cb1e36 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 9.3-win32 (GCC) 20200320
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --a
rch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv
--enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-open
cl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-li
bdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-li
bopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --en
able-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-
libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-li
bxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
  libavutil      56. 63.100 / 56. 63.100
  libavcodec     58.116.100 / 58.116.100
  libavformat    58. 65.101 / 58. 65.101
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 95.100 /  7. 95.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[dshow @ 000000000052ca00] DirectShow video devices (some may be both video and audio devices)
[dshow @ 000000000052ca00]  "VF0700 Live! Cam Chat HD"
[dshow @ 000000000052ca00]     Alternative name "@device_pnp_\?usb#vid_041e&pid_4088&mi_00#7&b015b04&0&0000#{65e8773d-8f56-11d0-a3
b9-00a0c9223196}global"
[dshow @ 000000000052ca00]  "UScreenCapture"
[dshow @ 000000000052ca00]     Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}UScreenCapture"
[dshow @ 000000000052ca00]  "screen-capture-recorder"
[dshow @ 000000000052ca00]     Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}{4EA69364-2C8A-4AE6-A561-56E4B504
4439}"
[dshow @ 000000000052ca00] DirectShow audio devices
[dshow @ 000000000052ca00]  "Microphone (VF0700 Live! Cam Ch"
[dshow @ 000000000052ca00]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}Microphone (VF0700 Live! Cam Ch"
[dshow @ 000000000052ca00]  "virtual-audio-capturer"
[dshow @ 000000000052ca00]     Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}{8E146464-DB61-4309-AFA1-3578E927
E935}"
dummy: Immediate exit requested

ffmpeg-N-100616-gca21cb1e36-win64-gplinffmpeg.exe -list_devices true -f dshow -i dummy

gives:

ffmpeg version 4.3.1-2021-01-01-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enab
le-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libss
h --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-li
brav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --en
able-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-
amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libm
fx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-
libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable
-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[dshow @ 0000000000485ac0] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0000000000485ac0]  "VF0700 Live! Cam Chat HD"
[dshow @ 0000000000485ac0]     Alternative name "@device_pnp_\?usb#vid_041e&pid_4088&mi_00#7&b015b04&0&0000#{65e8773d-8f56-11d0-a3
b9-00a0c9223196}global"
[dshow @ 0000000000485ac0]  "UScreenCapture"
[dshow @ 0000000000485ac0]     Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}UScreenCapture"
[dshow @ 0000000000485ac0]  "screen-capture-recorder"
[dshow @ 0000000000485ac0]     Alternative name "@device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}{4EA69364-2C8A-4AE6-A561-56E4B504
4439}"
[dshow @ 0000000000485ac0] DirectShow audio devices
[dshow @ 0000000000485ac0]  "Microphone (VF0700 Live! Cam Ch"
[dshow @ 0000000000485ac0]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}Microphone (VF0700 Live! Cam Ch"
[dshow @ 0000000000485ac0]  "virtual-audio-capturer"
[dshow @ 0000000000485ac0]     Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}{8E146464-DB61-4309-AFA1-3578E927
E935}"
dummy: Immediate exit requested

Now trying to live stream with the command:

ffmpeg-N-100616-gca21cb1e36-win64-gplinffmpeg.exe -f dshow -i video='screen-capture-recorder':audio='Microphone (VF0700 Live! Cam Ch' -r 24 -s 1920x1080 -qmin 3 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key'

I get:

ffmpeg version 4.3.1-2021-01-01-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enab
le-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libss
h --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-li
brav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --en
able-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-
amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libm
fx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-
libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable
-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
leaving aero onGuessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=screen-capture-recorder:audio=Microphone (VF0700 Live! Cam Ch':
  Duration: N/A, start: 758394.360000, bitrate: N/A
    Stream #0:0: Video: rawvideo, bgr0, 1920x1080, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
    Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
[NULL @ 00000000006645c0] Unable to find a suitable output format for 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key
'
rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key: Invalid argument
[dshow @ 0000000000607400] real-time buffer [screen-capture-recorder] [video input] too full or near too full (545% of size: 3041280
 [rtbufsize parameter])! frame dropped!
    Last message repeated 5 times

In short the errors are:

[NULL @ 00000000006645c0] Unable to find a suitable output format for 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key
'
rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key: Invalid argument
[dshow @ 0000000000607400] real-time buffer [screen-capture-recorder] [video input] too full or near too full (545% of size: 3041280

I have tried with and without the :1935 port number, with ffmpeg_x64.exe but no difference. Is the stream key the invalid argument or something else?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
116 views
Welcome To Ask or Share your Answers For Others

1 Answer

Figured it out with. The -f parameter is used to specif the input format dshow, but this parameter is also positionally dependent appliying to the input and/or output format if placed before the input and ouitput.

So the solution was to add the -f flv to the output as well:

ffmpeg-N-100616-gca21cb1e36-win64-gplinffmpeg.exe -f dshow -i video='screen-capture-recorder':audio='Microphone (VF0700 Live! Cam Ch' -r 24 -s 1920x1080 -qmin 3 -f flv 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key'

So, we are saying the input format is dshow by placing it before the -i flag, and the output is flv by placing it before the output (the stream channel).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...