[FFmpeg-user] raw file to video

Naveen.B navins.2006 at gmail.com
Sat Oct 15 11:06:22 EEST 2022


A good start would be the complete uncut command line output which might
have some extra info, a sample could be useful, and perhaps info about the
raw file.
C:\Naveen\projects\DMS\software\ffmpeg_full\ffmpeg\bin>ffmpeg -pixel_format
gray10be -s 1600x1300 -r 30 -i CapturedImage-%03d.raw -c:v libx264 -crf 18
raw_video.mp4
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 ([10][0]1Y / 0x5931000A), gray10be,
1600x1300, 25 fps, 25 tbr, 25 tbn
File 'raw_video.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 00000188a8417740] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 00000188a8417740] profile High 10, level 4.2, 4:0:0, 10-bit
[libx264 @ 00000188a8417740] 264 - core 164 r3095 baee400 - H.264/MPEG-4
AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html -
options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=0 trellis=1 8x8dct=1
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12
lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=18.0
qcomp=0.60 qpmin=0 qpmax=81 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'raw_video.mp4':
  Metadata:
    encoder         : Lavf59.25.100
  Stream #0:0: Video: h264 (avc1 / 0x31637661), gray10le(pc, progressive),
1600x1300, q=2-31, 30 fps, 15360 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=9.9 q=-1.0 Lsize=   40401kB time=00:00:00.90
bitrate=367715.4kbits/s speed=0.297x
video:40400kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.002673%
[libx264 @ 00000188a8417740] frame I:1     Avg QP:48.14  size:1326419
[libx264 @ 00000188a8417740] frame P:29    Avg QP:47.99  size:1380785
[libx264 @ 00000188a8417740] mb I  I16..4: 52.1% 31.1% 16.8%
[libx264 @ 00000188a8417740] mb P  I16..4: 16.4% 20.0% 10.0%  P16..4: 49.9%
 1.7%  2.1%  0.0%  0.0%    skip: 0.0%
[libx264 @ 00000188a8417740] 8x8 transform intra:42.3% inter:22.4%
[libx264 @ 00000188a8417740] coded y intra: 99.9% inter: 100.0%
[libx264 @ 00000188a8417740] i16 v,h,dc,p: 25% 21% 22% 32%
[libx264 @ 00000188a8417740] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 17% 18% 10%
 6%  7%  7%  8% 11%
[libx264 @ 00000188a8417740] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 31% 21%  2%
 1%  1%  2%  1%  2%
[libx264 @ 00000188a8417740] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 00000188a8417740] Weighted P-Frames: Y:0.0%
[libx264 @ 00000188a8417740] ref P L0: 41.7% 30.9% 27.3%
[libx264 @ 00000188a8417740] kb/s:330953.41
C:\Naveen\projects\DMS\software\ffmpeg_full\ffmpeg\bin>

Is it definitely 10bit gray?
The image from the camera is in RAW 10 for RAW image files, The camera also
stores images in .bmp but when I try with .bmp files I can see video after
conversion (camera vendor using YUV2 as wrapper to store .bmp files).
When I try to convert the single RAW file to .jpg/bmp I can see the Image
of that but not the video conversion.

Which video player have you used to play it back, have you tried another
like mpv?
.mp4 and .avi, -mpv I tried but I got an error message.

Kind Regards,
Naveen B.

On Sat, Oct 15, 2022 at 9:12 AM Kieran O Leary <kieran.o.leary at gmail.com>
wrote:

> On Fri 14 Oct 2022 at 14:39, Naveen.B <navins.2006 at gmail.com> wrote:
>
> > Hello,
> >
> > I am trying to convert a set of raw files in directory to the .mp4 video
> > using the ffmpeg command, the converted .mp4 video looks completely blank
> > and I don't see any pictures in it.
> >
> > ffmpeg -pixel_format gray10le -video_size 1600x1300 -framerate 30 -i
> > CapturedImage-%03d.raw -c:v libx264 raw_video.mp4
> >
> > Is something wrong in the command?
>
>
> A good start would be the complete uncut command line output which might
> have some extra info, a sample could be useful, and perhaps info about the
> raw file. Is it definitely 10bit gray? Which video player have you used to
> play it back, have you tried another like mpv?
>
> Best,
>
> Kieran
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list