doc:appunti:linux:video:ffmpeg
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:video:ffmpeg [2023/01/07 15:18] – [Final rendering (re-encoding)] niccolo | doc:appunti:linux:video:ffmpeg [2024/07/25 08:12] (current) – [AVC (x264) is better than ASP (xvid4)] niccolo | ||
---|---|---|---|
Line 262: | Line 262: | ||
./ | ./ | ||
| ./ | | ./ | ||
- | </ | ||
- | |||
- | ====== Final rendering (re-encoding) ====== | ||
- | |||
- | The video stream recorded by the Xiaomi Yi camera is **1920x1080 pixels** at a variable bitrate of **12.0 Mb/s**. Because we watch it on a simple TV set capable only of 1366x768 pixels, we we re-encode it with the following settings: | ||
- | |||
- | ^ Video codec | MPEG-4 AVC (x264) | ||
- | ^ Video filter | ||
- | ^ Basic x264 | Preset: **slow** (or less), Tuning: **film**, Profile: **High**, IDC Level: **Auto** | | ||
- | ^ Video encoding | ||
- | ^ Audio codec | < | ||
- | ^ Audio bitrate | ||
- | |||
- | 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> | ||
- | TITLE=" | ||
- | ffmpeg \ | ||
- | -i " | ||
- | -i ' | ||
- | -map ' | ||
- | -metadata title=" | ||
- | -metadata: | ||
- | -metadata: | ||
- | -filter:v " | ||
- | -vcodec ' | ||
- | -acodec copy \ | ||
- | " | ||
</ | </ | ||
Line 325: | Line 297: | ||
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:// | See this page: **[[https:// | ||
Line 341: | Line 313: | ||
* **Tuning**: Use the **film** option for real life scenes. | * **Tuning**: Use the **film** option for real life scenes. | ||
* **Profile**: | * **Profile**: | ||
- | * **IDC Level**: Leave this parameter to **Auto**, setting it to higer values does not increase the video quality, but imposes higher constraints to the decoder. I.e. to decode | + | * **IDC Level**: Leave this parameter to **Auto**, setting it to higer values does not increase the video quality, but imposes higher constraints to the decoder. I.e. to decode |
====== More on ffmpeg Command Line ====== | ====== More on ffmpeg Command Line ====== | ||
Line 551: | Line 523: | ||
</ | </ | ||
+ | ====== ffmpeg: leggere la sequenza di VOB da un DVD ====== | ||
+ | |||
+ | Nella directory **VIDEO_TS** di un DVD la traccia principale è normalmente suddivisa in file numerati sequenzialmente, | ||
+ | |||
+ | In teoria è sufficiente concatenare i file in un solo file destinazione e quindi trattarlo come un normale file audio/ | ||
+ | |||
+ | <code bash> | ||
+ | SOURCE=" | ||
+ | ffmpeg -i " | ||
+ | </ | ||
+ | |||
+ | ====== ffmpeg: impostare un ritardo sui sottotitoli durante il muxing ====== | ||
+ | |||
+ | Se un flusso di sottotitoli (ad esempio nel formato Picture based DVD) non indica correttamente l' | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -i video-stream.mkv -i audio-stream.mkv -itsoffset 44.5 -i subtitles-stream.mkv ... | ||
+ | </ | ||
+ | |||
+ | In generale dovrebbe essere possibile scoprire l' | ||
+ | |||
+ | < | ||
+ | [mpeg @ 0x55f98bb2c6c0] New subtitle stream 0:7 at pos: | ||
+ | </ | ||
+ | |||
+ | ====== Parameters for final rendering ====== | ||
+ | |||
+ | See the page **[[ffmpeg_final_rendering]]**. | ||
====== Doppiaggio audio con Ardour ====== | ====== Doppiaggio audio con Ardour ====== | ||
Vedere la pagina dedicata: **[[ardour_dubbing]]**. | Vedere la pagina dedicata: **[[ardour_dubbing]]**. |
doc/appunti/linux/video/ffmpeg.1673101120.txt.gz · Last modified: 2023/01/07 15:18 by niccolo