video-processing

Problem with VideoCapture in OpenCV 2.3

故事扮演 提交于 2019-12-07 08:04:20
问题 I have problem in using VideoCapture calss for opening a MPEG video file. The code was compile properly. However, during the running time, it can not open the file and give me the following warning message: warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:477) I have this problem only when I build my code in debug mode. I relsease mode the code works correctly. The code also works correctly in the c style using CvCapture and cvCaptureFromAVI (in both release and

How to get video from camera Intent and save it to a directory?

风流意气都作罢 提交于 2019-12-07 07:15:01
问题 Is it possible to have code similar to the following that does the same for video? if (resultCode == Activity.RESULT_CANCELED) { // camera mode was canceled. } else if (resultCode == Activity.RESULT_OK) { // Took a picture, use the downsized camera image provided by default Bitmap cameraPic = (Bitmap) data.getExtras().get("data"); if (cameraPic != null) { try { savePic(cameraPic); } catch (Exception e) { Log.e(DEBUG_TAG, "saveAvatar() with camera image failed.", e); } } What I am trying to do

FFmpeg conversion FROM UYVY422 TO YUV420P

爱⌒轻易说出口 提交于 2019-12-07 06:52:18
问题 I have raw video in UYVY422 format and I want to convert it YUV420p. I'am executing that command() ffmpeg -y -r 25.0 -f rawvideo -s 1920x1080 -pix_fmt uyvy422 -i input.avi -pix_fmt yuv420p -f avi -r 25 -s 1920x1080 output.avi and my output video seems to float(right side of video start to be present at left edge and it is moving from left to right) Has anyone got any idea about what I am doing wrong? I was trying to set output video to raw format, but it didnt work...\ 回答1: ffmpeg -y -r 25.0

Cropping a video file with defined width, length, and pixel location

狂风中的少年 提交于 2019-12-07 03:41:43
问题 I an trying to create a program that will detect a face in a video. There are a few requirements that must be passed before I accept the "face". After all of the requirements are met I then want to take the frames that hold that "face" and crop them to make the face the area of focus. The program will go through every frame and do this, then take the new video and make that into a video file. I have never worked with video files, or image file so this is all new to me. I am currently writing

Android App to Stream IP Camera using P2P mode over Mobile port?

China☆狼群 提交于 2019-12-07 01:46:42
问题 I am trying to stream the video via IP camera on an Android App. I have been successful to get the video using the following: RTSP using Media Player and Surface View. RTSP using Video View. Redirecting to VLC for streaming the video. Redirecting to Native Video Player for streaming the video. Now, all these cases are working but with a lag of 7-8 seconds on average even over the local network. I see some apps that steam without any lag even on remote network, that use mobile port (18600) .

Video files conversion/transcoding Google App Engine

本小妞迷上赌 提交于 2019-12-06 19:27:19
问题 I want to start a cloud computing project with the simple task to: Receive uploaded video files Do some transcoding / converting to them Allow user to download / stream the generated file I was thinking ffmpeg as an external command line tool integrated in a Java/Google App engine Application . Since it was fairly hard to be assured about the limitations of the framework, can someone tell me if this is feasible? Thank you in advance! 回答1: You have to offload ffmpeg to an external server, like

opencv - videowriter control bitrate

隐身守侯 提交于 2019-12-06 17:48:25
I have a working python script that uses the video writer from opencv. source https://gist.github.com/stanchiang/b4e4890160a054a9c1d65f9152172600 If i take in a file, and regardless of whether I simply pass the video frame through to the writer (effectively duplicating the file) or if i try to edit the frame, the file is always larger. I would like for it to be no larger than the original (since if you read my script i'm blurring a lot of stuff). After checking their metadata, with ffprobe -v quiet -print_format json -show_format -show_streams inputFile.mp4 I notice that the bitrate of the new

is it possible to set GIF image with video?

不问归期 提交于 2019-12-06 15:53:18
问题 I am trying to combine video with GIF image, For this I am using MainCompositionInst.animationTool = [AVVideoCompositionCoreAnimationTool videoCompositionCoreAnimationToolWithPostProcessingAsVideoLayer:videoLayer inLayer:parentLayer]; and in the video layer I was set GIF image but unfortunately it was not animating, So my question is that is it possible to do this ? please suggest me.. Thanks in advance. 回答1: Apple's support for GIF is fairly limited. You could use this code to convert from

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

How can I detect direction and number of objects using Emgu?

大憨熊 提交于 2019-12-06 14:45:55
How can I detect direction and number of objects using Emgu? Objects are moving in all directions (2D); and a camera is seeing these objects (on a 2D surface). Object may have little differences in shape but are similar enough. Thanks Invoke cvAbsDiff on successive frames (may be on each n -th and (n - gap) -th frame) to detect changes and use thresholding in order to get a changes mask For each frame call cvUpdateMotionHistory and pass obtained mask as an argument To get motion segments (objects) and their orientation: call cvCalcMotionGradient passing motion history accumulated by previous