(Question) ffmpeg: best mandelbrot video creation options for youtube

  • 2 Replies
  • 88 Views

0 Members and 1 Guest are viewing this topic.

Offline CFJH

  • *
  • Fractal Friar
  • *
  • Posts: 132
« on: April 02, 2018, 02:42:20 PM »
Hello,

I'm running a lager mandelbrot deep zoom which I want to upload to youtube. The video creation is done from numbered .jpg images with ffmpeg on a linux system. My problem is to find a good balance between video quality an file size (youtube has 2 Gb max file size (?)). My video will be long in time, I think 3 or 4 hours (rendering is not finished yet). The video has 720p resolution with 60fps. I'm also thinking about to reduce resolution and/or frame rate to match the youtube limits.

I've tested the following commands (with file size and subjective quality).
Code: [Select]
#154Mb, Quali +  ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 7500k zm49_0089_1.mp4
#102Mb, Quali +  ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 5000k zm49_0089_2.mp4
# 52Mb, Quali ---ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 2500k zm49_0089_3.mp4
# 51Mb, Quali *,Rekodieren der Bildrate kann man vergessen !!!  ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 2500k -r 30 zm49_0089_4.mp4
# 51Kb, Quali +  ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 2500k  -s 800x450  zm49_0089_5.mp4
# 31Mb, Quali -  ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 1500k  -s 800x450  zm49_0089_6.mp4
#205Mb, Quali ++ ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 10000k -s 1024x576 zm49_0089_7.mp4
# 72Mb, Quali +  ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 3500k  -s 1024x576 zm49_0089_8.mp4
# 51Mb, Quali *  ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -b:v 2500k  -s 1024x576 zm49_0089_9.mp4
These are a span on 3 minutes in the final video. When I interpolate that to the final video size, each span must have a file size less than 30Mb  :'(

Has anyone a tip to get a better quality/size ratio?
May be another program better (must run on Linux!!) ?

Jrgen

Offline claude

  • *
  • Fractal Freak
  • **
  • Posts: 760
    • mathr.co.uk
« Reply #1 on: April 02, 2018, 05:20:32 PM »
From YouTube's upload instructions/help, as of today:
Quote
Maximum upload size
The maximum file size you can upload is 128GB or 12 hours, whichever is less. We've changed the limits on uploads in the past, so you may see older videos that are longer than 12 hours.

2GB limits are oldschool (but I think archive.org might still have that, need to check...).

Best way to encode imo is to pick a quality and allow the codec to use a variable bitrate to meet that quality. In ffmpeg/x264 this is done with the -crf setting.  -crf 0 is lossless (not compatible with most hardware players, but youtube can handle it afaik), -crf 16 is very high quality, -crf 20 is quite ok quality, -crf 24 is getting lower quality.  Note that youtube will transcode your carefully encoded files into mush anyway, so it's probably best to upload the highest quality file you can, to minimize transcoding loss.

Offline CFJH

  • *
  • Fractal Friar
  • *
  • Posts: 132
« Reply #2 on: April 03, 2018, 11:13:27 PM »
I've played with some options. Currently the best is

Code: [Select]
ffmpeg -y -f image2 -r 60 -i ./088/zm_088%04d.jpg -vcodec libx264 -crf XXX zm49_0089_e.mp4
where XXX=20  is good quality and 144Mb file size and XXX=25 is acceptable quality and 86Mb file size. Here I will play with some options on other spawns of my zoom to find the best value for XXX..
Also I find out, that the quality depends on the player. ffplay und kaffeine are nearly identical, mplayer is a bit lower on quality (with the same input file).
Jrgen


xx
"Time Span"

Started by cricke49 on Fractal Image Gallery

0 Replies
67 Views
Last post August 02, 2018, 07:05:21 AM
by cricke49
clip
Mandelbulb frag with some options

Started by mclarekin on Fragmentarium

1 Replies
61 Views
Last post October 07, 2018, 07:56:54 AM
by Sabine62
xx
(8K Video) Forges of Hephaestus--"Binary Fusion"--3D Fractal Animation Music Video

Started by Paigan0 on Fractal Image Gallery

2 Replies
118 Views
Last post April 11, 2018, 02:02:34 AM
by Paigan0
xx
(8K Video) Klein Keep of the Deep--"Bleed"--3D Fractal Animation Music Video

Started by Paigan0 on Fractal Image Gallery

0 Replies
87 Views
Last post February 15, 2018, 11:36:07 PM
by Paigan0
xx
(4K Video) Bermarte Chaos Box--"Z'ha'dum"--3D Fractal Animation Music Video

Started by Paigan0 on Fractal Image Gallery

0 Replies
66 Views
Last post January 26, 2018, 11:15:37 PM
by Paigan0