VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member
    Join Date
    Mar 2013
    Location
    Planet Earth
    Search PM
    Hi,

    I'm trying to capture some old movies on VHS ( NTSC/PAL) tapes using ffmpeg on Win7-64bit. I've Panasonic AG1 VCR and I'm using Elgato USB device
    Code:
     https://www.elgato.com/en/video-capture
    connected through the composite out. The software came with the device support x264/mp4 output however it doesn't provide any options to change the x264 parameters or any filter options. This device does provide directshow interface. So I thought to use ffmpeg command line and capture the video but it's not working for me. This is my first attempt using ffmpeg. I would appreciate if someone could help or provide some suggestion to make it work. Thanks!

    Code:
    ffmpeg -rtbufsize 1500M -f dshow -video_size 720x576 -framerate 25 -pixel_format uyvy422 -threads 0  -audio_pin_name 3 -video_pin_name 2 -i video="Elgato Video Capture" -vcodec libx264 -preset:v slower -crf 20  -x264-params keyint=240:min-keyint=20 -c:a aac -b:a 128k test.mkv
    ffmpeg version N-82117-gc117343 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.4.0 (GCC)
      configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
      libavutil      55. 33.100 / 55. 33.100
      libavcodec     57. 63.103 / 57. 63.103
      libavformat    57. 55.100 / 57. 55.100
      libavdevice    57.  0.103 / 57.  0.103
      libavfilter     6. 64.100 /  6. 64.100
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  2.100 /  2.  2.100
      libpostproc    54.  0.100 / 54.  0.100
    Input #0, dshow, from 'video=Elgato Video Capture':
      Duration: N/A, start: 39455.522000, bitrate: N/A
        Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x576, 25 fps, 25 tbr, 10000k tbn, 10000k tbc
    Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (test.mkv) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
    File 'test.mkv' already exists. Overwrite ? [y/N] y
    No pixel format specified, yuv422p for H.264 encoding chosen.
    Use -pix_fmt yuv420p for compatibility with outdated media players.
    [libx264 @ 00000000002fcee0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
    [libx264 @ 00000000002fcee0] profile High 4:2:2, level 3.1, 4:2:2 8-bit
    [libx264 @ 00000000002fcee0] 264 - core 148 r2721 72d53ab - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=8 deblock=1:0:0 analyse=0x3:0x133 me=umh subme=9 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=2 b_bias=0 direct=3 weightb=1 open_gop=0 weightp=2 keyint=240 keyint_min=20 scenecut=40 intra_refresh=0 rc_lookahead=60 rc=crf mbtree=1 crf=20.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, matroska, to 'test.mkv':
      Metadata:
        encoder         : Lavf57.55.100
        Stream #0:0: Video: h264 (libx264) (H264 / 0x34363248), yuv422p, 720x576, q=-1--1, 25 fps, 1k tbn, 25 tbc
        Metadata:
          encoder         : Lavc57.63.103 libx264
        Side data:
          cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream mapping:
      Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
    Press [q] to stop, [?] for help
    [dshow @ 00000000006a8fe0] real-time buffer [Elgato Video Capture] [video input] too full or near too full (62% of size: 1500000000 [rtbufsize parameter])! frame dropped!
        Last message repeated 1 times
    [dshow @ 00000000006a8fe0] real-time buffer [Elgato Video Capture] [video input] too full or near too full (62% of size: 1500000000 [rtbufsize parameter])! frame dropped!
        Last message repeated 4 times
    Code:
    ffmpeg -f dshow -list_options true -i video="Elgato Video Capture"
    ffmpeg version N-82117-gc117343 Copyright (c) 2000-2016 the FFmpeg developers
      built with gcc 5.4.0 (GCC)
      configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
      libavutil      55. 33.100 / 55. 33.100
      libavcodec     57. 63.103 / 57. 63.103
      libavformat    57. 55.100 / 57. 55.100
      libavdevice    57.  0.103 / 57.  0.103
      libavfilter     6. 64.100 /  6. 64.100
      libswscale      4.  1.100 /  4.  1.100
      libswresample   2.  2.100 /  2.  2.100
      libpostproc    54.  0.100 / 54.  0.100
    [dshow @ 00000000004a28c0] DirectShow video device options (from video devices)
    [dshow @ 00000000004a28c0]  Pin "Capture" (alternative pin name "2")
    [dshow @ 00000000004a28c0]   pixel_format=uyvy422  min s=88x72 fps=25 max s=720x576 fps=25
    [dshow @ 00000000004a28c0]   pixel_format=uyvy422  min s=80x60 fps=29.97 max s=720x480 fps=29.97
    [dshow @ 00000000004a28c0]   pixel_format=uyvy422  min s=88x72 fps=25 max s=720x576 fps=25
    [dshow @ 00000000004a28c0]   pixel_format=gray  min s=88x72 fps=25 max s=720x576 fps=25
    [dshow @ 00000000004a28c0]  Pin "Audio Out" (alternative pin name "3")
    [dshow @ 00000000004a28c0] Crossbar Switching Information for Elgato Video Capture:
    [dshow @ 00000000004a28c0]   Crossbar Output pin 0: "Video Decoder" related output pin: 1 current input pin: 0 compatible input pins: 0 1
    [dshow @ 00000000004a28c0]   Crossbar Output pin 1: "Audio Decoder" related output pin: 0 current input pin: 2 compatible input pins: 2
    [dshow @ 00000000004a28c0]   Crossbar Input pin 0 - "Video Composite" related input pin: 2
    [dshow @ 00000000004a28c0]   Crossbar Input pin 1 - "S-Video" related input pin: 2
    [dshow @ 00000000004a28c0]   Crossbar Input pin 2 - "Audio Line" related input pin: 0
    video=Elgato Video Capture: Immediate exit requested
    Quote Quote  
  2. Even if you get it working it probably won't get you what you want. If it's like my older El Gato Game Caputure HD the DirectShow driver simply decompresses the AVC/AAC streams that come over the USB cable. So you'll get exactly the same video with the same compression artifacts, just decompressed, forcing you to re-compress it, wasting more CPU time, and adding more compression artifacts.
    Last edited by jagabo; 18th Feb 2017 at 20:41.
    Quote Quote  
  3. Increase buffer size, try to use fastest h264 preset possible...
    Quote Quote  
  4. (deleted after reading post #2)
    Last edited by raffriff42; 19th Feb 2017 at 02:52.
    Quote Quote  
  5. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    What is this obsession with trying to accomplish things by going backwards to the days of typing in DOS-like commands?
    Quote Quote  
  6. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Often, power-for-ease-of-use is a fair trade.
    Quote Quote  
  7. Originally Posted by hech54 View Post
    What is this obsession with trying to accomplish things by going backwards to the days of typing in DOS-like commands?
    Automation? Avoiding human error?
    Quote Quote  
  8. Member
    Join Date
    Mar 2013
    Location
    Planet Earth
    Search PM
    Thanks guys. Any recommendations for a better way/setup to capture the tape at source to produce mkv/x264 encode?

    Thanks
    Quote Quote  
  9. Member
    Join Date
    Dec 2020
    Location
    Valladolid
    Search PM
    I have been playing with my "Elgato Video Capture".

    I wanted the full raw signal because i wanted to feed it to a Neural AI Video enhancer.

    My current gess is:

    1)The Main software is doing stuff, Mainly Deinterlace, Re-Encode the progressive video, sync audio?
    2)The Analog Audio In (Elgato Video Capture) dshow device is for internal use only (at least in windows)
    3)Playing around with it, i managed to get a video and audio signal. If you have been using VirtualDub or the original elgato software please restart PC.
    (RESTART PC SHOULD RESET ALL DSHOW CROSSBAR SETTINGS)
    Code:
    ffmpeg -rtbufsize 1500M -f dshow -show_video_device_dialog true -show_video_crossbar_connection_dialog true -i video="Elgato Video Capture":audio="Elgato Video Capture"
    -c:v ffv1 -level 3 -threads 6 -coder 1 -context 1 -g 1 -slices 24 -slicecrc 1
    -field_order tt -color_primaries bt470bg -color_trc gamma28|bt470bg -colorspace bt470bg
    -c:a copy lossless.mkv //-c:a libfdk_aac -b:a 128k -ar 48000 -channels 2 losslessVideoOnly.mkv
    
    ffmpeg -filter:v idet -frames:v 900 -an -f rawvideo -y NUL -i lossless.mkv
    ffprobe -i lossless.mkv -debug 1
    First dialog put the "format" of the record. Second dialog use it to link the audio to the video stream.


    I am not 100% confident about the quality that is being output but ffmpeg reports input stream as uyvy and pcm_s16le max settings both.
    Image Attached Thumbnails Click image for larger version

Name:	crossbar.JPG
Views:	733
Size:	29.9 KB
ID:	62366  

    Last edited by dolpsdw; 15th Dec 2021 at 08:46.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!