11. Dezember 2019

Embedding audio into Blogger

The most elegant way to play an audio file, typically mp3, is by using ‹audio›, explained here https://www.quackit.com/html/html_music_code.cfm

1. You must have the audio file somwhere in the net, i.e. it requires an http address like
https://www.frametraxx.de/kostenlos/frametraxx_preview_Kling-Gloeckchen.mp3

2. In the HTML code of your blog post add:
‹audio controls="" src="https://www.frametraxx.de/kostenlos/frametraxx_preview_Kling-Gloeckchen.mp3"›‹/audio›
If you like, command ‹center› before and close with ‹/center›.

3. Be sure to change my little arrows ‹ and › to real < and > signs.
4. Note that the code will not be shown by Blogger in composing or preview mode.
Only the published post will show the player, like this:

Permalink to here j.mp/fj2RIKEmb
 = https://blogabissl.blogspot.com/2019/12/embedding-audio-into-blogger.html
Besucherzaehler


Now a test. I enclose a Youtube address or some other video file, mp4, instead of a genuine audio mp3 file name.
Is the browser clever enough to listen to Youtube? – No, it doesn’t even start. We ought to have a gadget that extracts the audio (mp3) on the fly from a video (mp4). Let me know if you haven an idea please. I used YouTube to MP3 to extract the audio. Then you must store it in the web (“cloud”).
      Some interesting discussions here:
https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4 https://stackoverflow.com/questions/15241076/download-only-audio-from-a-youtube-video
https://stackoverflow.com/questions/49140159/extracting-audio-from-a-video-file
   This one works: http://media.w3.org/2010/05/sintel/trailer.mp4
You’ll hear the extracted audio, even with a mp4 source, just wait a bit as it starts low. Juhu …
   But how do I get a mp4 file from an address like https://youtu.be/aSLTvKC-P3Y ? (I don’t:)
  1. Open video on YouTube you wish to download.
  2. Before the 'YouTube' but after the 'www.' Add 'ss'
  3. Click enter which will take you to 'savefrom.net'
  4. Choose the format link and the download will begin.
Now this song has the youtube address (see URL line):
   https://www.youtube.com/watch?v=aSLTvKC-P3Y
I do step 2: https://www.ssyoutube.com/watch?v=aSLTvKC-P3Y
ATTENTION – This ssyoutube.com seems to be a bit suspect. Proceed at risk. It’s really safefrom.net. The downloads don’t come from youtube, that doensn’t like downloads, they pass via safefrom.
   This brings me to https://de.savefrom.net/#url=http://youtube.com/watch?v=aSLTvKC-P3Y&utm_source=youtube.com&utm_medium=short_domains&utm_campaign=www.ssyoutube.com&a_ts=1576103577.248
   Now I start the download (it’s mp3) and then ask the browser (klicking the down arrow) for the source address: http://178.162.210.65/ji/s9/yU1L0_UANWfQaqIkvV9FjA,1576094206/yt:aSLTvKC-P3Y-1/Lotte%20Lenya%20-%20Surabaya%20Johnny.mp3
   Ok and this one I plug into the audio command:


No good. Doesn’t work.
   I directly address http://178.162.210.65/ji/s9/yU1L0_UANWfQaqIkvV9FjA,1576094206/yt:aSLTvKC-P3Y-1/Lotte%20Lenya%20-%20Surabaya%20Johnny.mp3 and I get an error 403 forbidden nginx/1.1.19. So that’s why the audio command is at a loss. Some sort of permission allows download but not access, see https://stackoverflow.com/questions/20182329/nginx-is-throwing-an-403-forbidden-on-static-files and others.
   Finally I try https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4 That one works with the audio command. Thank you and good night. 

Keine Kommentare: