mp4

Adding watermark bitmap over video in android: 4.3's MediaMuxer or ffmpeg

孤街浪徒 提交于 2019-11-27 03:44:42
Here is my scenario: Download an avi movie from the web Open a bitmap resource Overlay this bitmap at the bottom of the movie on all frames in the background Save the video on extarnal storage The video length is 15 seconds usually Is this possible to achieve using MediaMuxer ? Any info on the matter is gladly received I've been looking to http://bigflake.com/mediacodec/#DecodeEditEncodeTest (Thanks @fadden) and it says there: "Decoding the frame and copying it into a ByteBuffer with glReadPixels() takes about 8ms on the Nexus 5, easily fast enough to keep pace with 30fps input, but the

FFMPEG命令行处理视频进阶——高阶必读

旧时模样 提交于 2019-11-27 02:57:09
from: https://blog.csdn.net/zhangamxqun/article/details/80295833 FFMPEG拥有强大的视频处理能力,可惜的是有很多人不知道如何使用。本文深入介绍如何用编译好ffmpeg.exe程序处理视频,既有常用的简单的处理,也有一些比较少见的高大上的处理,一定能让你受益匪浅。ffmpeg是一把宝刀,在视频处理上,基本是一刀在手,天下我有。 首先下载编译好的ffmpeg程序,可以去下面的网址, https://ffmpeg.zeranoe.com/builds/# 点击"Donload Build"按钮下载最新编译的版本,解压后可以看到ffmpeg.exe文件用于处理视频,ffplay.exe文件用于播放视频。也可以去ffmpeg的官网http://ffmpeg.org/ 下载源码自己编译(这个工作量比较大)。 打开命令行窗口,使用cd命令行进入到ffmpeg所在的目录,接下来就可以直接输入处理命令了。下面就来介绍各种各样的命令。下面命令行中的输入视频和输出视频的路径必须正确,如果路径不存在会出错的哦。 1、知道了视频流地址如何保存出本地文件: ffmpeg -i rtmp://122.202.129.136:1935/live/ch4 -map 0 d:\work\yyy.mp4 2、知道了流地址,播放视频文件: ffplay

如何将优酷独享视频kux格式转换成mp4视频

风流意气都作罢 提交于 2019-11-27 02:37:14
优酷播放器kux格式加密视频文件可以使用优酷视频客户端播放,而优酷视频客户端也提供了转换视频格式的功能,不过也只能转换一般的视频,除了优酷独享视频、VIP视频及1080P视频外,其他的视频都可以转换格式。但是这三种情况也是可以转换的,就是使用第三方转换器。 1、首先将下载的kux视频文件添加到 迅捷视频转换器 中, 2、输出视频格式需要选择为mp4格式,当然也可以选择mkv,flv等等(可以转换所有的视频格式), 3、如果需要设置输出mp4视频的更多分辨率可以点击自定义设置,然后选择参数, 4、然后要选择输出视频的保存位置,可以直接复制保存地址然后输入到路径框中, 5、最后就可以将kux格式转换成mp4格式了。点击全部转换就可以了。 以上就是将kux格式转换成mp4格式的步骤了。 来源: https://blog.csdn.net/qq_43173286/article/details/99291997

H.264 encoded MP4 presented in HTML5 plays on Safari but not iOS devices

三世轮回 提交于 2019-11-27 02:09:44
问题 I'm using Adobe Media Encoder CS5 to encode a FLV file to H.264 to present on the web via HTML5 and the video file plays just fine in Safari in OS X (and in Firefox encoded to OGG) but on any iOS device (iPad, iPhone) I get the play icon with the slash running through it. Has anyone encountered this before and if so, any ideas as to why? Thanks. 回答1: We had this problem and found that encoding the files in accordance with iPhone's webview's standards created files that played fine. Not all H

Anyone familiar with mp4 data structure?

我只是一个虾纸丫 提交于 2019-11-27 00:21:46
问题 Where in the mp4 file structure is the duration of it? 回答1: This may not be the answer to your problem but it was to mine: http://mediainfo.sourceforge.net/ (It has a library and it's open source so you can just check for the part(s) you need) 回答2: See https://github.com/sannies/mp4parser project. It is a Java library that shows the structure of mp4 files. 回答3: As far as i know - "mp4" container is derived from the QuickTime atom structure. You can read the description of QuickTime File

MP4 File Format Specification [closed]

筅森魡賤 提交于 2019-11-27 00:18:02
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . 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 ? 回答1: Here's the specification of the ISO base format, and here is the MP4

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

馋奶兔 提交于 2019-11-26 23:46:49
问题 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. }

How to output fragmented mp4 with ffmpeg?

我们两清 提交于 2019-11-26 23:36:50
ffmpeg -i infile.avi out.mp4 outputs non-fragmented MP4. How do I obtain fragmented mp4? Update A fragmented mp4 file is internally divided into several back-to-back chunks or MPEG-4 movie fragments. Each chunk has its own moof atom - so there are several moof atoms interleaved in the file instead of a single moov at the end as in the case of an unfragmented mp4. This makes it easier to stream over slow networks where buffering is involved There are several tools like mp4box that convert a normal mp4 to a fragmented one. Unfortunately we cannot use something like this ffmpeg <options to output

Reading mp4 files with PHP

最后都变了- 提交于 2019-11-26 22:36:19
I'm trying to read mp4 file with PHP and what I'm doing now is this: <?php header("Content-Length: filesize"); readfile('file.mp4'); ?> but this way I can't skip or even go back until the video is not loaded 100%. Of course when I read directly from the file (video.mp4) everything goes well. Thanks. You need to implement the skipping functionality yourself in PHP. This is a code snippet that will do that. <?php $path = 'file.mp4'; $size=filesize($path); $fm=@fopen($path,'rb'); if(!$fm) { // You can also redirect here header ("HTTP/1.0 404 Not Found"); die(); } $begin=0; $end=$size; if(isset($

MediaMuxer error “Failed to stop the muxer”

邮差的信 提交于 2019-11-26 21:48:02
问题 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