video-processing

Reducing video size with same format and reducing frame size

孤人 提交于 2019-11-26 18:48:54
问题 This question might be very basic Is there a way to reduce the frame size/rate of Lossy compressed (WMV, MPEG) format, to get a smaller video, of lesser size, with same format. Are there any open source or proprietary apis for this? 回答1: ffmpeg provides this functionality. All you need to do is run someting like ffmpeg -i <inputfilename> -s 640x480 -b 512k -vcodec mpeg1video -acodec copy <outputfilename> For newer versions of ffmpeg you need to change -b to -b:v : ffmpeg -i <inputfilename> -s

Extracting DCT coefficients from encoded images and video

别来无恙 提交于 2019-11-26 17:38:38
Is there a way to easily extract the DCT coefficients (and quantization parameters) from encoded images and video? Any decoder software must be using them to decode block-DCT encoded images and video. So I'm pretty sure the decoder knows what they are. Is there a way to expose them to whomever is using the decoder? I'm implementing some video quality assessment algorithms that work directly in the DCT domain. Currently, the majority of my code uses OpenCV, so it would be great if anyone knows of a solution using that framework. I don't mind using other libraries (perhaps libjpeg, but that

Video processing with OpenCV in IOS Swift project

旧巷老猫 提交于 2019-11-26 16:29:36
问题 I've integrated opencv in Swift IOS project using bridging header (to connect Swift to Objective C) and a Objective C wrapper (to connect Objective C to C++). Using this method I can pass single images from the Swift code, analyse them in the C++ files and get them back. I've seen that opencv provides CvVideoCamera object that can be integrated with an Objective C UIViewController. But since my UIViewController are written in Swift I've wondered if this is possible as well? 回答1: This is an

Fetching the dimensions of a H264Video stream

一世执手 提交于 2019-11-26 15:50:35
I am trying to fetch the dimensions (Height and width) from a H264 stream. I know that to fetch the same details from a mpeg2 stream you have to look at the four bytes following the sequence header start code ((01B3)). Will the same logic work for H264? Would appreciate any help I get.. Cipi NO!!! You must run a complex function to extract video dimensions from Sequence Parameter Sets. How to do this? Well first you must write your own Exp-Golomb decoder, or find one online... in live555 source code somewhere there is one for example... Then you must get one SPS frame. It has NAL=0x67 (NAL is

Superimposing two videos onto a static image?

不问归期 提交于 2019-11-26 15:21:22
问题 I have two videos that I'd like to combine into a single video, in which both videos would sit on top of a static background image. (Think something like this.) My requirements are that the software I use is free, that it runs on OSX, and that I don't have to re-encode my videos an excessive number of times. I'd also like to be able to perform this operation from the command line or via script, since I'll be doing it a lot. (But this isn't strictly necessary.) I tried fiddling with ffmpeg for

Rotating videos with FFmpeg

血红的双手。 提交于 2019-11-26 13:52:39
I have been trying to figure out how to rotate videos with FFmpeg. I am working with iPhone videos taken in portrait mode. I know how to determine the current degrees of rotation using MediaInfo (excellent library, btw) but I'm stuck on FFmpeg now. From what I've read, what you need to use is a vfilter option. According to what I see, it should look like this: ffmpeg -vfilters "rotate=90" -i input.mp4 output.mp4 However, I can't get this to work. First, -vfilters doesn't exist anymore, it's now just -vf . Second, I get this error: No such filter: 'rotate' Error opening filters! As far as I

Android make animated video from list of images

十年热恋 提交于 2019-11-26 09:08:44
问题 I want to make animated video from list of images by applying transition animation between two images. I found many similar questions on SO like, Android Screen capturing or make video from images Android- How to make video using set of images from sd card? All similar SO questions suggest to used animation for that, but how can we store that animated images to video file? Is there any Android library support this facility to make video of images? 回答1: Android do not support for AWT's

How to detect if a video file was recorded in portrait orientation, or landscape in iOS

浪尽此生 提交于 2019-11-26 08:59:57
问题 I am using AlAssetsGroup enumerateAssetsAtIndexes to list the assets in the Photos (Camera) app. For a given video asset I want to determine whether it was shot in portrait or landscape mode. In the following code, asset is an AlAsset and I have tested to see if it is a video asset [asset valueForProperty:ALAssetPropertyType] is AlAssetTypeVideo , then: int orientation = [[asset valueForProperty:ALAssetPropertyOrientation] intValue]; In this case orientation is always 0 which is

Extracting DCT coefficients from encoded images and video

巧了我就是萌 提交于 2019-11-26 05:30:17
问题 Is there a way to easily extract the DCT coefficients (and quantization parameters) from encoded images and video? Any decoder software must be using them to decode block-DCT encoded images and video. So I\'m pretty sure the decoder knows what they are. Is there a way to expose them to whomever is using the decoder? I\'m implementing some video quality assessment algorithms that work directly in the DCT domain. Currently, the majority of my code uses OpenCV, so it would be great if anyone

Fetching the dimensions of a H264Video stream

一笑奈何 提交于 2019-11-26 04:37:53
问题 I am trying to fetch the dimensions (Height and width) from a H264 stream. I know that to fetch the same details from a mpeg2 stream you have to look at the four bytes following the sequence header start code ((01B3)). Will the same logic work for H264? Would appreciate any help I get.. 回答1: NO!!! You must run a complex function to extract video dimensions from Sequence Parameter Sets. How to do this? Well first you must write your own Exp-Golomb decoder, or find one online... in live555