video-processing

Ffmpeg- Split video into 30 seconds parts in android

旧时模样 提交于 2019-12-02 22:05:25
问题 I am working on a project. In which I want to split the video into 30 sec equal parts. If the video is 45 sec long than ideally in 30 and 15-sec parts. I already created a method which takes the starting and the ending point and run the Ffmpeg command to cut the video. This is what I created so far private void executeCutVideoCommand(int startMs, int endMs) { File moviesDir = Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_MOVIES ); String filePrefix = "cut_video"; String

H.264 codec explained [closed]

断了今生、忘了曾经 提交于 2019-12-02 21:04:12
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. I am making a app which supports video calls and I am looking for a tutorial/doc explaining the structure of the h.264 codec. I want to be able to package the stream, wrap it in datagrams, send and unpack on the receiving side. Any suggestions/reading materials? What do you mean by structure? If you are talking about the bitstream syntax, you can download the H.264 standard for free. There are also many books/papers

how to reduce size of video before upload to server programmatically in android

时光怂恿深爱的人放手 提交于 2019-12-02 20:53:00
I want to upload video to server, when I catch video from gallery or record from camera , the server response to me that error but when I upload video with size 2 MB , it is uploading successfully. How can I compress the video to reduce the size? I uploaded the video from face book , the size of video on my mobile is 140 MB , but face book make a process on the video and reduce it's size to 1.35 MB erlangb You have two way to do that: Encode it to a lower bit rate and/or lower resolution. Have a look here: Is it possible to compress video on Android? . Try to zip/compress it. Have a look here:

Alternative to ffmpeg for iOS

青春壹個敷衍的年華 提交于 2019-12-02 19:51:55
I've been trying to implement ffmpeg in my ios app several weeks. And now I can play several avi files, but other files like a flv, wma, mp4... play slow. I have spent much time with ffmpeg and opengl and I don't find solution. I'm looking other alternatives to play this files on ios device. Someone know other libraries, frameworks, ... that I can use to play this files. No matter if they have business licenses. Very thanks, Edited: Init Shader: shader = [[GLShader alloc] initWithFileName:@"render" attributes:[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:0], @"position",

OpenCV + python — grab frames from a video file

吃可爱长大的小学妹 提交于 2019-12-02 17:21:20
I can't seem to capture frames from a file using OpenCV -- I've compiled from source on Ubuntu with all the necessary prereqs according to: http://opencv.willowgarage.com/wiki/InstallGuide%20%3A%20Debian #!/usr/bin/env python import cv import sys files = sys.argv[1:] for f in files: capture = cv.CaptureFromFile(f) print capture print cv.GetCaptureProperty(capture, cv.CV_CAP_PROP_FRAME_WIDTH) print cv.GetCaptureProperty(capture, cv.CV_CAP_PROP_FRAME_HEIGHT) for i in xrange(10000): frame = cv.QueryFrame(capture) if frame: print frame Output: ubuntu@local:~/opencv$ ./test.py bbb.avi <Capture

MPEG4 quality saved in MATLAB

丶灬走出姿态 提交于 2019-12-02 17:01:20
问题 I need to get an mpeg4 file to use in another application, from an original mpeg4 video I loaded into matlab and edited (frame by frame). To do so, I tried using VideoWriter, setting the quality to 100%: newVid = VideoWriter(outputfilename, 'MPEG-4'); newVid.FrameRate = fps; newVid.Quality = 100; However, the result I'm getting is very poor and if the original unedited video size was ~50MB, the one I get post-edit in matlab is around ~20MB, and I don't know how to keep the quality and size as

Finding an interesting frame in a video

狂风中的少年 提交于 2019-12-02 16:44:56
Does anyone know of an algorithm that I could use to find an "interesting" representative thumbnail for a video? I have say 30 bitmaps and I would like to choose the most representative one as the video thumbnail. The obvious first step would be eliminate all black frames. Then perhaps look for the "distance" between the various frames and choose something that is close to the avg. Any ideas here or published papers that could help out? If the video contains structure, i.e. several shots, then the standard techniques for video summarisation involve (a) shot detection, then (b) use the first,

How to get Bytes from CMSampleBufferRef , To Send Over Network

家住魔仙堡 提交于 2019-12-02 14:10:44
Am Captuing video using AVFoundation frame work .With the help of Apple Documentation http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/03_MediaCapture.html%23//apple_ref/doc/uid/TP40010188-CH5-SW2 Now i did Following things 1.Created videoCaptureDevice 2.Created AVCaptureDeviceInput and set videoCaptureDevice 3.Created AVCaptureVideoDataOutput and implemented Delegate 4.Created AVCaptureSession - set input as AVCaptureDeviceInput and set output as AVCaptureVideoDataOutput 5.In AVCaptureVideoDataOutput Delegate method -(void)captureOutput:

MPEG4 quality saved in MATLAB

喜欢而已 提交于 2019-12-02 10:06:50
I need to get an mpeg4 file to use in another application, from an original mpeg4 video I loaded into matlab and edited (frame by frame). To do so, I tried using VideoWriter, setting the quality to 100%: newVid = VideoWriter(outputfilename, 'MPEG-4'); newVid.FrameRate = fps; newVid.Quality = 100; However, the result I'm getting is very poor and if the original unedited video size was ~50MB, the one I get post-edit in matlab is around ~20MB, and I don't know how to keep the quality and size as they were. I also tried saving as .avi and converting to mpeg4 with ffmpeg, but it gave even poorer

How to detect average pixel intensity from live camera preview?

六月ゝ 毕业季﹏ 提交于 2019-12-02 04:33:38
问题 I am building a scanner app, and trying to determine the "preview quality" from the preview callback of the camera. I want to customize the camera's AUTO_FLASH_MODE where it will be turned on if the environment is too dark. How can I detect if there is a high average of dark pixels? This means (in preview) I am getting darkness and therefore need to turn on the camera's flash light. 回答1: Either find out how to access pixel values of your image and calculate the average intensity yourself or