mp4

适配器模式

ぃ、小莉子 提交于 2019-12-05 15:42:54
适配器模式 适配器模式(Adapter Pattern)是作为两个不兼容的接口之间的桥梁。将一个类的接口转换成客户希望的另外一个接口。 1、创建媒体播放器和高级媒体播放器接口 1 public interface MediaPlayer { 2 void play(String audioType,String fileName); 3 } MediaPlayer 1 public interface AdvanceMediaplayer { 2 void playVLC(String fileName); 3 void playMP4(String fileName); 4 } AdvanceMediaplayer 2、高级播放器的2个实现类 1 public class MP4Player implements AdvanceMediaplayer { 2 @Override 3 public void playVLC(String fileName) { 4 5 } 6 7 @Override 8 public void playMP4(String fileName) { 9 System.out.println("Playing mp4 file. Name:"+fileName); 10 } 11 } MP4Player 1 public class VLCPlayer

using ffmpeg to convert gif to mp4 , output doesn't play on android

青春壹個敷衍的年華 提交于 2019-12-05 14:44:05
I just use the following command to convert a gif file to mp4 but the resulting mp4 file doesn't play in android default video player . what did I wrong ? is there any aditional steps should I take to produce android playable mp4 files ? $ ffmpeg -f gif -i infile.gif outfile.mp4 my test gif file : Test Gif File My desktop played the output.mp4 very well using VLC Media Player and also MX Player on my android device played the video file without any error. bkucera Try this: ffmpeg -i file.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4 You can use this:

Safari html5 video mp4 not playing in htaccess folder, [duplicate]

一笑奈何 提交于 2019-12-05 12:58:03
This question already has answers here : mp4 in safari fails with htaccess authentication (6 answers) Closed 6 years ago . i m just working on a private page with some videos, which should only be accessible through htaccess. all videos are html5 encoded, and the site works fine for every browser without the htaccess file. after putting the htaccess file to my server, safari fails to load the mp4-videos. in charles i get an "401 Authorization Required". i checked several posts here to the same topic, but didn't found a solution yet. if someone can push m in the right direction, go ahead! some

IOS Web App Video Caching Playback Issue (mp4)

时光怂恿深爱的人放手 提交于 2019-12-05 12:09:10
Hello, I'm running the most recent version of iOS (5.0.1) on an iPad2 and cannot get the caching of .mp4 videos to work properly . I've added the necessary listeners to listen for applicationCache events and then write to the console when those events happen, most notably, when my app is cached as noted here: https://developer.apple.com/library/archive/documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html Using the debug console in mobile safari on my ipad, I can see messages stating that my application has "cached" successfully (hooray!).

How to extract just the audio from an MP4 file and convert it to FLAC file in C#?

匆匆过客 提交于 2019-12-05 11:20:51
My goal is to write C# that turns Microsoft LYNC meeting audio into text. Here is my project so far. Initially I was trying to record from microphone, save it to WAV then convert WAV to FLAC and using GoogleSpeechAPI, convert FLAC to text. But I got stuck recording microphone audio to WAV format. The problem is it needs to be in a very specific WAV format, i.e. int16 or int24 for the WAV to work with the WAV to FLAC convertion method. I kept recording 8 bits per sample instead of (16 or 24 bits) per sample. So, starting over. Microsoft Lync directly records meetings and saves it as a video in

iOS- how to get the duration of .mp4 file by using AVAsset or AVURLAsset

左心房为你撑大大i 提交于 2019-12-05 10:49:53
i know duration of video type questions have been answered before but i am facing real trouble in getting duration of an .mp4 file by using AVAsset and by AVURLAsset . i am using Following code NSString *itemPathString = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0] stringByAppendingPathComponent:obmodel.actualname]; NSURL *itemPathURL = [NSURL URLWithString:itemPathString]; if([[NSFileManager defaultManager] fileExistsAtPath:itemPathString]){ NSLog(@"File Exists"); } AVAsset *videoAsset = (AVAsset *)[AVAsset assetWithURL:itemPathURL];

How to multiplex mp3 and mp4 files in Android

与世无争的帅哥 提交于 2019-12-05 08:04:41
问题 Problem statement: I am designing an android app in which I have to get images from the user's gallery, combine them to make a video file and add background music. I have used jcodec library to create mp4 video file using my image resources (I know how to get images from gallery and show them in ImageViews and create bitmaps from them). I have a mp4 file. Now, I want to add background music in it using a mp3 file. Please can anybody help me with this? I cannot add it using jcodec or atleast I

Playing an app local video (.mp4) in a webview

那年仲夏 提交于 2019-12-05 06:27:44
I have an app that I'm writing for both iOS and Android. I have a content page with which I need to link to/play a .mp4 video in a UIWebView/WebView. The video is going to be included in the app so that it can work offline. With iOS I just used a video tag (with source to a project file) and then used NSNotifications to fullscreen and landscape the video (app normally runs in portrait mode). Job done. On Android I'm having some issues. Firstly, when you use a local image as the video poster it crashed the app (apparently a known bug - using a remote image solves the problem - although not much

Converting .mkv to h.264 FFmpeg

不羁岁月 提交于 2019-12-05 04:42:02
问题 I would like to convert my .mkv files to .mp4 using FFmpeg. I have tried the following code: ffmpeg -i input.mkv -c:v libx264 -c:a libvo_aacenc output.mp4 But I get the error: Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height. Is there any way to get around this? I have tried setting the bitrate of the audio but the problem seems to persist. 回答1: I suggest you first check whether your .mkv file already has H.264/AAC streams

kux优酷视频怎么转换成mp4

[亡魂溺海] 提交于 2019-12-05 04:41:29
观看电影时,大多数人都选择使用观看效果更好的计算机来播放,而在计算机方面,优酷是三大播放器之一。它以其大量专有资源和良好的用户体验而被广泛使用。但是,由优酷下载的视频是专有的kux格式,如果没有优酷播放器,则无法用其他播放器或视频编辑软件打开。在没有播放器的情况下,专有的kux格式通常会转换为流行的mp4格式,然后使用相关软件打开。如何把kux转换成mp4视频呢? 1、首先就是在优酷客户端中下载视频文件kux格式并且保存在电脑中。打开优酷视频然后搜索视频并点击进入视频的播放页面中。找到下载视频的图标,然后下载到桌面上。选择视频的剧集和视频清晰度以及下载地址,然后点击确定就行。 2、然后就是安装一个kux格式转换器到电脑上。在迅捷视频官网中把软件下载下来。打开在线安装程序,然后选择一个地址保存文件。然后就可以点击立即安装。等待迅捷视频转换器联网下载组件就行了。 3、然后打开软件可以看到有很多的功能,这些功能都是软件提供的。可以直接点击图标进入其中的工作界面。不过这里却是需要转换视频格式。所以点击视频转换功能,然后就可以进去了。 4、然后进入软件之后就需要把视频kux文件添加进去了。添加的方法有很多,可以点击软件中的添加文件按钮、添加文件夹按钮把视频导入。当然也可以把视频拖进软件中也能添加视频的。 5、然后就是设置转换之后文件的格式了。点击软件的输出格式中的视频格式下的mp4视频格式