mp4

MP4 File Format Specification [closed]

丶灬走出姿态 提交于 2019-11-28 03:57:56
I am writing some code to parse MP4 files ... Is there a free source to get documentation on the MP4 File Format Specification. So far I have only found an ISO document which I would need to purchase ISO PDF . Is MP4 Not an open standard ? Here's the specification of the ISO base format , and here is the MP4 file format specification , both defined as part of the ISO/IEC 14496 standard. Also take a look at the QuickTime MP4 specification . It has a very clear explanation. Jaco " ISO 14496-1 Media Format " gives a detailed description of the MP4 layout: Akagi201 The latest ISO doc is ISO/IEC

How to convert mp4 files into mp3 on button click using ffmpeg/php?

ぐ巨炮叔叔 提交于 2019-11-28 02:25:59
I am working on a php code as shown below where I am converting mp4 files into mp3 using system command ffmpeg (in the case statement below) . <?php $mp4_files = preg_grep('~\.(mp4)$~', scandir($src_dir)); foreach ($mp4_files as $f) { $parts = pathinfo($f); switch ($parts['extension']) { case 'mp4' : $filePath = $src_dir . DS . $f; system('ffmpeg -i ' . $filePath . ' -map 0:2 -ac 1 ' . $destination_dir . DS . $parts['filename'] . '.mp3', $result); // Through this command conversion happens. } } $mp3_files = preg_grep('/^([^.])/', scandir($destination_dir)); ?> After conversion, mp3 files goes

下载mp4文件

和自甴很熟 提交于 2019-11-28 01:02:08
实现mp4文件的下载,而不是在线播放 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <script src="https://unpkg.com/axios/dist/axios.min.js"></script> </head> <body> <button onclick="GetFile()">下载</button> <script> // 会先下载流,完成后才弹出选择目录,所以最好加上进度条 function GetFile(){ axios({ url: `http://image.wangrui8.top/dms-2019-07-22-00-00~1.mp4`, method: 'get', responseType: 'blob', onDownloadProgress (progress){ // 这里是下载的进度 console.log(Math.round(progress.loaded / progress.total * 100) + '%'); }, }) .then(res=>{ let blobUrl = window.URL.createObjectURL(res.data); let link = document

MediaMuxer error “Failed to stop the muxer”

不羁岁月 提交于 2019-11-28 00:53:27
I'm encoding Camera preview data using MediaCodec with mime-type "video/avc" and passing the encoded data (video-only, no audio) to MediaMuxer . The muxer seems to run fine and creates a reasonably sized output file (i.e., gets larger the longer I record). However, when I try to stop the muxer I get the "Failed to stop the muxer" error: 10-21 10:39:40.755: E/AndroidRuntime(2166): Caused by: java.lang.IllegalStateException: Failed to stop the muxer There are some suspicious MPEG4Writer log messages preceding the failed stop: 10-21 10:39:40.740: D/MPEG4Writer(2166): Stopping Video track 10-21 10

Is there a JAVA API for extract MP4 Metadata

ぃ、小莉子 提交于 2019-11-27 22:43:56
问题 I want to be specific as to what I am asking. I am not asking to modified any MP4 files, just extract metadata such as Width and Height and bitrate and encoding and this is not in the MP3 tags. I have tested Xuggle which works, but I need to have a library that does not use JNI or any native code. I already looked into MP4Parser, and Apache Tika, and they both does not extract metadata, just tag info or alter the file. Is there such java lib? 回答1: I actually found what I was looking for using

ffmpeg的常用命令行

点点圈 提交于 2019-11-27 22:26:04
1.mp4转yuv命令行 ffmpeg -i input.mp4 -ss 00:00:00 -t 00:00:10 output.yuv 或者ffmpeg -i input.mp4 -f rawvideo output.yuv 或者ffmpeg -i input.mp4 -ss 00:00:00 -t 00:00:10 -pix_fmt yuv420p output.yuv 或者ffmpeg -i 1.mp4 output1.yuv 2.yuv转mp4命令行 ffmpeg -s w*h -pix_fmt yuv420p -i input.yuv -vcodec libx264 output.mp4 3.查看视频文件信息命令行 ffmpeg -i 0.MP4 4.视频切割命令行 ffmpeg -i 1.mp4 -ss 00:01:40 -to 00:00:60 -acodec copy -vcodec copy output1.mp4 5.图片格式转换命令行 ffmpeg -i input.jpg output.png 6.图片截取命令行 ffmpeg -i test.avi -y -f image2 -ss 00:00:00 -vframes 1 test.jpg 将所有视频帧转化为图片: ffmpeg -i input.mp4 %d.jpg #生成1.jpg,2.jpg,3

How to compress mp4 video using MediaCodec Android?

不羁岁月 提交于 2019-11-27 20:19:48
问题 In my Android app, I want to compress mp4 video by changing its resolution, bitrate. I don't want to use FFmpeg (because I don't want to use NDK), so I decided to use MediaCodec API. Here are my logical steps: Extract video file with MediaExtractor, then decode data. Create new encoder with my new resolution, bitrate and encode data. Using MediaMuxer to create a new mp4 file. My problem is: I don't know how to setup the connection between output of decoder and input of encoder. I can decode

Flush & Latency Issue with Fragmented MP4 Creation in FFMPEG

为君一笑 提交于 2019-11-27 19:55:19
I'm creating a fragmented mp4 for html5 streaming, using the following command: -i rtsp://172.20.28.52:554/h264 -vcodec copy -an -f mp4 -reset_timestamps 1 -movflags empty_moov+default_base_moof+frag_keyframe -loglevel quiet - "-i rtsp://172.20.28.52:554/h264" because the source is h264 in rtp packets stream from an ip camera. For the sake of testing, the camera is set with GOP of 1 (i.e. all frames are key frames) "-vcodec copy" because I don't need transcoding, only remuxing to mp4. "-movflags empty_moov+default_base_moof+frag_keyframe" to create a fragmented mp4 according to the media

Unable to host MP4 files on Azure web site

夙愿已清 提交于 2019-11-27 19:19:30
I am hosting a static website on a reserved web site in Azure (It is PaaS, no access to OS/IIS). I am trying to add some .mp4 videos but when I click on the links I get The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. Please see example here . If I right click on the link and try to save file I get - Failed - No file. I am using a paid instance so don't think it is resource issue. The video files are less than 2MB. They have never worked. The site is very static. Does anyone know how I can resolve this? Should I be hosting MP4 files in

How to play .mp4 video in videoview in android?

早过忘川 提交于 2019-11-27 18:08:29
I am working on video player application, I want to play .mp4 video in native videoview. I am not able to play video using url . I am getting error Sorry this video cannot be played and also I am not able to play downloaded video in native videoview. My code for playing video in videoview: String mUrl = "http://www.servername.com/projects/projectname/videos/1361439400.mp4"; VideoView mVideoView = (VideoView)findViewById(R.id.videoview) videoMediaController = new MediaController(this); mVideoView.setVideoPath(mUrl); videoMediaController.setMediaPlayer(mVideoView); mVideoView.setMediaController