Using VideoJS 4.0.4 (it also did this in version 3) the playback is slow/choppy in Chrome (not tested in other browsers) when using the Flash player. The playback smooths out after the buffer finishes loading the full video. Is there any fix for this?
I'm not sure if this is exactly what you are experiencing so apologies if this is irrelevant, but for me the flash player was waiting until the whole video was loaded before it would start playing.
If you are using the mp4 format, I found that moving the moov atom to the front of the movie file with qt-faststart helped a lot.
Here are some resources I found when I had this similar problem.
http://www.adobe.com/devnet/video/articles/mp4_movie_atom.html
http://help.videojs.com/discussions/problems/1141-ie8-flash-fallback-buffers-entire-video-before-it-starts-to-play
Post processing in ffmpeg to move 'moov atom' in MP4 files (qt-faststart)
I fixed it. It ended up being the Flash player. I went to chrome://plugins, clicked the + at the top right, and noticed I had 2 Flash plugins installed: 11.7.700.225 (pepflashplayer.dll) and 11.7.700.224 (NPSWF32_11_7_700_224.dll). I disabled them one at a time and retried the video - the 11.7.700.224 one ran flawlessly while buffering, while the 11.7.700.225 version was the one causing the choppiness.
Related
I have two live videos feeding an encoder which creates H.264 chunk files and an HLS manifest which is being served by an apache web server.
A browser page using video.js shows a player. Pressing "play" on the browser properly plays the video. It works well.
However, if we change video sources (by flipping the switch in the picture below), there is a considerable delay (10 seconds) before the new content is displayed in the player. I'd like to get that to 3 seconds.
It appears that video.js and/or the HTML5 player in browser is buffering that amount of content. (if you delete the files on the web server, kill apache, or even pull the ethernet cable, the video keeps on playing!)
A button on the web page controls the switch. When clicked, I would also like to clear or reset the player so that it immediately re-reads the index.m3u8 manifest and downloads the new chunks.
So far, haven't found anything promising searching the internet or in the video.js API docs. There are lots of articles on API calls for fetching the current buffer percentage but cannot find any API for clearing it altogether.
Any ideas?
The encoder is set for 3 second chunks and the playlist depth is set for 10 entries.
I had a similar problem. Since i could not find a reliable API for this, i came up with a rather dirty workaround to clear the buffer:
var ctime = player.currentTime();
player.currentTime(0);
player.currentTime(ctime);
This currently works for me in all major browsers.
I have a video thumbnail on the top right of this screen that, when clicked, plays fine in Firefox. However, in Chrome and Safari the video will not play. The loading image spins forever and will not continue to the video.
Any advice is much appreciated. I have tried upgrading VideoJS from v2.0.2 to v4.1.0 and that still did not solve the problem.
Here is the link: http://www.therefinerycreative.com/#!/theatrical
I believe it is the actual source movie files that are the problem. The mp4 file is 15mb which is quite big for a 1 minute movie. I can see the dimension size of the movie is fine. Try decreasing the size of the file down first. Or to save you time first, try putting in the standard video from videojs just to double check that it definitely is the source file(s). http://vjs.zencdn.net/v/oceans.mp4
I also noticed that you use an ogg file too. In most cases you can get away with just using an mp4 file. Try both of these solutions and let me know how you get on.
Using IE everything goes well (i got a mp4 video with priority execution setted on flash). when i try to view my video on chrome all seem to be good too, but in few seconds (not always but often) videojs crashes.
This is the log:
error:MediaError
code:3
What should i do?
According to HTML5 spec error code MEDIA_ERR_DECODE = 3 means that video was failed to be decoded. Chrome could reach broken frame e.g. video was encoded incorrectly.
In my experience HTML5 video decoding has poor support when it comes to error handling. Flash is more bullet-proof here. I got an example when Chrome (HTML5) failed to play video but it was playing fine in FF (flash). Converting to different pixel map (yuvj420p -> yuv420p) resolved my issue.
It means that first you should try encoding video with different options. As an option you can use ffmpeg
I'm using Video.js to play back videos in MP4 format on a client's website.
The player uses html5 video and Adobe Flash Player as a fallback.
(In my case it seems to use Flash always so I don't know if the problem exists in the native html5 player as well.)
The video only starts playing after the *.mp4 file is completely loaded. So no buffer for a few seconds. The file must be completely downloaded by the browser before it starts playing.
When the video is long, the visitor has to wait very long before he can even see that the video is working.
The question now is, is it the browser, the script (video.js) or the video file that creates that problem.
On the videojs.com website however the video is playing back while loading, so works properly. Therefore I think it can't be the browser.
Has anyone else had that problem? How can I fix this issue?
Any advice is very much appreciated!
Thanks
Max
That occurs because the moov atom of the mp4 file is on the end of the file, the player needs to know the moov atom before start playing, you can move easily the moov atom to the beginning of the file with MP4Box, there is a gui version for Windows.
In Linux command line you move the MA with: MP4Box -add my_video.mp4 my_newVideo.mp4.
This takes a few seconds.
More info:Adobe's explanation of moov atomhere
Are you sure that you have your tag with preload="none" because I was having the same issue and I had preload="auto". I changed it to "none", it worked great!!
My issue had nothing to do with the moov atom because I tried that too and it didn't have any effect. I even removed this converted video and it still worked with preload="none".
kjsharks
I use this command to add the metadata:
MP4Box -isma your-file.mp4
;)
Quoting http://docs.videojs.com/docs/guides/options.html
The preload attribute informs the browser whether or not the video data should begin downloading as soon as the video tag is loaded. The options are auto, metadata, and none.
I want to make simple project which play flash video file from online.
I've searched some articles and read carefully.
But I can't understand, how to play flash video files on iPad by Code.
So I need help from you.
Please.
Simply put, without being jailbroken, No you cannot.
The closest thing to being able to view flash in iOS is Frash, and I am not even sure if it is actively being developed or supported any more.
You can always check out the open source project for Frash. by Comex.
All IOS devices don´t support Flash player, but is be possible to use a Javascript or HTML5 player for video.
No, iWhatever's currently do not and to the best of my surfing knowledge, have no intention of supporting flash format due to some argument between apple and adobe.
At the end of the day, the Flash video format is a container for a movie that’s been compressed by some codec. If you can get to the source file, you know the format of the container, you know the codec that was used to encode the video, and you know how to write code to convert that into audio streams and video frames, then yes, you can play Flash videos on the iPad.
So, to recap:
Get the Flash video file.
Get to the encoded video data in the Flash file.
Decode the video and convert it, either into raw audio and video or to another format that the iPad can play.
Play the result of #3.
Needless to say, this is quite the endeavor. It’s better to download the movies to your desktop and convert them there before loading them into your application.
Yes you can! The question is whether or not you can play the video itself not whether or not ipads support flash player.
the answer is this.. new versions of "flash video" have a f4v file extension. These videos are basically a h.264 mp4 files. You "may" be able to play it in an ipad simply by renaming it to .mp4
If that doesn't work then use a utility like Miro to convert your "flash video" to a format that your ipad will accept. http://www.mirovideoconverter.com/