Changes between Version 2 and Version 3 of Capture/Blackmagic
- Timestamp:
- Mar 21, 2016, 8:48:37 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Capture/Blackmagic
v2 v3 2 2 = Windows = 3 3 4 Blackmagic is using the protocol dshow with DirectLink, I have tested the commands in this page with a BlackMagic intensity Pro 4K PCI-E, you might have different settings. 5 You need to be specific on the parameters you define, otherwise ffmpeg is going to record a black video. 4 Blackmagic is using the protocol protocol with !DirectLink, I have tested the commands in this page with a Blackmagic intensity Pro 4K PCI-E, you might have different settings. 5 6 You need to be specific on the parameters you define, otherwise `ffmpeg` is going to record a black video. 6 7 7 8 8 9 == List devices == 9 10 10 Check with FFMPEG if your blackmagicis installed correctly by running the following command:11 Check with `ffmpeg` if your Blackmagic device is installed correctly by running the following command: 11 12 12 13 {{{ 13 14 ffmpeg -list_devices true -f dshow -i dummy 14 15 15 16 16 [dshow @ 000000a9a5eaa880] DirectShow video devices (some may be both video and audio devices) … … 32 32 {{{ 33 33 ffmpeg -list_options true -f dshow -i video="Decklink Video Capture" 34 35 34 36 35 [dshow @ 0000007201cda8a0] DirectShow video device options (from video devices) … … 88 87 [dshow @ 0000007201cda8a0] vcodec=r210 min s=3840x2160 fps=29.97 max s=3840x2160 fps=29.97 89 88 [dshow @ 0000007201cda8a0] vcodec=r210 min s=3840x2160 fps=30 max s=3840x2160 fps=30 90 91 92 89 }}} 93 90 … … 98 95 {{{ 99 96 ffmpeg -list_options true -f dshow -i audio="Decklink Audio Capture" 100 101 97 }}} 102 98 103 99 == My solution to find out the correct parameters == 104 Open your Blackmagic Media Express and in the preferences check all combination until you can see the live capture, you can narrow it down by video format and framerate if you know what kind of output your device is giving. 100 101 Open your Blackmagic Media Express and in the preferences check all combination until you can see the live capture. You can narrow it down by video format and framerate if you know what kind of output your device is giving. 105 102 106 103 I was capturing from a Lumix GH4, so my settings were: 107 Resolution = 1920x1080108 FPS = 59.94109 Pixel format = uyvy422110 104 111 Most important Lumix say that it outputs at 60 FPS but FFMPEG needed to set to 59.94 rather than 60, and this was a difference from a black video and a real capture. 105 * Resolution = 1920x1080 106 * FPS = 59.94 107 * Pixel format = uyvy422 108 109 Most importantly, Lumix shows that it outputs at 60 FPS but `ffmpeg` needed to set to 59.94 rather than 60, and this was a difference from a black video and a real capture. 112 110 113 111 … … 119 117 120 118 121 The line above is capturing a FULL HD video at 60 FPS and converting into h264 video without compressing, that means your file is going to be very big! In my case I was capturing few seconds so I didnt care much. 122 I add the parameter -an to remove audio capturing as I wasnt interested, but I suppose by removing it, it will capture the audio without adding extra parameters. 119 The line above is capturing a full HD video at 60 FPS and converting into lossless H.264 video–that means your file is going to be very big! In my case I was capturing few seconds so I didn't care much. I added the parameter `-an` to remove audio capturing as I wasn't interested in audio, but I suppose by removing `-an` it will capture the audio without adding extra parameters. 123 120 124 On my final command line I had to add "-vsync drop" before "-f dshow" due to a strange issue where FFMPEGneeded to be restarted 5 times before capturing at 60 FPS.121 On my final command line I had to add `-vsync drop` before `-f dshow` due to a strange issue where `ffmpeg` needed to be restarted 5 times before capturing at 60 FPS. 125 122 126 123 == Re-encoding == 127 In my case I was doing a re-encoding after the capture in h264 but with higher compression.128 124 125 In my case I was doing a re-encoding after the capture in H.264 but with higher compression. 129 126 130 127 {{{ 131 128 ffmpeg -y -i output.mp4 -pix_fmt yuv420p -c:v libx264 -crf 23 compressed.mp4 132 133 129 }}} 134 130 135 Don t forget to add yuv420potherwise some players would not able to play the file, only VLC.131 Don't forget to add `-pix_fmt yuv420p` otherwise some players would not able to play the file, only VLC. 136 132 137 133 == Source == 138 Post on StackOverflow 139 [http://stackoverflow.com/questions/19212047/ffmpeg-command-line-for-capturing-and-recording-audio-and-video-in-720p-from-d]140 Various forums 134 135 * [http://stackoverflow.com/questions/19212047/ffmpeg-command-line-for-capturing-and-recording-audio-and-video-in-720p-from-d ffmpeg command line for capturing (and recording) audio and video in 720p from decklink card using Windows 7] 136