[FFmpeg-user] capture from camera (macOS) and pass video to ffplay

Peter Gusev gpeetonn at gmail.com
Wed Sep 12 19:09:26 EEST 2018


Hi! well I'm sure the ones I tried are incorrect as I'm not familiar with
ffmpeg much. But here's one of them:

ffmpeg -f avfoundation -framerate 30 -i "0" -f rawvideo -pix_fmt argb - |
ffplay -f rawvideo -s1280x720 -pix_fmt argb -i -
ffmpeg version 3.4ffplay version 3.4 Copyright © 2000-2017 the FFmpeg
developers Copyright © 2003-2017 the FFmpeg developers

  built with Apple LLVM version 9.0.0 (clang-900.0.38)
  built with Apple LLVM version 9.0.0 (clang-900.0.38)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared
--enable-pthreads --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl
--enable-ffplay --enable-libmp3lame --enable-libx264 --enable-libxvid
--enable-opencl --enable-videotoolbox --disable-lzma
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4 --enable-shared
--enable-pthreads --enable-version3 --enable-hardcoded-tables
--enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl
--enable-ffplay --enable-libmp3lame --enable-libx264 --enable-libxvid
--enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
  libpostproc    54.  7.100 / 54.  7.100
Failed to set value '-pix_fmt' for option 's1280x720': Option not found
2018-09-12 09:06:43.611 ffmpeg[79783:2432910] Error loading
/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn:
dlopen(/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn,
262): no suitable image found.  Did find:
/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn:
mach-o, but wrong architecture
/Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin/Contents/MacOS/SeratoVirtualAudioPlugIn:
mach-o, but wrong architecture
2018-09-12 09:06:43.611 ffmpeg[79783:2432910] Cannot find function pointer
New_SHP_PlugIn for factory 834FC054-C1CC-11D6-BD01-00039315CD46 in
CFBundle/CFPlugIn 0x7fbbac7080b0
</Library/Audio/Plug-Ins/HAL/SeratoVirtualAudioPlugIn.plugin> (bundle, not
loaded)
[avfoundation @ 0x7fbbad000000] Selected pixel format (yuv420p) is not
supported by the input device.
[avfoundation @ 0x7fbbad000000] Supported pixel formats:
[avfoundation @ 0x7fbbad000000]   uyvy422
[avfoundation @ 0x7fbbad000000]   yuyv422
[avfoundation @ 0x7fbbad000000]   nv12
[avfoundation @ 0x7fbbad000000]   0rgb
[avfoundation @ 0x7fbbad000000]   bgr0
[avfoundation @ 0x7fbbad000000] Overriding selected pixel format to use
uyvy422 instead.
Input #0, avfoundation, from '0':
  Duration: N/A, start: 175.304500, bitrate: N/A
    Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720, 30
tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Press [q] to stop, [?] for help
Output #0, rawvideo, to 'pipe:':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: rawvideo (ARGB / 0x42475241), argb, 1280x720,
q=2-31, 884736 kb/s, 30 fps, 30 tbn, 30 tbc
    Metadata:
      encoder         : Lavc57.107.100 rawvideo

thanks!

On Wed, 12 Sep 2018 at 06:54, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:

> 2018-09-12 1:25 GMT+02:00, Peter Gusev <gpeetonn at gmail.com>:
> > Hi there! I need to capture video from a camera (macOS) and then pass it
> > through a file pipe to ffplay for displaying it. Can't figure out how to
> > specify ffmpeg's output pixel format. When passing -pix_fmt argb ffmpeg
> > says that the format is incompatible with the input device (?).
>
> Command line and complete, uncut console output missing.
>
> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".



-- 
Peter Gusev <https://www.linkedin.com/in/peter-gusev-8135441a/>
*gpeetonn at gmail.com <gpeetonn at gmail.com>*


*+1 213 587-27-48*


*Research Scholar @ REMAP UCLA <http://www.remap.ucla.edu/home/about>Video
streaming/ICN networks/Creative Coding/Interactive Media*
*dj peetonn <https://soundcloud.com/peter-gusev>*


More information about the ffmpeg-user mailing list