[FFmpeg-user] encode to RAW video

Naveen.B navins.2006 at gmail.com
Tue Nov 1 12:00:11 EET 2022


>
>
> > I observed some weird behaviour with fast and medium preset,
>
> We've observed that you're -still- top-posting, please stop it.
>
>
> (reformatted)
> > fast preset:
> > *ffmpeg -pixel_format gray10le -s 1600x1300 -r 30 -i
> CapturedImage-%03d.raw
> Specifies the input file(s) and their characteristics.
>
> All that follows is filters and output specs.
>
> > -c:v rawvideo -pixel_format yuv420p
> Use the video codec "rawvideo" with that pixel format for output, except
> AFAICT that there is no video encoder "rawvideo" (that should throw an
> error, which because of the missing command output, we don't see).
>
>
> > -f rawvideo
> Force the output format to rawvideo ("Raw muxers accept a single stream
> matching the designated codec. They do not store timestamps or metadata.
> The
> recognized extension is the same as the muxer name unless indicated
> otherwise.") Don't use this unless there's a _really_ good reason.
>
>
> > -c:v libx264 -preset fast -crf 18
> But now use the x264 codec!!! (into a "raw" file)
>
> > test.raw*
> but call the output file "test.raw" (not "test.mp4" or something like
> that).
>
>
> What do you really want? Why this insistence on "raw" output, either as an
> "encoding" or output file?  That's making life difficult and likely
> obscuring other issues.
>

I am doing some compression analysis, So I need raw output.

>
> > command output:
> (but the the _complete_ output!! Stop making us guess about things and
> you'll get better answers.)
>
> I am pasting the complete output,



> C:\Naveen\projects\DMS\software\ffmpeg_full\ffmpeg\bin>ffmpeg
> -pixel_format gray10le -s 1600x1300 -r 30 -i CapturedImage-%03d.raw -f
> rawvideo -c:v libx264 -pixel_format yuv420p -preset fast -crf 18 test.raw
> ffmpeg version 2022-06-20-git-56419428a8-full_build-www.gyan.dev
> Copyright (c) 2000-2022 the FFmpeg developers
>   built with gcc 11.3.0 (Rev1, 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-bzlib
> --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-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e
> --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
> --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl
> --enable-libopenjpeg --enable-libvpx --enable-mediafoundation
> --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
> --enable-liblensfun --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-libshaderc --enable-vulkan --enable-libplacebo
> --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      57. 27.100 / 57. 27.100
>   libavcodec     59. 33.100 / 59. 33.100
>   libavformat    59. 25.100 / 59. 25.100
>   libavdevice    59.  6.100 / 59.  6.100
>   libavfilter     8. 41.100 /  8. 41.100
>   libswscale      6.  6.100 /  6.  6.100
>   libswresample   4.  6.100 /  4.  6.100
>   libpostproc    56.  5.100 / 56.  5.100
> Input #0, image2, from 'CapturedImage-%03d.raw':
>   Duration: 00:00:01.20, start: 0.000000, bitrate: N/A
>   Stream #0:0: Video: rawvideo (Y1[0][10] / 0xA003159), gray10le,
> 1600x1300, 25 fps, 25 tbr, 25 tbn
> File 'test.raw' already exists. Overwrite? [y/N] y
> Stream mapping:
>   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [libx264 @ 0000019dbcff6c80] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.2 AVX FMA3 BMI2 AVX2
> [libx264 @ 0000019dbcff6c80] profile High 10, level 4.2, 4:0:0, 10-bit
> Output #0, rawvideo, to 'test.raw':
>   Metadata:
>     encoder         : Lavf59.25.100
>   Stream #0:0: Video: h264, gray10le(progressive), 1600x1300, q=2-31, 30
> fps, 30 tbn
>     Metadata:
>       encoder         : Lavc59.33.100 libx264
>     Side data:
>       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
> frame=   30 fps=0.0 q=-1.0 Lsize=     320kB time=00:00:00.93
> bitrate=2807.6kbits/s speed=1.07x
> video:320kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> muxing overhead: 0.000000%
> [libx264 @ 0000019dbcff6c80] frame I:1     Avg QP:29.03  size: 66284
> [libx264 @ 0000019dbcff6c80] frame P:8     Avg QP:29.99  size: 19870
> [libx264 @ 0000019dbcff6c80] frame B:21    Avg QP:30.64  size:  4872
> [libx264 @ 0000019dbcff6c80] consecutive B-frames:  3.3%  6.7% 10.0% 80.0%
> [libx264 @ 0000019dbcff6c80] mb I  I16..4: 37.6% 50.4% 12.0%
> [libx264 @ 0000019dbcff6c80] mb P  I16..4:  2.5%  6.6%  0.5%  P16..4:
> 24.4%  5.0%  3.9%  0.0%  0.0%    skip:57.2%
> [libx264 @ 0000019dbcff6c80] mb B  I16..4:  1.6%  1.6%  0.0%  B16..8:
> 11.0%  1.3%  0.0%  direct: 7.2%  skip:77.3%  L0:42.2% L1:53.4% BI: 4.4%
> [libx264 @ 0000019dbcff6c80] 8x8 transform intra:55.9% inter:75.3%
> [libx264 @ 0000019dbcff6c80] coded y intra: 46.2% inter: 7.1%
> [libx264 @ 0000019dbcff6c80] i16 v,h,dc,p: 34% 27% 10% 29%
> [libx264 @ 0000019dbcff6c80] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 16% 34%
>  4%  4%  4%  5%  4%  6%
> [libx264 @ 0000019dbcff6c80] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 40% 21% 15%
>  4%  4%  4%  4%  3%  6%
> [libx264 @ 0000019dbcff6c80] i8c dc,h,v,p: 100%  0%  0%  0%
> [libx264 @ 0000019dbcff6c80] Weighted P-Frames: Y:0.0%
> [libx264 @ 0000019dbcff6c80] ref P L0: 51.8% 48.2%
> [libx264 @ 0000019dbcff6c80] ref B L0: 72.2% 27.8%
> [libx264 @ 0000019dbcff6c80] ref B L1: 90.7%  9.3%
> [libx264 @ 0000019dbcff6c80] kb/s:2620.43


Kind Regards,
Naveen B.


More information about the ffmpeg-user mailing list