0
ffmpeg -i CityAlley_3840x2160_50fps_8bit.yuv -vf scale=1920:1080 CityAlly.yuv

But I got the error:

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[IMGUTILS @ 0x7fffc0509b50] Picture size 0x0 is invalid
CityAlley_3840x2160_50fps_8bit.yuv: Invalid argument
llogan
  • 121,796
  • 28
  • 232
  • 243
neetu sigger
  • 11
  • 1
  • 6

1 Answers1

3

Raw video does not contain info about the picture size, so you have to manually provide it. Use:

ffmpeg -video_size 3840x2160 -i CityAlley_3840x2160_50fps_8bit.yuv -vf scale=1920:1080 CityAlly.yuv

See rawvideo demuxer documentation for more info.

llogan
  • 121,796
  • 28
  • 232
  • 243
  • It didn't get the error on screen but when I am extracting the frames then getting blurred images. (ffmpeg -video_size 3840x2160 -i CityAlley_3840x2160_50fps_8bit.yuv -vf scale=1920:1080 CityAlly.yuv) – neetu sigger Feb 25 '21 at 22:37
  • @neetusigger You have to also provide the proper `-pixel_format`. See [Error in converting raw yuv video](https://stackoverflow.com/q/65205155/) for more info. – llogan Feb 25 '21 at 22:38
  • Thank you for quick reply. I am using -pixel_format yuv420p10le but its didnot working?(for both 8bit.yuv or 10bit.yuv). – neetu sigger Feb 25 '21 at 23:24
  • @neetusigger Works for me. Make sure to use `-pixel_format` as an input option (before `-i`). Also make sure you're using the proper pixel format (see `ffmpeg -pix_fmts` for a list). Not sure what else to suggest because I'm not exactly sure what you mean by "not working". – llogan Feb 26 '21 at 00:09