{"id":5922,"date":"2023-09-17T03:31:46","date_gmt":"2023-09-17T01:31:46","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=5922"},"modified":"2023-09-17T03:31:47","modified_gmt":"2023-09-17T01:31:47","slug":"m3u-dateien-unter-linux-ohne-hilfsmittel-erstellen","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/17\/m3u-dateien-unter-linux-ohne-hilfsmittel-erstellen\/","title":{"rendered":"M3U-Dateien unter Linux ohne Hilfsmittel erstellen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Wenn ich mir ansehe, wie viel Software auf manchen Rechnern installiert ist, wird mir manchmal schwindlig. Hin und wieder findet man mehr Anwendungen als Dateien&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;. Dies kann man nat\u00fcrlich so machen, ob es sinnvoll ist, muss jeder selbst entscheiden. Gerade unter Linux hat man den Vorteil &#8211; vieles was man braucht ist schon lange an Bord.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Nehmen wir einmal das Erstellen einer M3U-Datei, also einer Abspielliste von Medien-Dateien f\u00fcr Video- oder Audio-Dateien. Selbst in der\u00a0Paket-Verwaltung\u00a0von Debian findet man gesch\u00e4tzt mindestens ein Dutzend von Anwendungen, die M3U-Dateien erstellen k\u00f6nnen. Braucht man gar nicht, es gen\u00fcgt das\u00a0Terminal\u00a0mit einem kurzen Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -1v | grep .mp3 &gt; \/tmp\/1.m3u &amp;&amp; mv \/tmp\/1.m3u .<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Der Befehl &#8222;<strong><code>ls<\/code><\/strong>&#8220; listet die Dateien im aktuellen Verzeichnis auf, &#8222;<strong><code>grep .mp3<\/code><\/strong>&#8220; filtert die MP3-Dateien heraus. &#8222;<strong><code>> \/tmp\/1.m3u &amp;&amp;<\/code><\/strong>&#8220; erstellt die Datei &#8222;<strong><code>1.m3u<\/code><\/strong>&#8220; im tempor\u00e4ren Verzeichnis und verschiebt diese anschlie\u00dfend ins aktuelle Verzeichnis &#8211; dieses wird durch den Punkt &#8222;<strong>.<\/strong>&#8220; zuletzt im Befehl angegeben.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Fertig, wir k\u00f6nnen die Datei &#8222;<strong>1.m3u<\/strong>&#8220; in einem beliebigen Player \u00f6ffnen und abspielen, schneller am Terminal &#8211; etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vlc 1.m3u<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/m3u-1024x576.jpg\" alt=\"\" class=\"wp-image-5923\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/m3u-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/m3u-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/m3u-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/m3u-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/m3u-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/m3u.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Dies funktioniert nat\u00fcrlich auch mit Video-Dateien, etwa mit &#8222;<strong>.mp4<\/strong>&#8222;-Dateien:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -1v | grep .mp4 &gt; \/tmp\/1.m3u &amp;&amp; mv \/tmp\/1.m3u .<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Oder mit allen Dateien:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -1v | grep * > \/tmp\/1.m3u &amp;&amp; mv \/tmp\/1.m3u .<\/code><\/pre>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"5922\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">1    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"5922\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Wenn ich mir ansehe, wie viel Software auf manchen Rechnern installiert ist, wird mir manchmal schwindlig. Hin und wieder findet man mehr Anwendungen als Dateien&nbsp; &nbsp;. Dies kann man nat\u00fcrlich so machen, ob es sinnvoll ist, muss jeder selbst entscheiden. Gerade unter Linux hat man den Vorteil &#8211; vieles was man braucht ist schon lange [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5923,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[18],"class_list":["post-5922","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-multimedia","tag-multimedia"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/5922","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=5922"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/5922\/revisions"}],"predecessor-version":[{"id":5924,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/5922\/revisions\/5924"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/5923"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=5922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=5922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=5922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}