video-codecs

How to encode grayscale video streams with FFmpeg?

╄→尐↘猪︶ㄣ 提交于 2019-12-05 02:12:57
问题 I've got a grayscale video stream coming off a Firewire astronomy camera, I'd like to use FFmpeg to compress the video stream but it will not accept single byte pixel formats for the MPEG1VIDEO codecs. How can I use the FFmpeg API to convert grayscale video frames into a frame format accepted by FFmpeg? 回答1: Edit MPEG-1 only accepts YUV. So convert your frame to yuv. Use the SwsContext structure, create it by calling sws_getContext, and then use sws_scale. Try the rawvideo codec. You will

Trouble saving a video file with webrtc in Android

删除回忆录丶 提交于 2019-12-04 04:44:19
问题 I am developing a webrtc based video chat app, currently the video call is working, but I want to record a video from the remote video stream using the VideoFileRenderer, there are many implementations of the interface for example: https://chromium.googlesource.com/external/webrtc/+/master/sdk/android/api/org/webrtc/VideoFileRenderer.java this is the implementation I am using. It saves the video to the file with no problem but I can only play it with desktop after using a codec because the

Can't play this video. Android videoView mp4 recorded by android device

允我心安 提交于 2019-12-03 11:34:52
I've looked for existing potential solutions with other formats and those still responds with mentioned error. Finally, recorded the video with the same device and used it as a resource for this app and it still doesn't work. Devices: SGS2 , lenovo a820 Video type: MPEG-4 video (video/mp4) videoView = (VideoView)findViewById(R.id.videoView); videoView.setVideoPath("android.resource://raw/sample.mp4"); videoView.start(); Please refer below code snippet...problem was with the path declaration.. String uriPath = "android.resource://"+getPackageName()+"/"+R.raw.aha_hands_only_cpr_english; Uri uri

In h264 NAL units means frame.?

喜你入骨 提交于 2019-12-02 20:41:27
I am working on a h264 video codec. I want to know: Is a single NAL unit in H264 equivalent to one video frame? No, a sequence of NAL units can be decoded into video frames, but they are not equivalent. http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC http://en.wikipedia.org/wiki/Network_Abstraction_Layer#NAL_Units_in_Byte-Stream_Format_Use http://wiki.multimedia.cx/index.php?title=H.264 来源: https://stackoverflow.com/questions/6858991/in-h264-nal-units-means-frame

Hardware accelerated FFmpeg on android?

亡梦爱人 提交于 2019-11-30 08:45:10
I compiled an older version of FFmpeg for Android (if I recall correctly it was 0.6.X). FFmpeg decodes a video frame, scales it, then I'm using OpenGL to draw it on the screen. As far as I can tell, the problem is the decoding and scaling---they're not hardware accelerated. My question is: Is the latest version of FFmpeg hardware accelerated for ARM (Android) processors? Am I going about this the wrong way? i.e., is there a better way of doing this? Where "this" is playing a h264 HD video as a video live wallpaper---the framerate needs to be high, so hardware acceleration is desirable whenever

Hardware accelerated FFmpeg on android?

廉价感情. 提交于 2019-11-29 12:20:06
问题 I compiled an older version of FFmpeg for Android (if I recall correctly it was 0.6.X). FFmpeg decodes a video frame, scales it, then I'm using OpenGL to draw it on the screen. As far as I can tell, the problem is the decoding and scaling---they're not hardware accelerated. My question is: Is the latest version of FFmpeg hardware accelerated for ARM (Android) processors? Am I going about this the wrong way? i.e., is there a better way of doing this? Where "this" is playing a h264 HD video as

VideoCapture is not working in OpenCV 2.4.2

跟風遠走 提交于 2019-11-28 07:41:04
I recently installed OpenCV 2.4.2 in Ubuntu 12.04. cap = VideoCapture(0) is working. but I can't grab frames from some video source. cap = VideoCapture("input.avi") img = cap.read() gives me a numpy with all zero elements. I have also installed ffmpeg 0.11, Latest snapshot of x264, v4l-0.8.8 (All are latest stable versions) cmake -D WITH_QT=ON -D WITH_FFMPEG=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D BUILD_EXAMPLES=OFF WITH_V4L=ON .. make sudo make install When I do cmake, I get this -- Detected version of GNU GCC: 46 (406) -- Found OpenEXR: /usr/lib/libIlmImf.so -- Looking for linux/videodev.h --

VideoCapture is not working in OpenCV 2.4.2

非 Y 不嫁゛ 提交于 2019-11-27 01:55:47
问题 I recently installed OpenCV 2.4.2 in Ubuntu 12.04. cap = VideoCapture(0) is working. but I can't grab frames from some video source. cap = VideoCapture("input.avi") img = cap.read() gives me a numpy with all zero elements. I have also installed ffmpeg 0.11, Latest snapshot of x264, v4l-0.8.8 (All are latest stable versions) cmake -D WITH_QT=ON -D WITH_FFMPEG=ON -D WITH_OPENGL=ON -D WITH_TBB=ON -D BUILD_EXAMPLES=OFF WITH_V4L=ON .. make sudo make install When I do cmake, I get this -- Detected