{"id":30,"date":"2015-05-01T08:56:47","date_gmt":"2015-05-01T07:56:47","guid":{"rendered":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=30"},"modified":"2016-11-27T01:08:18","modified_gmt":"2016-11-27T00:08:18","slug":"create-a-ringtone-for-android-5","status":"publish","type":"post","link":"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=30","title":{"rendered":"Create a Ringtone for Android 5"},"content":{"rendered":"<h3>Conversion<\/h3>\n<p>This should be easy, wouldn&#8217;t you think? Of course it isn&#8217;t! Here&#8217;s a step-by-step instruction:<\/p>\n<p>1. Extract the sound from the video or sound file. Write down the start and and position. For notifications don&#8217;t make it more than 3 seconds or it&#8217;ll get annoying. Do this with ffmpeg:<\/p>\n<pre>$ ffmpeg -i &lt;input-file&gt; -ss &lt;hh:mm:ss.ms&gt; -to\u00a0&lt;hh:mm:ss.ms&gt; -f wav out.wav<\/pre>\n<p>Check with eg. ffplay if you got it right or adjust:<\/p>\n<pre>$ ffplay out.wav<\/pre>\n<p>2. Most likely you want to increase the volume:<\/p>\n<pre>$ ffmpeg -i out.wav -af 'volume=4|5|...&gt; out2.wav<\/pre>\n<p>3. Convert to mp3<\/p>\n<pre>$ ffmpeg -i\u00a0out2.wav -codec:a libmp3lame -qscale:a 8 out.mp3<\/pre>\n<p>qscale:a 8 is 70-105 kbit\/s (default is 16 kbit\/s, crappy)<\/p>\n<h3>Make a SAMSUNG S5 Galaxy acutally play it<\/h3>\n<p>Turned out this is the hard part.<\/p>\n<p>1. Download it to the phone with &#8220;Eigene Dateien&#8221; (&#8220;My Files&#8221;?, dunno).<\/p>\n<p>2. Select &#8220;Benachrichtigungston&#8221; (Notification in english?) and open with ES File explorer or something<\/p>\n<p>3. Browse to the downloaded file and select it<\/p>\n<p>4. OK everything<\/p>\n<p>When selecting the dialog again, use &#8220;Medienspeicher&#8221;. Now the file name should show up there. Test it!<\/p>\n<h3>Results<\/h3>\n<p>Stargate alert:<\/p>\n<audio class=\"wp-audio-shortcode\" id=\"audio-30-1\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/tollana.d-tor.org\/notes-to-self\/wp-content\/uploads\/2015\/05\/stargatealert.mp3?_=1\" \/><a href=\"https:\/\/tollana.d-tor.org\/notes-to-self\/wp-content\/uploads\/2015\/05\/stargatealert.mp3\">https:\/\/tollana.d-tor.org\/notes-to-self\/wp-content\/uploads\/2015\/05\/stargatealert.mp3<\/a><\/audio>\n<p>Now What? (O&#8217;Neill)<\/p>\n<audio class=\"wp-audio-shortcode\" id=\"audio-30-2\" preload=\"none\" style=\"width: 100%;\" controls=\"controls\"><source type=\"audio\/mpeg\" src=\"https:\/\/tollana.d-tor.org\/notes-to-self\/wp-content\/uploads\/2015\/05\/now-what.mp3?_=2\" \/><a href=\"https:\/\/tollana.d-tor.org\/notes-to-self\/wp-content\/uploads\/2015\/05\/now-what.mp3\">https:\/\/tollana.d-tor.org\/notes-to-self\/wp-content\/uploads\/2015\/05\/now-what.mp3<\/a><\/audio>\n<p>Sorry for Denglish \ud83d\ude41<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Conversion This should be easy, wouldn&#8217;t you think? Of course it isn&#8217;t! Here&#8217;s a step-by-step instruction: 1. Extract the sound from the video or sound file. Write down the start and and position. For notifications don&#8217;t make it more than 3 seconds or it&#8217;ll get annoying. Do this with ffmpeg: $ ffmpeg -i &lt;input-file&gt; -ss &hellip; <a href=\"https:\/\/tollana.d-tor.org\/notes-to-self\/?p=30\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Create a Ringtone for Android 5<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[17,18],"class_list":["post-30","post","type-post","status-publish","format-standard","hentry","category-transcoding","tag-android","tag-samsung"],"_links":{"self":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=30"}],"version-history":[{"count":6,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=\/wp\/v2\/posts\/30\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tollana.d-tor.org\/notes-to-self\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}