User Tools

Site Tools


doc:appunti:linux:video:ffmpeg

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
Next revisionBoth sides next revision
doc:appunti:linux:video:ffmpeg [2023/01/07 14:51] – [Final rendering (re-encoding)] niccolodoc:appunti:linux:video:ffmpeg [2023/01/07 15:21] – [AVC (x264) is better than ASP (xvid4)] niccolo
Line 271: Line 271:
 ^ Video filter    | swresize, 1366x768, Bilinear  | ^ Video filter    | swresize, 1366x768, Bilinear  |
 ^ Basic x264      | Preset: **slow** (or less), Tuning: **film**, Profile: **High**, IDC Level: **Auto** | ^ Basic x264      | Preset: **slow** (or less), Tuning: **film**, Profile: **High**, IDC Level: **Auto** |
-^ Video encoding  | Average Bitrate (Two Pass), Average Bitrate 6000 kb/s (about Gb per hour)  |+^ Video encoding  | Average Bitrate (Two Pass), Average Bitrate 4096 kb/s (about 1.8 Gb per hour)  |
 ^ Audio codec     | <del>Lame MP3</del> Vorbis  | ^ Audio codec     | <del>Lame MP3</del> Vorbis  |
 ^ Audio bitrate   | CBR 192 (or higher)  | ^ Audio bitrate   | CBR 192 (or higher)  |
  
-We can use **Avidemux** to make the final rendering (re-encoding). For a **comman line only** solution you can consider ffmpeg to perfomr the re-encoding and **mkvmerge** (contained into the **mkvtoolnix** Debian package) to merge all into a Matroska container.+We can use **Avidemux** to make the final rendering (re-encoding). For a **command line only** solution you can consider **ffmpeg** to perfomr the re-encoding and to make the merge (mux) all into a Matroska container. 
 + 
 +<code bash> 
 +#!/bin/sh 
 +TITLE="Balcani, maggio 2022" 
 +ffmpeg \ 
 +    -i "video-high-quality.mkv"
 +    -i 'audio-music.ogg' -i 'audio-live.ogg'
 +    -map '0:v:0' -map '1:a:0' -map '2:a:0'
 +    -metadata title="$TITLE" -metadata:s:v:0 title="$TITLE"
 +    -metadata:s:a:0 title="Accompagnamento musicale"
 +    -metadata:s:a:1 title="Audio in presa diretta"
 +    -filter:v "scale=1366x768" -aspect "16:9"
 +    -vcodec 'libx264' -pix_fmt 'yuvj420p' -preset 'veryslow' -tune 'film' -profile:v 'high' -level:v 5 \ 
 +    -acodec copy \ 
 +    "2022-05_balcani.mkv" 
 +</code> 
  
 ====== Re-encoding with tonal correction ====== ====== Re-encoding with tonal correction ======
Line 309: Line 326:
 The gamma correction for the three RGB channels was determined with the GIMP, using the //Colors// => //Levels// => //Pick the gray point for all channels// tool. The use of MPEG-TS clips allowed the montage of the final video by just concatenating them. The gamma correction for the three RGB channels was determined with the GIMP, using the //Colors// => //Levels// => //Pick the gray point for all channels// tool. The use of MPEG-TS clips allowed the montage of the final video by just concatenating them.
  
-==== AVC (x264) is better than ASP (xvid4) ====+===== AVC (x264) is better than ASP (xvid4) =====
  
 See this page: **[[https://www.avidemux.org/admWiki/doku.php?id=general:common_myths|Common myths]]** to understand the differences between formats (standards) and codecs (pieces of software). Read also this simple page: **[[https://www.cyberlink.com/support/product-faq-content.do?id=1901|Difference between MPEG-4 AVC and MPEG-4 ASP]]**. See also the Wikipedia article about **[[wp>Advanced Video Coding]]**. See this page: **[[https://www.avidemux.org/admWiki/doku.php?id=general:common_myths|Common myths]]** to understand the differences between formats (standards) and codecs (pieces of software). Read also this simple page: **[[https://www.cyberlink.com/support/product-faq-content.do?id=1901|Difference between MPEG-4 AVC and MPEG-4 ASP]]**. See also the Wikipedia article about **[[wp>Advanced Video Coding]]**.
doc/appunti/linux/video/ffmpeg.txt · Last modified: 2023/11/13 11:24 by niccolo