{"id":4446,"date":"2023-09-15T19:37:17","date_gmt":"2023-09-15T17:37:17","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=4446"},"modified":"2023-09-15T19:37:20","modified_gmt":"2023-09-15T17:37:20","slug":"den-ton-in-videos-nachtraeglich-synchronisieren","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/15\/den-ton-in-videos-nachtraeglich-synchronisieren\/","title":{"rendered":"Den Ton in Videos nachtr\u00e4glich synchronisieren"},"content":{"rendered":"\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Beschreibung<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bei Downloads von Videos aus diversen Quellen z. B. YouTube kann es durchaus vorkommen, dass Bild und Ton asynchron sind. Das Kommandozeilen-Tool ffmpeg ist ein wahres Multi-Talent. Es erm\u00f6glicht, die Abweichung zu korrigieren, ohne vorheriges Recodieren der Videodatei. Wird der Ton fr\u00fcher oder mit Verz\u00f6gerung abgespielt, ist es oftmals ohne gr\u00f6\u00dferen Aufwand m\u00f6glich, Audio- und Videospur nachtr\u00e4glich in Einklang zu bringen. Die Verz\u00f6gerung zwischen Bild und Ton kann u. a. mit dem VLC Videoplayer gemessen werden &#8211; am einfachsten mit einer Stoppuhr. VLC kann tempor\u00e4r mit der Taste &#8222;K&#8220; die Audiospur nach hinten verschieben, mit &#8222;J&#8220; nach vorne . Dies jeweils in Schritten von 10 Millisekunden. Die so ermittelte Abweichung (im Beispiel jeweils 1,5 Sekunden) l\u00e4sst sich nun mittels ffmpeg dauerhaft korrigieren<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>Installation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ffmpeg<\/strong> ist in einigen Distributionen vorinstalliert, andernfalls z. B. in Debian im Terminal mit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install ffmpeg<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">schnell nachgeholt.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Wechseln Sie zun\u00e4chst in den Ordner, in dem sich das Video befindet &#8211; bei Downloads also:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd Downloads<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Beispiel 1:<\/strong> Ton ist zu fr\u00fch (1,5 Sekunden)\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nachfolgender Befehl versetzt die Audiospur entsprechend nach hinten:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg -i video.mp4 -itsoffset 1.5 -i video.mp4 -c:a copy -c:v copy -map 0:v:0 -map 1:a:0 videoneu.mp4<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Beispiel 2<\/strong>: Ton ist zu sp\u00e4t (1,5 Sekunden)\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nachfolgender Befehl bewirkt, dass die Audiospur entsprechend fr\u00fcher einsetzt, bzw. die Videospur nach hinten verlegt wird:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ffmpeg -i video.mp4 -itsoffset 1.5 -i video.mp4 -c:a copy -c:v copy -map 0:a:0 -map 1:v:0 videoneu.mp4<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Das Original-Video, hier die Datei video.mp4, bleibt dabei erhalten. <em>ffmpeg<\/em> schreibt die neue Datei videoneu.mp4 in das gleiche Verzeichnis.<br>Der klare Vorteil in diesem Verfahren ist die schnelle Anpassung, die auch bei langen Videos nur wenige Sekunden dauert.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"has-small-font-size wp-block-paragraph\"><strong>Erstver\u00f6ffentlichung von beluga \u00bb Sa 11. Jun 2022, 11:18<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Beschreibung Bei Downloads von Videos aus diversen Quellen z. B. YouTube kann es durchaus vorkommen, dass Bild und Ton asynchron sind. Das Kommandozeilen-Tool ffmpeg ist ein wahres Multi-Talent. Es erm\u00f6glicht, die Abweichung zu korrigieren, ohne vorheriges Recodieren der Videodatei. Wird der Ton fr\u00fcher oder mit Verz\u00f6gerung abgespielt, ist es oftmals ohne gr\u00f6\u00dferen Aufwand m\u00f6glich, Audio- [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[528,527,530,531,532],"class_list":["post-4446","post","type-post","status-publish","format-standard","hentry","category-multimedia","tag-audiospur","tag-ffmpeg","tag-korrigieren","tag-videos-synchronisieren","tag-videospur"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/4446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=4446"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/4446\/revisions"}],"predecessor-version":[{"id":4447,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/4446\/revisions\/4447"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=4446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=4446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=4446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}