streaming audio with html5 `<audio>` tag - audio

I am trying to stream audio on a site hosted by Dreamhost from a lecture series using the <audio> tag in html5, but without much success. The actual code is
<audio id="playerTwo" class="player" controls="controls" preload="none">
<source src="audio.ogg" type="audio/ogg; codecs='vorbis'"/>
<source src="audio.mp3" type="audio/mpeg"/>
</audio>
I also have an .htaccess file to include the correct mime-types for apache.
AddType audio/ogg .ogg
AddType audio/mpeg .mp3
The ogg files are about 8 megs and mp3 files are about 13 megs. Each file was exported from Audacity.
Everything plays fine in FF, Chrome and Safari when served locally on my windows 7 machine (running a win32 version of apache 2.2.14 and php 5.3.1).
Things do not go so well on Dreamhost. (They run apache 2.2.15 and php 5.2.14.)
FF stops playing the audio file after 5 seconds. Chrome plays the audio file, but the audio skips frequently. Safari plays the audio correctly, but the lag between clicking the play button and the audio actually starting to stream and play is about three minutes.
If instead of using the <audio> tag, I play the mp3 files from Dreamhost with a Silverlight player, they stream and play correctly.
Any suggestions about what I need to do to get the <audio> tag to work correctly. As far as I know, html5 audio is client-side technology, as is Silverlight. So, in theory, Dreamhost should have no effect on how the <audio> tag performs.
Anyway, anyone have any ideas about what is amiss.
Thanks.

Problem caused by uploading audio files through filezilla in ascii transfer type, rather than binary transfer type. The audio files were corrupted during upload, so no big surprise that they didn't play well. The surprise is that the mp3 files did play acceptably, though the ogg files did not.
That's the answer here.

Related

Processing Abandoned when Uploading Audio Recording Video to YouTube

I keep getting the error: "processing abandoned, this video could not be processed" whenever I try to upload a 107 minute video of an audio recording (just myself rambling thoughts into a microphone the entire time, just a black screen for video). The original audio file is .m4a, and I am trying to convert it into a video file to upload to YouTube. I have tried all the methods that I could find mentioned online, and every time I still get the exact same error. I have tried:
converting from .m4a to .mp4 using VLC and uploading the .mp4
converting from .m4a to .MOV using VLC and uploading the .MOV
converting from .m4a to .mp4 using various online conversion tools and uploading the .mp4
converting from .m4a to .MOV using various online conversion tools and uploading the .MOV
converting from .m4a to .mp3 using various online conversion tools, then converting from .mp3 to both .mp4 and .MOV and uploading the .mp4 and .MOV
verifying my youtube account and enabling the verification feature eligibility settings in the youtube creator studio to allow uploads longer than 15 minutes
re-uploading the same file after the processing failed to try and restart the process
trying different browsers
I also tried exporting the video file again using the default video editor on Windows (the only video editor I have), but I couldn't upload either the audio file (not an option to choose as an import file type) or the video files I created (gave error: "these files have properties that can't be read". I don't know why this error came up either, but maybe it's because the file is corrupted? This wouldn't make sense to me though because I'm able to play it fine (all file types) in the windows default player, VLC, and Audacity. I was able to convert the audio into the video files in VLC too, so I don't know why I can't do the same in the windows default editor.
I realize that similar questions have been asked before on here, but none actually give a solution that works for my problem. Any insight into why I may be having this problem, and how I may be able to solve it, would be very much appreciated.
Youtube doesn't allow audio-only uploads. They expect you to have some sort of video content (which is why you'll see album art on music-only uploads). You'll need some sort of video content. Shotcut is a free video editor that may help you out. Or if you're willing to use the command line ffmpeg can help you out

How to secure a video file played through Media Source Extension API?

I have made a web video player using the Media Source Extension API. The video and audio my player downloads and plays is not secure. As in you can go to the Network in Google Chrome Inspect and download the video and audio and play it through a media player. I want to make my audio and video files to be played via my video player only.
A perfect secure video files example is here. The video player: http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html. U can insert the source in the input: https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd. And when I download the files from Network in the Google Chrome Inspect, I cannot play the video file of .m4v in VLC or else where. So I think that this is secure. The files downloaded for playback can be found here: http://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_1280x720_4000k.
Netflix has very very secured video files where the file try isn't even defined. So can someone advise me how to secure my video and audio files to be downloaded and played from else where. Thanks
A sample of my video player project: https://drive.google.com/file/d/156mDgIltBGMkXhx4LZfShxv3A8JrwkNP/view?usp=sharing
The m4v files can be played, you just need to append them to the initialization fragment. Netflix does not use Media Source Extensions directly. They use Encrypted Media Extensions along with a DRM provider such as widevine.

Swiffy - Audio no longer functioning on iPad/Tablet//Mobile

