
Another dive down the ffmpeg rathole
Lazyweb: how do I get video out of a Blackmagic UltraStudio MiniRecorder using ffmpeg on a Mac?
I tried this once before and gave up, but I'm trying again.
I am attempting this because Flash Media Live Encoder is a piece of shit, and maybe ffmpeg is less of a piece of shit. Har har har.
Flash Media Live Encoder is successfully reading video from this device, and it is configured to read 1280x720 video @ 60 FPS. I believe that that's the only configuration that works.
ffmpeg 3.0.2 sees the AVFoundation devices:
- % ffmpeg -list_devices true -f avfoundation -i ''
...
[AVFoundation input device @ 0x7fc879430480] AVFoundation video devices:
[AVFoundation input device @ 0x7fc879430480] [0] Blackmagic
[AVFoundation input device @ 0x7fc879430480] [1] Capture screen 0
[AVFoundation input device @ 0x7fc879430480] AVFoundation audio devices:
[AVFoundation input device @ 0x7fc879430480] [0] Blackmagic Audio
[AVFoundation input device @ 0x7fc879430480] [1] Built-in Input
If I do the following, I get an MP4 file that has audio read from the system's line-in, and has video in it, but the video is black:
- ffmpeg -f avfoundation \
-video_size 1920x1080 -framerate 30 \
-i Blackmagic:Built-in \
-r 16 -t 3 -pix_fmt yuv420p out.mp4
It describes the input as:
- Input #0, avfoundation, from 'Blackmagic:Built-in':
Duration: N/A, start: 9940065.201200, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1920x1080, 1000k tbr, 1000k tbn, 1000k tbc
But if I do "-video_size 1280x720 -framerate 60", which is what FMLE is configured to use, I get this:
- [avfoundation @ 0x7fc7db813800] decoding for stream 0 failed
[avfoundation @ 0x7fc7db813800] Could not find codec parameters for stream 0 (Video: rawvideo (UYVY / 0x59565955), uyvy422): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, avfoundation, from 'Blackmagic:Built-in':
Duration: N/A, start: 9939377.616689, bitrate: N/A
Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 60 fps, 60 tbr, 1000k tbn, 1000k tbc
Stream #0:1: Audio: pcm_f32le, 44100 Hz, stereo, flt, 2822 kb/s
[buffer @ 0x7fc7dc4129c0] Unable to parse option value "0x0" as image size
Last message repeated 1 times
Last message repeated 1 times
[buffer @ 0x7fc7dc4129c0] Error setting option video_size to value 0x0.
If I specify a bogus frame rate, I can get it to show me the list:
- [avfoundation @ 0x7fd893813800] Supported modes:
[avfoundation @ 0x7fd893813800] 720x486@[29.970030 29.970030]fps
[avfoundation @ 0x7fd893813800] 720x486@[23.976024 23.976024]fps
[avfoundation @ 0x7fd893813800] 720x486@[59.940060 59.940060]fps
[avfoundation @ 0x7fd893813800] 720x576@[25.000000 25.000000]fps
[avfoundation @ 0x7fd893813800] 720x576@[50.000000 50.000000]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[23.976024 23.976024]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[24.000000 24.000000]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[25.000000 25.000000]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[29.970030 29.970030]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[30.000000 30.000000]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[25.000000 25.000000]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[29.970030 29.970030]fps
[avfoundation @ 0x7fd893813800] 1920x1080@[30.000000 30.000000]fps
[avfoundation @ 0x7fd893813800] 1280x720@[50.000000 50.000000]fps
[avfoundation @ 0x7fd893813800] 1280x720@[59.940060 59.940060]fps
[avfoundation @ 0x7fd893813800] 1280x720@[60.000000 60.000000]fps
Tags: computers, firstperson, lazyweb, mac
The H Word

They: Well now you're just thinking like a hacker.
Me: What am I supposed to think like? A victim?
Tags: firstperson