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:35] – [High Quality export presets] niccolodoc:appunti:linux:video:olive_editor_tools [2024/07/31 10:00] (current) – [Export Media] niccolo
Line 33: Line 33:
 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. 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 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.
  
-==== High Quality export presets ====+==== High Quality export ====
  
 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**! 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**!
Line 63: Line 63:
 ^ Color Space              | Rec.709 OETF (5)         | ^ 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.
  
-==== Normal Quality export presets ====+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 75: 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.1722242109.txt.gz · Last modified: 2024/07/29 10:35 by niccolo