video-compression

How to create a anAudioSampleBuffer for CMSampleBufferGetFormatDescription in iOS Swift

心已入冬 提交于 2020-05-15 08:39:11
问题 I have been working on video compression in iOS Swift, and following this SO's answer. It is working fine until I change this piece of code's file format to .mp4 let videoWriter = try! AVAssetWriter(outputURL: outputURL as URL, fileType: AVFileType.mov) There are reasons that I need the output in .mp4 file format. So when I do that it crashes the app. And gives me this error, 2020-04-27 18:20:52.573614+0500 BrightCaster[7847:1513728] *** Terminating app due to uncaught exception

Compress the video using ffmpeg when upload using php form?

时间秒杀一切 提交于 2019-12-11 23:17:23
问题 I am using laravel famework and i am using ffmpeg PHP library. If have not found any good links for video compression using ffmpeg. There are two cases of compression. 1) Video Already exists in folder - this i have done already 2) Video Upload through Form - this i am not able to do :( Lets i am sharing 1st case code:- Suppose my video is 13Mb and below code compressed to 4.5Mb (running fine) $inputVideo = public_path('input/airplane_flight_airport_panorama_1080.mp4'); $outputVideo = public

ffmpeg video compressed but not playing in browser

喜你入骨 提交于 2019-12-10 15:39:38
问题 I have integrated ffmpeg4android lib . Video compressing is working fine but video is not playing in browser except safari browser. after uploading to server. I have used following command. ffmpeg -y -i <input file.mp4> -strict experimental -r 30 -ab 48000 -ac 2 -ar 22050 -vcodec mpeg4 -b 2097k <output file.mp4> Please Help me. Thank you in advance. 回答1: Look at the table "Browser compatibility". https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats It seems like you're

Detect current Keyframe interval in AVAsset

筅森魡賤 提交于 2019-12-08 08:41:24
问题 I am working on an application that plays back video and allows the user to scrub forwards and backwards in the video. The scrubbing has to happen smoothly, so we always re-write the video with SDAVAssetExportSession with the video compression property AVVideoMaxKeyFrameIntervalKey:@1 so that each frame will be a keyframe and allow smooth reverse scrubbing. This works great and provides smooth playback. The application uses video from a variety of sources and can be recorded on android or iOS

How to replace 'flags' with 'frame types' on ffmpeg's extract_mvs.c

女生的网名这么多〃 提交于 2019-12-06 14:57:37
问题 I am in the process of extracting motion vectors from ffmpeg to use in a computer vision project. I have been looking for an easy way to extract this information in a meaningful way. While reading through different posts and other websites, I came across the extract_mvs.c in the example folder of FFmpeg. I noticed that out of the data produced by this file (after it has been compiled) there is a flag column which I would like to modify, to make it print frame types instead of 0x0s as shown