h.264

Data corruption when reading realtime H.264 output from AVAssetWriter

大兔子大兔子 提交于 2019-11-29 20:02:09
I'm using some tricks to try to read the raw output of an AVAssetWriter while it is being written to disk. When I reassemble the individual files by concatenating them, the resulting file is the same exact number of bytes as the AVAssetWriter's output file. However, the reassembled file will not play in QuickTime or be parsed by FFmpeg because there is data corruption. A few bytes here and there have been changed, rendering the resulting file unusable. I assume this is occurring on the EOF boundary of each read, but it isn't consistent corruption. I plan to eventually use code similar to this

FFMpeg Android Stagefright SIGSEGV error (h264 decode)

只谈情不闲聊 提交于 2019-11-29 19:57:25
问题 I need to decode h264 file to YUV on Android 2.3+. As I understand I need to communicate with Stagefright, as it`s the only way now, after closing access with OpenMAX IL implementations. I have used FFmpeg 0.10 (and tried 0.9/0.9.1..) for this issue, compiled it with NDK7 (and also tried NDK6b with the same result): ffmpeg version 0.10 Copyright (c) 2000-2012 the FFmpeg developers built on Jan 28 2012 14:42:37 with gcc 4.4.3 configuration: --target-os=linux --cross-prefix=arm-linux

iPhone “cannot play” .mp4 H.264 video file

隐身守侯 提交于 2019-11-29 18:03:41
问题 I'm trying to setup a simply mobile page for a client with a link to an .mp4 video file. Lke so: <a href="My_Video_File.mp4" target="_blank">Watch MP4 Video</a> And then I've obviously got my video file sourced properly and the .mp4 has the following characteristics: Dimension: 480 * 272 Codecs: AAC, H.264, MPEG-4 SDSM, MPEG-4 ODSM Channel Count: 2 Total Bitrate: 991 Size: 11.4MB But, the problem is when I click on the link iPhone says "Movie cannot be played." and doesn't tell me why. Any

MediaCodec crash on high quality stream

允我心安 提交于 2019-11-29 12:56:45
I am decoding a h264 video stream with the following code (original guide) : public void configure(Surface surface, int width, int height, ByteBuffer csd0) { String VIDEO_FORMAT = "video/avc"; if (mConfigured) { throw new IllegalStateException("Decoder is already configured"); } MediaFormat format = MediaFormat.createVideoFormat(VIDEO_FORMAT, width, height); // little tricky here, csd-0 is required in order to configure the codec properly // it is basically the first sample from encoder with flag: BUFFER_FLAG_CODEC_CONFIG format.setByteBuffer("csd-0", csd0); try { mCodec = MediaCodec

Error code -8969, -12909 while decoding h264 in iOS 8 with video tool box

爷,独闯天下 提交于 2019-11-29 07:19:46
问题 I have the h264 stream inAnnex B format and follow this link here to implements h264 decoding with iOS8 videoToolBox. I check the OSStatus in every step. use CMVideoFormatDescriptionCreateFromH264ParameterSets with the SPS and PPS data to create a CMFormatDescription.(status == noErr) create a VTDecompressionSession using VTDecompressionSessionCreate. (status == noErr) capture the NALUnit payload into a CMBlockBuffer making sure to replace the start code with a byte length code. (status ==

Using jcodec SequenceEncoder

时光总嘲笑我的痴心妄想 提交于 2019-11-29 03:33:36
问题 I need to create video from images, I have seen jcodec and I think it is what I need: http://jcodec.org/ How do I add jcodec to my project? I have seen there is a version for android. Correct me if I am wrong, but I added jcodec-0.1.5.jar to my project under the libs folder. Then added SequenceEncoder.java and BitmapUtil.java from jcodec-android-0.1.7.zip to my package but when I add: public void encodeImage(Bitmap bi) throws IOException { encodeNativeFrame(BitmapUtil.fromBitmap(bi)); } It

How to fragment H264 Packets in RTP compliant with RFC3984

橙三吉。 提交于 2019-11-29 02:52:28
问题 I have the FFMPEG streaming baseline h264 video, which I have to encapsulate in RTP and send to SIP phones for their decoding. I am using Linphone with the h264 plugin for Windows and Mirial for the decoding progress. However, sometimes I get a huge frame size (3Kb ~ 9Kb) from the FFMPEG, which obviously doesn't fit in the MTU. If I send these frames "as is" and trusting IP fragmentation feature, some phones are able to play it well enough, but others choke and can't decode the stream. I

Xuggler encoding and muxing

邮差的信 提交于 2019-11-29 02:49:57
问题 I'm trying to use Xuggler (which I believe uses ffmpeg under the hood) to do the following: Accept a raw MPJPEG video bitstream (from a small TTL serial camera) and encode/transcode it to h.264; and Accept a raw audio bitsream (from a microphone) and encode it to AAC; then Mux the two (audio and video) bitsreams together into a MPEG-TS container I've watched/read some of their excellent tutorials, and so far here's what I've got: // I'll worry about implementing this functionality later, but

H.264 file size for 1 hr of HD video [closed]

柔情痞子 提交于 2019-11-29 01:42:32
I'm looking for an order of magnitude estimate for expected on-disk file size for 1 hour of H.264 encoded HD video transcoded from HDV (HD on a MiniDV tape). I want to archive approximately 100 hours of such content and want to figure out whether I'm looking at a big hard drive, a multi-drive unit like a Drobo, or an enterprise-level storage system. Edit To clarify from several good comments, I am developing the software that will use this archived video and will also manage the transcoding from HDV to compressed format (using QuickTime on OS X). This question is for gathering hardware

AVAssetWriterInput H.264 Passthrough to QuickTime (.mov) - Passing in SPS/PPS to create avcC atom?

旧时模样 提交于 2019-11-29 01:16:11
问题 I have a stream of H.264/AVC NALs consisting of types 1 (P frame), 5 (I frame), 7 (SPS), and 8 (PPS). I want to write them into an .mov file without re-encoding. I'm attempting to use AVAssetWriter to do this. The documentation for AVAssetWriterInput states: Passing nil for outputSettings instructs the input to pass through appended samples, doing no processing before they are written to the output file. This is useful if, for example, you are appending buffers that are already in a desirable