Skip to content

Instantly share code, notes, and snippets.

@jmftrindade
Last active April 1, 2023 21:14
Show Gist options
  • Save jmftrindade/05a5d1eb6b1663b3e6d5cd164665d0af to your computer and use it in GitHub Desktop.
Save jmftrindade/05a5d1eb6b1663b3e6d5cd164665d0af to your computer and use it in GitHub Desktop.
Capture Mini DV footage from camcorder using ffmpeg

Capture Mini DV footage from camcorder using ffmpeg

Assumes:

  • OSX
  • ffmpeg (brew install ffmpeg)

Step 1 - Connect camcorder

For OSX via USB-C, the following are required:

  • Mini DV to FireWire 400 (might have come included with your camcorder)
  • FireWire 400 to FireWire 800 (Amazon)
  • FireWire 800 to Thunderbolt 2 (Apple)
  • Thunderbolt 2 to Thunderbolt 3 (Apple)

Thunderbolt 2 looks like Displayport, but it's not the same thing.

This is a long cable chain, and it's not very cheap. On a Windows box you can buy a FireWire card instead (Amazon), which would allow to bypass all but the first cable above.

Once the camera is connected, turn it on and put it on "play" mode. OSX should prompt you to allow device to be connected. If not, you can also double check that it is connected by looking for it under QuickTime as one of the available cameras.

Don't use QuickTime to capture the mini DV footage from your camcorder though, unless you don't need the audio. The audio won't be correctly captured unless you perform a "hack" that cuts the first few seconds of footage.

Step 2 - List devices

ffmpeg  -f avfoundation -list_devices true -i ""

E.g., mine is ELURA100

ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
  built with Apple clang version 14.0.0 (clang-1400.0.29.202)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2_6 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
[AVFoundation indev @ 0x14ae05180] AVFoundation video devices:
[AVFoundation indev @ 0x14ae05180] [0] NexiGo N60 FHD Webcam
[AVFoundation indev @ 0x14ae05180] [1] FaceTime HD Camera
[AVFoundation indev @ 0x14ae05180] [2] ELURA100
[AVFoundation indev @ 0x14ae05180] [3] Capture screen 0
[AVFoundation indev @ 0x14ae05180] [4] Capture screen 1
[AVFoundation indev @ 0x14ae05180] [5] Capture screen 2
[AVFoundation indev @ 0x14ae05180] AVFoundation audio devices:
[AVFoundation indev @ 0x14ae05180] [0] NexiGo N60 FHD Webcam
[AVFoundation indev @ 0x14ae05180] [1] MacBook Pro Microphone

Step 3 - Capture

ffmpeg  -f avfoundation -capture_raw_data true -i "ELURA100" -c copy -map 0 -f rawvideo output.dv

Where ELURA100 is the camcorder name obtained when listing attached devices.

The command to start capture will be on standby until you press play on the camcorder. Capture happens in real time.

For more details see this guide.

Step 4 - Compress

ffmpeg -i output.dv -vcodec h264 -acodec aac compressed.mp4

Where output.dv is the file captured in Step 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment