User Tools

Site Tools


doc:appunti:linux:video:olive_editor_tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:video:olive_editor_tools [2024/07/29 10:11] – [Export Media] niccolodoc:appunti:linux:video:olive_editor_tools [2024/07/31 10:00] (current) – [Export Media] niccolo
Line 31: Line 31:
 :!: **WARNING**: It seems that the //Export media// dialog box **does not fully support the handling of presets**: when you save and re-load a preset, not all the settings are restored (checked with Olive 0.2.0-55eedbfc). So it is best to check every settings before doing the final video export. :!: **WARNING**: It seems that the //Export media// dialog box **does not fully support the handling of presets**: when you save and re-load a preset, not all the settings are restored (checked with Olive 0.2.0-55eedbfc). So it is best to check every settings before doing the final video export.
  
-I have the habit to make **two exports** of a video work: an **high quality** one to be used as the //master// for subsequent processing and a **normal quality** one for watching on a consumer grade player.+I have the habit to make **two exports** of a video work: an **high quality** one to be used as the //master// for subsequent processing and a **normal quality** one for watching on a consumer grade player. In both cases I use the **H.264** video codec at the moment, due to its wide acceptance and the maturity of the ffmpeg **libx264** codec.
  
 +Ideally the master should be composed by the original clips without re-encoding them. I was able to obtain this result only with a complicated command line recipe, using **ffmpeg**. That recipe requires that all the source videos are in the same resolution, FPS and format. Using ffmpeg it is possibile to cut the clips to be assembled at exact keyframes boundaries, and concatenate them into the final master without re-encoding.
  
-Ideally the master should be composed by the original clips without re-encoding them. I was able to obtain this result only with a complicated command line recipe, using **ffmpeg**. That recipe requires that all the source videos are in the same resolution, fps and format; using ffmpeg it is possibile to cut the clips to be assembled at exact keyframes boundaries, and concatenate them into the final master without re-encoding.+This **lossless procedure** is not possibile with Olive Video Editor, because generally you cut each clip regardless the keyframes, you may mix sources with different resolutions, FPS, etc. and you may apply video transformations. So exporting a video with Olive Editor necessarily involves re-encoding it.
  
-This **lossless procedure** is not possibile with Olive Video Editor, because generally you cut each clip regardless the keyframes, you can mix sources with different resolutions, fps, etc. and you may apply video transformations. So exporting a video with Olive Editor necessarily involves re-encoding it.+==== High Quality export ====
  
-==== High Quality export presets ====+For the high quality video export I use the **constant quality mode** of the **[[https://www.ffmpeg.org/ffmpeg-codecs.html#toc-libx264_002c-libx264rgb|libx264]]** codec. This is activated by the **%%-crf%%** ffmpeg option which accept a numeric parameter for the quality: **lower numbers means higher quality**!
  
-==== Normal Quality export presets ====+Read the **[[https://trac.ffmpeg.org/wiki/Encode/H.264|H.264 documentation page]]** and check the following table: 
 + 
 +^   0 | Almost lossless. 
 +^  18 | Visually lossless or nearly so.  | 
 +^  21 | Should look the same at whatever preset you are running. 
 +^  23 | The default value. 
 +^  51 | The worst possible. 
 + 
 +So I opted for this Olive Editor export settings: 
 + 
 +^  Export Video  ^^ 
 +^ Format                   | Matroska Video           | 
 +^ Width x Height           | 1920×1080                | 
 +^ Quality                  | Full-Float (32-bit) (1)  | 
 +^ Codec                    | H.264                    |  
 +^ Encode Speed             | Very Slow (2)            | 
 +^ Compression Method       | Constant Rate Factor     | 
 +^ CRF value                | 18                       | 
 +^ Pixel Format             | yuv420p (4)              | 
 +^ YUV Color Range          | Full (0-255)             | 
 +^ Color Space              | Rec.709 OETF (5)         | 
 + 
 +Using this presets you cannot predict the bitrate used by the video, because it will be determined by the complexity of the scene to be encoded. Neverthless I expect something like **23 Mbps** (10 Gb per hour) when exporting a video from clips recorded with an Insta360 action cam, set at the resolution of **1920x1080@30** and **40.0 Mbps** quality. 
 + 
 +Olive Video Editor uses ffmpeg to make the video export, but unfortunately it does not allow to take control of the **options passed to ffmpeg** (see issue [[https://github.com/olive-editor/olive/issues/754|#754]]). As an example I would have liked to pass a **keyint=8** option to the libx264 codec, to get a video with a keyframe every 8 frames. This would have made the //master// more suitable to do further video editing, e.g. cutting clips without re-encoding. The exported video obtained with the above settings have instead keyframes at variable intervals, up to 8 seconds long. 
 + 
 +==== Normal Quality export ==== 
 + 
 +:!: **NOTICE**: Because Olive Video Editor does not allow you to exactly control the ffmpeg options used for video exporting, you may prefer to make the normal quality copy from from the high quality //master// (produced as explained above) using ffmpeg alone on the command line. This has the disadvantage of requiring two re-encoding process from the original footages, but allow you the complete control on the resulting media. See this page for some recipes:  **[[ffmpeg_final_rendering]]**.
  
 Here they are my preferred settings to produce **HD-Ready 780p** and **Full HD 1080p** videos. Here they are my preferred settings to produce **HD-Ready 780p** and **Full HD 1080p** videos.
Line 51: Line 80:
 ^ Encode Speed             | Very Slow (2)            | ^ Encode Speed             | Very Slow (2)            |
 ^ Compression Method       | Target Bit Rate          | ^ Compression Method       | Target Bit Rate          |
-^ Target Bit Rate (Mbps)   8 or 4 Mbit (3)          +^ Target Bit Rate (Mbps)   Mbit (3)               
-^ Maximum Bit Rate (Mbps) 8 or 4 Mbit (3)          |+^ Maximum Bit Rate (Mbps) Mbit (3)               |
 ^ Two Pass                 | Yes                      | ^ Two Pass                 | Yes                      |
 ^ Pixel Format             | yuv420p (4)              | ^ Pixel Format             | yuv420p (4)              |
doc/appunti/linux/video/olive_editor_tools.1722240687.txt.gz · Last modified: 2024/07/29 10:11 by niccolo