mp4

Play Mp4 video from server android

有些话、适合烂在心里 提交于 2019-12-19 03:38:15
问题 I want to play video of mp4 format and size 4-5Mb from server in streaming mode.I am using sdk version 2.3,on emulator it gives only sound but not any picture. I also tested it on devices Samsung(android sdk ver 2.1) and LG optimus(android sdk ver 2.2) and only get "cannot play video:sorry this video is not valid for streaming to this device" message. I have searched on this but not getting any solution, if anybody have any solution please help me.Thanks in advance. Here is my code: public

FPS too high when saving video in mp4 container

你离开我真会死。 提交于 2019-12-18 16:47:52
问题 When I decode frames from avi file and then decode them in x264 and save to mp4 file, the fps of the output file is always 12,800. Therefore the file is played very fast. But, when I save the encoded in h264 frames in avi format and not mp4, so the fps is as I wanted - 25. What could be the problem? Here the code I wrote in VS2010: #include "stdafx.h" #include "inttypes.h" extern "C" { #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" #include "libavutil/avutil.h" #include

Ipad MPMovieplayerController video loads but automatically pauses when played

倖福魔咒の 提交于 2019-12-18 13:14:17
问题 I am trying to get the MPMovieplayerController to work. I load a video everything goes wel i even see the first frame but then it automatically pauses, if i press play it pauses again. In the simulator it works perfectly but on the ipad device it gives the problem. I can even seek through the video and i see the frame i seeked to but nothing plays. This is some output from the console: 2010-06-08 22:16:13.145 app[3089:207] Using two-stage rotation animation. To use the smoother single-stage

Mp4 video in html5 video tag not playing in mobile chrome and mobile safari

自作多情 提交于 2019-12-18 12:24:26
问题 I have this code to play a video in a html5 page: <video autoplay loop id="bgvid"> <source src="video-background.mp4" poster="/poster.png" type="video/mp4"> </video> The problem is that it does not work in mobile chrome (Android Phone) and either in mobile safari (iPhone). But it works in "every" browser (tested with Safari, Chrome, Firefox) in desktop and also on mobile firefox (Android Phone). How can I overcame this problem? Edit: Added this code: var myVideo = document.getElementById(

Android MediaCodec: Reduce mp4 video size

↘锁芯ラ 提交于 2019-12-18 11:51:38
问题 I am looking for a way to "compress" an mp4 video. To achieve this, I want to reduce the resolution of the video and / or reduce FPS. After long research, I think the way to do it is to use MediaCodec and related APIs as follows : -> MediaExtractor to extract encoded media data from a mp4 file. -> MediaCodec (Decoder): Decode each frame for later processing. -> MediaCodec (Encoder): At this point, I guess that's where we should establish MediaFormat parameters such as video resolution, which

How to get frame by frame from MP4? (MediaCodec)

淺唱寂寞╮ 提交于 2019-12-18 09:09:08
问题 Actually I am working with OpenGL and I would like to put all my textures in MP4 in order to compress them. Then I need to get it from MP4 on my Android I need somehow decode MP4 and get frame by frame by request. I found this MediaCodec https://developer.android.com/reference/android/media/MediaCodec and this MediaMetadataRetriever https://developer.android.com/reference/android/media/MediaMetadataRetriever But I did not see approach how to request frame by frame... If there is someone who

MP4Parser change video orientation

无人久伴 提交于 2019-12-18 06:49:49
问题 Im attempting to rotate a video that is in landscape into portrait using MP4Parser (or any other method if you know of one) currently playing with the TrackHeaderBox but unable to get the orientation to change at all, has anyone used this before that can spot the mistake I may of made? any help will go a long way thanks IsoFile out = new DefaultMp4Builder().build(result); // test double[] m = null; m = new double[] { 0.0, 1.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0 }; TrackBox tb = out

<video> plays in other browsers, but not Safari

半世苍凉 提交于 2019-12-18 05:35:26
问题 We have an MP4 video on our site; it plays fine in IE9+, Firefox, Chrome, and Chrome on mac. However, on Safari, the video doesn't play at all - it does trigger a "stalled" event and then nothing loads. I would post our HTML, but I traced the problem further by finding that Safari wouldn't play it even when navigating to the original MP4's URL. When downloaded and played locally, the video works fine in Quicktime. The weirdest part of this is that of all our developers, I can get the video to

<video> plays in other browsers, but not Safari

坚强是说给别人听的谎言 提交于 2019-12-18 05:35:09
问题 We have an MP4 video on our site; it plays fine in IE9+, Firefox, Chrome, and Chrome on mac. However, on Safari, the video doesn't play at all - it does trigger a "stalled" event and then nothing loads. I would post our HTML, but I traced the problem further by finding that Safari wouldn't play it even when navigating to the original MP4's URL. When downloaded and played locally, the video works fine in Quicktime. The weirdest part of this is that of all our developers, I can get the video to

Play mp4 file through php in HTML5 Video Tag in Chrome?

谁说我不能喝 提交于 2019-12-18 05:21:24
问题 I have a problem with mp4 files. Html5 Video Tag can play it with direct link, but not with PHP Header (Mp3 is worked fine with PHP Header). I have tried almost of solution in Stack but still not resolve my problem :( Hear is my code: PHP mp4.php error_reporting(0); $local_file = 'z.mp4';//'b.mp3'; $download_file = 'out.mp4'; // send headers header('Cache-control: private'); header('Content-Type: video/mp4'); header('Content-Length: '.filesize($local_file)); header('Content-Disposition: