{"id":506,"date":"2024-06-19T09:38:23","date_gmt":"2024-06-19T08:38:23","guid":{"rendered":"http:\/\/aldarias.es\/wordpress\/?p=506"},"modified":"2024-06-19T09:47:01","modified_gmt":"2024-06-19T08:47:01","slug":"script-para-unir-varios-ficheros-mp3","status":"publish","type":"post","link":"http:\/\/aldarias.es\/wordpress\/?p=506","title":{"rendered":"Proyecto de podcast modular"},"content":{"rendered":"\n<p><strong>1. Script para unir varios ficheros mp3 con cat<\/strong><\/p>\n\n\n\n<p>El siguiente script en bash permite preparr 15 podcast numerados de 0 al 15 y los une generando de por cada fichero podX siendo X un numero de 0 a 14. Se  genera un fichero temaX con un fichero inicial de audio llamado ini.mp3 y un fichero final llamado fin.mp3<\/p>\n\n\n\n<p>Resumiendo: El comando cat permite unir mp3 de este modo. Ejemplo para el tema1 seria:<\/p>\n\n\n\n<p>cat inicio.mp3 pod1.mp3 final.mp3 > tema1.mp3<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Fichero: temas.sh<\/p>\n\n\n\n<p>echo Preparando podcast<\/p>\n\n\n\n<p>for i in $(seq 0 14);<br>do<br>if [ -f pod\u00bb$i\u00bb.mp3 ];then<br>echo &#8216;Generando tema&#8217;$i<br>if [ $i -lt 10 ]<br>then<br>cat ini.mp3 pod\u00bb$i\u00bb.mp3 fin.mp3 > &#8216;tema0&#8217;$i.mp3<br>else<br>cat ini.mp3 pod\u00bb$i\u00bb.mp3 fin.mp3 > &#8216;tema&#8217;$i.mp3<br>fi<br>fi<br>done<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>2. Script que genere una union de todos los fichero podX.mp3<\/strong>. Se colocar\u00e1 entre cada podX.mp3 un fichero intermedio llamado in.mp3.<\/p>\n\n\n\n<p>El script que llamaremos todos.sh<\/p>\n\n\n\n<p>echo \u00abGenerando todos\u00bb<\/p>\n\n\n\n<p>cat ini.mp3 pod0.mp3 \\<br>in.mp3 pod1.mp3 \\<br>in.mp3 pod2.mp3 \\<br>in.mp3 pod3.mp3 \\<br>in.mp3 pod4.mp3 \\<br>in.mp3 pod5.mp3 \\<br>in.mp3 pod6.mp3 \\<br>in.mp3 pod7.mp3 \\<br>in.mp3 pod8.mp3 \\<br>in.mp3 pod9.mp3 \\<br>in.mp3 pod10.mp3 \\<br>in.mp3 pod11.mp3 \\<br>in.mp3 pod12.mp3 \\<br>in.mp3 pod13.mp3 \\<br>in.mp3 pod14.mp3 \\<br>fin.mp3 > todos.mp3<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Los metadatos de los fichero mp3 se pueden tambien poner con un script, que llamaremos etiquetas-temas.sh<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">3. Recorremos los podcast y le ponemos la etiqueta titulo. <\/h1>\n\n\n\n<p>El fichero lo llamaremos etiqueta-temas.sh<\/p>\n\n\n\n<p>for i in $(seq 0 14)<br>do<\/p>\n\n\n\n<p>echo \u00ab$i\u00bb<br>t=0<\/p>\n\n\n\n<p>case $i in<br>0)<br>t=\u00bbPRESENTACION\u00bb<br>;;<br>1)<br>t=\u00bbEQUIPOS INFORM\u00c1TICOS\u00bb<br>;;<br>2)<br>t=\u00bbseguridad y eticia inform\u00e1tica\u00bb<br>;;<br>3)<br>t=\u00bbsistemas operativos\u00bb<br>;;<br>4)<br>t=\u00bbprocesador de textos\u00bb<br>;;<br>5)<br>t=\u00bbpresentaciones\u00bb<br>;;<br>6)<br>t=\u00bbhojas de c\u00e1lculo\u00bb<br>;;<br>7)<br>t=\u00bbbases de datos\u00bb<br>;;<br>8)<br>t=\u00bbimagen\u00bb<br>;;<br>9)<br>t=\u00bbaudio\u00bb<br>;;<br>10)<br>t=\u00bbVideo\u00bb<br>;;<br>11)<br>t=\u00bbRedes\u00bb<br>;;<br>12)<br>t=\u00bbInternet y redes sociales\u00bb<br>;;<br>13)<br>t=\u00bbPublicaci\u00f3n de contenidos\u00bb<br>;;<br>14)<br>t=\u00bbTrucos examen tipo text\u00bb<br>;;<br>*)<br>t=\u00bbSin definir\u00bb<br>;;<br>esac<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">***<\/h1>\n\n\n\n<p>autor=\u00bbPaco Aldarias\u00bb<br>centro=\u00bbCEEDCV\u00bb<br>asignatura=\u00bbTICD\u00bb<br>podcast=186<br>ano=2024<br>licencia=\u00bbcopyrigth\u00bb<br>imagen=cover.jpg<br>t0=$centro\u00bb-\u00ab$ano\u00bb-\u00ab$asignatura\u00bb-\u00ab$i\u00bb-\u00ab$t<\/p>\n\n\n\n<p>if [ $i -lt 10 ]<br>then<br>id3tag -w -n &#8211;song=\u00bb$t0&#8243; &#8211;track=\u00bb$i\u00bb &#8211;artist=\u00bb$autor\u00bb &#8211;album=\u00bb$asignatura\u00bb &#8211;genre=\u00bb$podcast\u00bb &#8211;year=\u00bb$ano\u00bb &#8211;comment=\u00bb$licencia\u00bb tema0&#8243;$i\u00bb.mp3<br>kid3-cli -c \u00abset albumart &#8216;$imagen'\u00bb tema0&#8243;$i\u00bb.mp3<br>exiftool tema0&#8243;$i\u00bb.mp3<br>else<br>id3tag -w -n &#8211;song=\u00bb$t0&#8243; &#8211;track=\u00bb$i\u00bb &#8211;artist=\u00bb$autor\u00bb &#8211;album=\u00bb$asignatura\u00bb &#8211;genre=\u00bb$podcast\u00bb &#8211;year=\u00bb$ano\u00bb &#8211;comment=\u00bb$licencia\u00bb tema\u00bb$i\u00bb.mp3<br>kid3-cli -c \u00abset albumart &#8216;$imagen'\u00bb tema\u00bb$i\u00bb.mp3<br>exiftool tema\u00bb$i\u00bb.mp3<br>fi<\/p>\n\n\n\n<p>done<\/p>\n\n\n\n<p>t0=$centro\u00bb-\u00ab$asignatura\u00bb-\u00ab$ano\u00bb-TODOS LOS TEMAS\u00bb<br>id3tag -w -n &#8211;song=\u00bb$t0&#8243; &#8211;track=\u00bb1&#8243; &#8211;artist=\u00bb$autor\u00bb &#8211;album=\u00bb$asignatura\u00bb &#8211;genre=\u00bb$podcast\u00bb &#8211;year=\u00bb$a\u00f1o\u00bb &#8211;comment=\u00bb$licencia\u00bb todos.mp3<br>kid3-cli -c \u00abset albumart &#8216;$imagen'\u00bb todos.mp3<br>exiftool todos.mp3<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Script para unir varios ficheros mp3 con cat El siguiente script en bash permite preparr 15 podcast numerados de 0 al 15 y los une generando de por cada fichero podX siendo X un numero de 0 a 14. &hellip; <a href=\"http:\/\/aldarias.es\/wordpress\/?p=506\">Sigue leyendo <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"none","_seopress_titles_title":"Proyecto de podcast modular","_seopress_titles_desc":"","_seopress_robots_index":"","_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"episode_type":"","audio_file":"","podmotor_file_id":"","podmotor_episode_id":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","filesize_raw":"","date_recorded":"","explicit":"","block":"","itunes_episode_number":"","itunes_title":"","itunes_season_number":"","itunes_episode_type":"","footnotes":""},"categories":[22,263],"tags":[],"class_list":["post-506","post","type-post","status-publish","format-standard","hentry","category-mp3","category-unir-mp3"],"_links":{"self":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=506"}],"version-history":[{"count":5,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":518,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions\/518"}],"wp:attachment":[{"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/aldarias.es\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}