Author Topic: Any chance of restoring 'File > Save > Save Selection as JPEG Images' function?  (Read 4496 times)

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
make sure you have 64-bit version of ffmpeg (could be a 32-bit issue)
try with the resolution of the source video:
Quote
3840 × 2160 Ultra-high-definition television
5120 × 2160 Ultra-wide-television
4096 × 2160 DCI 4K (native resolution)
4096 × 1716 DCI 4K (CinemaScope cropped)
3996 × 2160 DCI 4K (flat cropped)
like -s WxH
Code: [Select]
-s 3996x2160
source: 6.3 Video and Audio file format conversion
« Last Edit: May 13, 2016, 10:08:58 AM by Jan Gruuthuse »

BG Davis

  • Jr. Member
  • **
  • Posts: 98
I'll give it a try.
The original 4K frames from my camera are 3840x2160, so I will use that.
I notice that according ffmpeg, "Images will be rescaled to fit the new WxH values. "
I'm not trying to rescale anything, just capture what I have--we'll see what happens.

BG Davis

  • Jr. Member
  • **
  • Posts: 98
OK, I did it.
Results were mixed.
I captured 3 versions of the same frame.
1. Using sequence capture with ffmpeg, save as JPG.  Then crop and save as TIF for comparison of details and IQ.
2. Using sequence capture with ffmpeg, save as PNG.  Then crop and save as TIF for comparison of details and IQ.
3. Using single frame capture with Avidemux, save as JPG.    Then crop and save as TIF for comparison of details and IQ.
So there are 3 TIF files, all the same dimensions, from different sources.
Results:
1. The ffmpeg JPG file is pretty bad.  Lots of artifacts, very poor detail.
2. and 3.  The single frame capture as JPG is actually better than the sequential frame capture as PNG, but the results are very close and both are acceptable.
Conclusion: there appears to be some sort of resampling going on during the sequential capture (hence the "wrong size" messages).
I have saved a rather long string of output messages generated by the sequential (ffmpeg) save.  Can I send them to you so you can look at them to see what might have happened?  (It's all Greek to me.)
I would attach comparison images, but since the file sizes allowed are so minuscule they would be useless.
My personal conclusion: sequential frame capture of 4K video is probably acceptable for most uses (animated GIF, small prints, etc.) if saved as PNG.  I didn't try BMP save on this test but prior experience with BMP save from Avidemux yielded excessive contrast, blown highlights and general lack of subtlety in the images.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
I'm not ffmpeg an expert.
Use -qscale:v

4.3 Extract Frame at given timecode location "Flag option “-qscale 0” is used to keep the quality intact"

Apparently overlooked this "Images will be rescaled to fit the new WxH values. " in regards to "-s 3996x2160"

also look at 7.4 Video size uhd4320, uhd2160, 4kdci

sadly i did not find how to use Video size in relation to extract jpg with the same resolution.
Quote
I would attach comparison images, but since the file sizes allowed are so minuscule they would be useless.
take a free account on webservice like dropbox and upload there.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
done some testing here with uhd video clip and ffmpeg:
with ffprobe you can find out the details of the video you want to process like:
Code: [Select]
ffprobe hevcUHD3840x2160-25fps.mkv
Quote
Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv), 3840x2160 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 25 tbc (default)
yuv420p10le(tv) is most likely to loose colour depth going to png or jpg (using another colorspace)

Extracting one frame with ffmpeg:
--------------------------------------
to jpg
Code: [Select]
ffmpeg -ss 00:00:36.0 -i hevcUHD3840x2160-25fps.mkv -vframes 1 -qscale 0 -r 25 -s uhd2160 -f image2 image-%3d.jpggiving 987,4 kB file, download by clicking top hand right download: hevcUHD3840x2160-25fps.jpg

to png
Code: [Select]
ffmpeg -ss 00:00:36.0 -i hevcUHD3840x2160-25fps.mkv -vframes 1 -qscale 0 -r 25 -s uhd2160 -f image2 image-%3d.pnggiving 33,9 MB file, download by clicking top hand right download: hevcUHD3840x2160-25fps.png

- you need to repace 'hevcUHD3840x2160-25fps.mkv' with the name of your video.
- most likely we're not to see any difference on none 4k HDR monitor

jpg:

png:
« Last Edit: May 14, 2016, 08:00:25 AM by Jan Gruuthuse »

BG Davis

  • Jr. Member
  • **
  • Posts: 98
Thank you for all your input on this issue; you have taught me a lot.
With the PNG save I have gotten output that is actually good enough for my current purposes, so for now I'm going to let this lie and move on to other things.
4K video is a very interesting format and I'm still exploring the various possibilities.  At the same time, I tend to have rather high expectations of results, and yet the fact is that 8mp frame caps from 4K video are not going to be museum-quality photo art.  :P
Sometimes good enough is...well, good enough. ;D

AQUAR

  • Hero Member
  • *****
  • Posts: 1077
Long time ago I read that a 35 mm photographic image holds the equivalent of between 20 to 50 Mega pixels.
Current consumer grade SLR cameras are getting close to those figures.