First of all, I'm not very good at FFmpeg and capturing.
so... I am trying to record capture card source using ffmpeg below.
ffmpeg -f dshow -pixel_format yuyv422 -rtbufsize 18000k -video_size 1920x1080 -framerate 29.97 -i video="[my capture card]":audio="[my capture card audio source]" -pix_fmt yuv420p -c:v h264_nvenc -flags +ilme+ildct -x264opts tff -b:v 12000k -maxrate 22000k -profile:v high -preset veryfast -c:a aac -b:a 192k -y output.ts
I want to capture it top field interlaced video. but it is fixed bff. I tried many times with other many options but It's always fixed as bff.
I want to force tff, please help me how to do it..
Thank you for helping and reading. have a nice day
+ I added the ffmpeg logs. Please check
+i added ffmpeg log
ffmpeg -f dshow -pixel_format yuyv422 -video_size 1920x1080 -framerate 29.97 -i video="capturecard":audio="capturecard" -f nut -vf "fieldorder=tff" -vcodec rawvideo - -loglevel panic | ffmpeg -i - -pix_fmt yuv420p -vf "fieldorder=tff" -flags:v +ildct+ilme -x264opts tff=1 -top 1 -rtbufsize 20000k -c:v h264_nvenc -b:v 12000k -minrate 12000k -maxrate 22000k -profile:v 2 -preset 1 -c:a aac -b:a 192k p7.ts
ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100 built with gcc 10.2.0 (Rev6, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.100
Input #0, nut, from 'pipe:': Metadata: encoder : Lavf58.76.100 Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1920x1080, 29.97 tbr, 59.94 tbn, 59.94 tbc Metadata: encoder : Lavc58.134.100 rawvideo Stream #0:1: Audio: vorbis (oV[0][0] / 0x566F), 44100 Hz, stereo, fltp Metadata: encoder : Lavc58.134.100 libvorbis
Codec AVOption x264opts (x264 options) specified for output file #0 (p7.ts) 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.
Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (h264_nvenc)) Stream #0:1 -> #0:1 (vorbis (native) -> aac (native))
Output #0, mpegts, to 'p7.ts': Metadata: encoder : Lavf58.76.100 Stream #0:0: Video: h264 (High), yuv420p(tv, progressive), 1920x1080, q=2-31, 12000 kb/s, 29.97 fps, 90k tbn Metadata: encoder : Lavc58.134.100 h264_nvenc Side data: cpb: bitrate max/min/avg: 22000000/0/12000000 buffer size: 24000000 vbv_delay: N/A Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 192 kb/s Metadata: encoder : Lavc58.134.100 aac
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 10 of 10
Thread
-
Last edited by lawzi; 12th Jul 2021 at 21:52.
-
The capture device determines whether to capture tff or bff. If you want tff from your bff capture device you need to convert it yourself. I don't know the ffmpeg filters for this but what you want to do is separate the fields, discard the first one (a bottom field), then weave the fields back together.
-
Instead generic ffmpeg flags use x264 dedicated flags -
something like (just example for "x264opts"):
Code:@SET x264opts="qp=16:qpmin=8:level=4.1:ref=0:bframes=0:no-chroma-me=1:subme=2:open_gop=0:keyint=1:tff=1:interlaced=1:bluray_compat=1:pic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:cabac=0:no_psnr=1:no_ssim=1:colorprim=bt709:transfer=bt709:colormatrix=bt709:stitchable=1:no-psy=1:scenecut=0:no-deblock=1:aq-mode=0" @ffmpeg.exe -c:v libx264 -preset:v ultrafast -tune:v fastdecode -profile:v high -x264opts %x264opts% -x264-params %x264opts%
-
-
You're using -c:v h264_nvenc , but -x264opts
use -c:v libx264 instead of -c:v h264_nvenc
You have -pixel_format yuyv422 and -pix_fmt yuv420p
If the device is sending 4:2:2 , and you want to convert it to 4:2:0, you're doing it in a progressive manner. This will result in interlaced chroma artifacts. You would need to set the sws flags to interlaced scaling when downscaling the chroma
Instead of -pix_fmt yuv420p; use -vf scale=interl=1,format=yuv420p -
-
Thank you for replay. I tried like below
ffmpeg -f dshow -pixel_format yuyv422 -rtbufsize 18000k -video_size 1920x1080 -framerate 29.97 -i video="capt card":audio="cap card" -vf scale=interl=1,format=yuv420p -c:v libx264 -x264opts qp=16:qpmin=8:level=4.1:ref=0:bframes=0:no-chroma-me=1ubme=2pen_gop=0:keyint=1:tff=1:interlaced=1:bluray_compa t=1ic_struct=1:aud=1:nal_hrd=vbr:force_cfr=1:cabac=0: no_psnr=1:no_ssim=1:colorprim=bt709:transfer=bt709 :colormatrix=bt709titchable=1:no-psy=1cenecut=0:no-deblock=1:aq-mode=0 -g 15 -flags +ilme+ildct -top 1 -b:v 12000k -minrate 12000k -maxrate 22000k -preset 1 -c:a aac -b:a 192k -y p7a.ts
I literally pasted above pandy's x264 opts. and changed nvenc to x264.. but it was still output the bottom field.
I dont know what is the problem : < -
-vf setfield=tff
Code:-vf setfield=tff,scale=interl=1,format=yuv420p
-
Similar Threads
-
FFMPEG to transcode 50i h264, problems with field order
By ffml in forum Newbie / General discussionsReplies: 6Last Post: 2nd Jul 2020, 06:02 -
Forcing TFF / BFF encoding with ffmpeg x.264
By Sharc in forum Newbie / General discussionsReplies: 2Last Post: 9th May 2020, 06:08 -
ffmpeg changes interlaced to progressive
By SF01 in forum Video ConversionReplies: 12Last Post: 30th Mar 2020, 10:51 -
Capturing interlaced video as interlaced - Is it possible
By jvid in forum CapturingReplies: 5Last Post: 16th May 2017, 23:07 -
TFF or BFF & prog to interlaced issues for Blu-Ray
By brassplyer in forum EditingReplies: 1Last Post: 25th Dec 2016, 01:36