1

I can extract the frames using below ffmpeg but it comes out 720x576 square pixel instead of anamorphic non-square 1024x576. How do I output 720x576 rectangle pixel as shown on TV?

How do i deinterlace the frames as output is interlaced?

ffmpeg -i Midnight.vob -vf fps=1,setdar=16:9 -q:v 2 Midnight%06d.jpg

How do i deal with this below in ffmpeg.

[swscaler @ 0000000002a8ec40] deprecated pixel format used, make sure you did set range correctly. Video: mjpeg, yuvj420p(pc).

Am I to understand that the video colour format is out of date and that (pc) is the range 0-255 for colours?

ffmpeg -i Midnight.vob -vf fps=1,setdar=16:9 -q:v 2 Midnight%06d.jpg ffmpeg version N-93828-g68bac50604 Copyright (c) 2000-2019 the FFmpeg developers

built with gcc 8.3.1 (GCC) 20190414 configuration: --enable-gpl
--enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt libavutil      56. 26.101 / 56. 26.101 libavcodec     58. 52.101 / 58.
52.101 libavformat    58. 27.103 / 58. 27.103 libavdevice    58.  7.100 / 58.  7.100 libavfilter     7. 50.100 /  7. 50.100 libswscale      5.  4.100 /  5.  4.100 libswresample   3.  4.100 /  3.  4.100 libpostproc    55.  4.100 / 55.  4.100 Input #0, mpeg, from 'Midnight.vob':   Duration: 00:42:04.58, start: 0.287267, bitrate: 5829 kb/s
    Stream #0:0[0x1bf]: Data: dvd_nav_packet
    Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:3[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:4[0x82]: Audio: ac3, 48000 Hz, mono, fltp, 192 kb/s
    Stream #0:5[0x22]: Subtitle: dvd_subtitle
    Stream #0:6[0x24]: Subtitle: dvd_subtitle
    Stream #0:7[0x25]: Subtitle: dvd_subtitle
    Stream #0:8[0x26]: Subtitle: dvd_subtitle
    Stream #0:9[0x28]: Subtitle: dvd_subtitle
    Stream #0:10[0x21]: Subtitle: dvd_subtitle
    Stream #0:11[0x23]: Subtitle: dvd_subtitle Stream mapping:   Stream #0:1 -> #0:0 (mpeg2video (native) -> mjpeg (native)) Press [q] to stop, [?] for help [swscaler @ 000000000295ec40] deprecated pixel format used, make sure you did set range correctly Output #0, image2, to 'Midnight%06d.jpg':   Metadata:
    encoder         : Lavf58.27.103
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 720x576 [SAR 36:5 DAR 9:1], q=2-31, 200 kb/s, 1 fps, 1 tbn, 1 tbc
    Metadata:
      encoder         : Lavc58.52.101 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1 [mpeg @ 0000000000400340] New subtitle stream 0:12 at pos:7458830 and DTS:12.4873s [mpeg @ 0000000000400340] New subtitle stream 0:13 at pos:7475214 and DTS:12.4873s frame=  951 fps=115 q=2.0 Lsize=N/A time=00:15:51.00 bitrate=N/A speed= 115x

video:49190kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

Settled on for large jpg to render then shrink to 1024x576. If deinterlace remove yadif=1.

ffmpeg -i input.vob -vf yadif=1,scale=4096x2304,setdar=16:9 -qmin 1 -q:v 1 output%06d.jpg

Jpg is original size 1024x576 square pixel.

ffmpeg -i input.vob -vf yadif=1,fps=1,scale=iw*sar:ih,setsar=1 -qmin 1 -q:v 1 output%06d.jpg

Png gives better quality over jpg.

Thanks for your contributions.

  • Share full log. – Gyan May 12 '19 at 04:48
  • This is mediainfo dump, not the log of the ffmpeg command. – Gyan May 12 '19 at 08:41
  • re: deprecated format, see https://stackoverflow.com/a/43038480/192373 – Alex Cohn May 12 '19 at 09:16
  • re: size of the output jpg frames, you can simply use `-vf scale=1024x576` – Alex Cohn May 12 '19 at 09:28
  • @AlexCohn is this ok ffmpeg -i Midnight.vob -vf yadif=1,fps=1,scale=1024x576,setdar=16:9 -qmin 1 -q:v 1 Midnight%06d.png does the order of command matter? -q before -vf or what? Can i assume satdar no longer needed? I will be putting the images back together as video file so i need this bearing in mind. Thanks. – user10246830 May 12 '19 at 09:46
  • There is no substitute for trying few options. I don't think the **fps**, **yadif**, **setdar** or **-q** are necessary when you produce **jpg** images. Whether you use these **jpg** files later to produce a video file, does not matter. But only your experiments, based on your own input file(s) and workflow, must be trusted. – Alex Cohn May 12 '19 at 09:59
  • @user10246830 How are you viewing the output images? – Gyan May 12 '19 at 10:16
  • @AlexCohn `q` is used to set the quality level for the jpeg encoder. `yadif` is to deinterlace, else the JPEG image will be an interlacing of field pairs.JFIF can store aspect ratio (and ffmpeg does) so `setdar` will have an effect. No framerate is stored in JFIF files, but `fps` is being used here to pick one frame per second of input video, so it also has an effect. – Gyan May 12 '19 at 10:19
  • @Gyan Topaz gigapixel, Reshade, normal window picture viewer. – user10246830 May 12 '19 at 10:21
  • These probably don't apply JFIF aspect ratio. Scale to square pixel i.e. `scale=iw*sar:ih,setsar=1` – Gyan May 12 '19 at 11:25
  • Your last update (*Settled on…*) could be posted as an answer. On SO, you are encouraged to answer your own questions, and accept such answer to improve discoverability. – Alex Cohn May 13 '19 at 06:39

0 Answers0