h.264

Use FFMPEG on Android [closed]

不想你离开。 提交于 2019-11-26 07:45:10
问题 Does somebody know how to use FFMPEG on Android to convert YUV420 frame to H.264? I have ported FFMPEG work on Android with NDK, I just don\'t know how to use it. A source code is appreciated. 回答1: You have two options: use ffmpeg api - google ffmpeg sample code. this requires good understanding of the api and which is very comprehnsive. compile ffmpeg.c and invoke its main() via jni. This requires that you understand the command line parameters. It is rather cumbersome but works. You need to

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

MediaCodec and Camera: colorspaces don't match

雨燕双飞 提交于 2019-11-26 03:51:29
问题 I have been trying to get H264 encoding to work with input captured by the camera on an Android tablet using the new low-level MediaCodec. I have gone through some difficulties with this, since the MediaCodecAPI is poorly documented, but I\'ve gotten something to work at last. I\'m setting up the camera as follows: Camera.Parameters parameters = mCamera.getParameters(); parameters.setPreviewFormat(ImageFormat.YV12); // <1> parameters.setPreviewFpsRange(4000,60000); parameters.setPreviewSize

FFMPEG (libx264) “height not divisible by 2”

早过忘川 提交于 2019-11-26 03:47:30
问题 I am trying to encode a .mp4 video from a set of frames using FFMPEG using the libx264 codec. This is the command I am running: /usr/local/bin/ffmpeg -r 24 -i frame_%05d.jpg -vcodec libx264 -y -an video.mp4 I sometimes get the following error: [libx264 @ 0xa3b85a0] height not divisible by 2 (520x369) After searching around a bit it seems that the issue has something to do with the scaling algorithm and can be fixed by adding a -vf argument. However, in my case I don\'t want to do any scaling.

How to use VideoToolbox to decompress H.264 video stream

倾然丶 夕夏残阳落幕 提交于 2019-11-26 03:23:19
问题 I had a lot of trouble figuring out how to use Apple\'s Hardware accelerated video framework to decompress an H.264 video stream. After a few weeks I figured it out and wanted to share an extensive example since I couldn\'t find one. My goal is to give a thorough, instructive example of Video Toolbox introduced in WWDC \'14 session 513. My code will not compile or run since it needs to be integrated with an elementary H.264 stream (like a video read from a file or streamed from online etc)

Possible Locations for Sequence/Picture Parameter Set(s) for H.264 Stream

只愿长相守 提交于 2019-11-25 22:59:11
问题 I\'m working on a H.264 Decoder and I\'m wondering where to find the SPS and PPS. My reference literature tells me that those are NAL Units encoded in the H.264-Stream, but when I look into an example-MP4-File with IsoViewer, it says that the SPS and PPS are in the avcC Box. How exactly does this work? How does it look for .mkv files or other H.264 containers? Thanks in advance! 回答1: First off, it's important to understand that there is no single standard H.264 elementary bitstream format.

How to concatenate two MP4 files using FFmpeg?

…衆ロ難τιáo~ 提交于 2019-11-25 22:41:33
问题 I\'m trying to concatenate two mp4 files using ffmpeg. I need this to be an automatic process hence why I chose ffmpeg. I\'m converting the two files into .ts files and then concatenating them and then trying to encode that concated .ts file. The files are h264 and aac encoded and I\'m hoping to keep the quality the same or as close to original as possible. ffmpeg -i part1.mp4 -vcodec copy -vbsf h264_mp4toannexb -acodec copy part1.ts ffmpeg -i part2.mp4 -vcodec copy -vbsf h264_mp4toannexb

How to use VideoToolbox to decompress H.264 video stream

陌路散爱 提交于 2019-11-25 20:16:04
I had a lot of trouble figuring out how to use Apple's Hardware accelerated video framework to decompress an H.264 video stream. After a few weeks I figured it out and wanted to share an extensive example since I couldn't find one. My goal is to give a thorough, instructive example of Video Toolbox introduced in WWDC '14 session 513 . My code will not compile or run since it needs to be integrated with an elementary H.264 stream (like a video read from a file or streamed from online etc) and needs to be tweaked depending on the specific case. I should mention that I have very little experience