I exported a SWF file using Swiffy a few months back and the audio functions.
http://www.vgidownload.co.uk/Tests/Old.html
Exporting the same file now results in no audio function.
http://www.vgidownload.co.uk/Tests/New.html
Is there something i'm missing here or has something changed between v7.1 and v7.4.
If so is there any way I can have the file export using v7.1 ?
The sound seems to function fine when viewd on a PC through a browser, it is just on iPad/Mobile that it is silent.
Thanks
Matt
Have you tested Old.html on an iPad/Mobile? I just did and there's no sound. Also no sound in Chrome on Galaxy Core Prime. On the same Samsung in the android browser no test was possible because the "START" button doesn't work. Such are the limitations of swiffy on mobiles.
The sound is encoded in Base 64 in the swiffy html file, as are the images. But I could never get the audio to play on mobiles. Further info: How to make audio in swiffy HTML5 files play in mobile browsers? or
Mobile browsers unable to load base64 data uri for an <audio> tag.

live tv stream to ipad 1 or 2 using vlc command line and html5 from analog TV card on ubuntu linux

My system:
I run ubuntu natty, and have an old analog TV card, the winTV-go +FM. and vlc 1.1.9., apache2
What I want to achieve:
take the output of my old tv card, stream it with vlc and have the stream embedded on a local site to be displayed with html5, so i can watch the stream on my ipad 1 or 2
Current situation:
I have managed to get streaming with vlc working (i don't use the gui) with different containters and codecs. I have 3 working stream-commands that include:
1: vlc -vvv v4l2:///dev/video0:width=640:height=480 :input-slave=alsa://hw:1,1 --sout '#transcode{vcodec=mp4v,acodec=mp3,vb=8000,ab=128,channels=1,samplerate=44100}:standard{access=http,mux=ts,dst=192.168.1.10:9090}'
2: vlc -vvv v4l2:///dev/video0:width=640:height=480 :input-slave=alsa://hw:1,1 --sout '#transcode{vcodec=theo,acodec=mp3,vb=8000,ab=128,channels=1,samplerate=44100}:standard{access=http,mux=ogg,dst=192.168.1.10:9080/test.ogv}'
3: vlc -v v4l2:///dev/video0:width=640:height=480 :input-slave=alsa://hw:1,1 --sout '#transcode{vcodec=h264,vb=1024,acodec=mp3,channels=1,ab=128,samplerate=44100}:standard{access=http,mux=ts,dst=192.168.1.10:9080/test.mp4}'
I can open all 3 streams on a different computer and play them in vlc, Note on the side: the *.ogv stream i can also just enter as an url (http://192.168.1.10:9080/test.ogv) in chrome and it displays it there as a video, the other 2 streams it tries to download as a file.
So far so good, now I come to my html5 code (had some trouble pasting it here, so i used pastebin to dsiplay the code):
pastebin html5 code
this works perfectly in chrome, but because it is ogv it will of course not work on the ipad, so i need to use h.264/mp4 as that is supported/built in with safari, but when using the stream command 1 or 3 then i get no video displayed on ipad or chrome.
When not using stream-command 2 (the ogv command) I adjust the html5 code to one of the following (I have tried all 3):
<source src=http://192.168.1.10:9080/test.mp4 type=video/mp4; codecs="avc1.4D401E, mp3"'>
or
<source src=http://192.168.1.10:9080/test.mp4 type=video/mp4'>
or
<source src=http://192.168.1.10:9080/test.mp4'>
none of these work.
I have also added mime types to my /etc/mime.types
video/mp4 mp4
video/quicktime qt mov
video/mp4v-es
video/ogg ogv
video/webm webm
video/x-matroska mpv mkv
application/x-mpegURL m3u8
video/MP2T ts
application/x-mpegURL .m3u8
how do I have to specify the html5 code for it to be properly displayed on my ipad? anyone got a clue?
btw I have also tried http apple live stream using ffmpeg and segmenter and i get that working as well, but due to the fact that TV is a continuous stream of data it does not work well with the playlist, so i stops after a while and you need to restart etc, not very handy and i want the above working, would appreciate the help, thanks in advance :)
For HTML5 and h.264 you have to use AAC as the audio codec and mp4 as the mux, where you are currently using mp3 for audio and TS for mux. That said, I don't have VLC live streaming via HTML5 video working yet.
iPad viewers of my live web show are watching via the oPlayer free app on my h.264/AAC/FLV stream that I also use for Flash clients, but I'm hoping to get HTML5 live streaming to work.

Play Apple's .caf audio file on a webserver?

Play Apple's .caf audio file on a webserver? I have .caf audio files (Apple's open audio format) stored on my webserver and want to play them from a web browser on any O/S.
I understand, this doesn't seem like the solution you're looking for, but...
Several weeks ago we faced the same problem. We have several clients which are posting audio files to the web site from theirs iPhones, and we need to play audios on the web site.
But we didn't find any suitable flash player with .caf format support.
So we decided to convert .caf to .mp3 on the server through the ffmpeg.exe utility.
Happily, there a lot of flash players with .mp3 support.
Now I have not tried this... but...
This website:
http://modmyi.com/forums/skinning-themes-discussion/1769-how-do-i-create-caf-file.html
Seems to suggest that .CAF and .AIF may work interchangeably (It suggests that to convert to .CAF you convert to .AIF` and then rename the file).
Have you tried renaming it to .AIF and trying to play in a flash/java browser player? Alternatively just send it as a stream to the web-browser and let the client OS work out what to do with it (Like quicktime running inside the browser).
Let me know how it goes.

Resources