h.264

How to encode video with transparent background

无人久伴 提交于 2019-12-05 18:46:48
I am encoding a video using cocoa for OSX (with AVAssetWriter) in h264. This is the configuration: // Configure video writer AVAssetWriter *m_videoWriter = [[AVAssetWriter alloc] initWithURL:[NSURL fileURLWithPath:@(outputFile)] fileType:AVFileTypeMPEG4 error:NULL]; // configure video input NSDictionary *videoSettings = @{ AVVideoCodecKey : AVVideoCodecH264, AVVideoWidthKey : @(m_width), AVVideoHeightKey : @(m_height) }; AVAssetWriterInput* m_writerInput = [[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeVideo outputSettings:videoSettings]; // Add video input into video writer [m

Convert H.264 Annex B to MPEG-TS

ⅰ亾dé卋堺 提交于 2019-12-05 17:50:37
SO... I have RAW H.264 video data captured via RTSP in a local file and I am attempting to playback the video in a Java FX application. In order to do this, I need to use Http Live Streaming. I have successfully prototyped a Java FX architecture that can play a video via HLS with a local server using a local folder containing a .m3u8 (HLS index) file and collection of .ts (MPEG-TS) files. The last piece for me is to replace the .ts files with .264 / .h264 files and in the local server, perform the conversion / wrapping of the H.264 Annex B data into MPEG-TS. I am having trouble figuring out

How to encode Video from Web-Camera into H.264 in C#? [closed]

别说谁变了你拦得住时间么 提交于 2019-12-05 14:25:26
How do you encode video from Webcam into H.264 in C#? What do I need MSDN if there is any help on this. Open Source Libs/wrappers for encoding/decoding. Tutorials and blog articles on How to do it. Some examples of of how to encode into 3GP or FLV or something else with low file size would be more than appreciated. You will need to look into DirectShow SDK. Encoding into H.264 is directly not possible, however there are commercial activex controls that can help you. But you need to understand few things, DirectShow is audio/video processing framework, and you can use graph edit tool to put

Why did H.264, MPEG-4 HE AAC stop working on iphoneXS/Max?

吃可爱长大的小学妹 提交于 2019-12-05 10:33:55
Issue regarding NEW hardware I have been investigating like crazy, and haven't found any hints to why my H.264 encoded videos have stopped working on these new devices. Context: Direct from the ios device, the original is sent to s3, aws elastic transcoder then encodes the original into a more compressed H.264 preset. As of yesterday, a coworker was reporting all videos being "black", now since deliveries on these devices are being fulfilled, i've gotten confirmation. Cannot reproduce this issue on simulator. The encoded videos that are not playing, i've listed the exif data below. Is there is

Why does AVSampleBufferDisplayLayer fail with Operation Interrupted (-11847)?

旧街凉风 提交于 2019-12-05 10:25:42
I'm using an AVSampleBufferDisplayLayer to decode and display H.264 video streamed from a server. When my app goes into the background and then returns to the foreground, the decoding process gets screwed up and the AVSampleBufferDisplayLayer fails. The error I'm seeing is: H.264 decoding layer has failed: Error Domain=AVFoundationErrorDomain Code=-11847 "Operation Interrupted" UserInfo=0x17426c500 {NSUnderlyingError=0x17805fe90 "The operation couldn’t be completed. (OSStatus error -12084.)", NSLocalizedRecoverySuggestion=Stop other operations and try again., NSLocalizedDescription=Operation

Android Widevine HLS/DRM support

拟墨画扇 提交于 2019-12-05 10:24:16
It will be soon 2 years since Google acquires the Widevine company that provides the DRM support for protecting e.g. the HLS H.264/AAC streams. According to the http://www.widevine.com/ not only Android, but also iPhone/iPad and game consoles like Wii or PS3 ares supported. Does anybody experience with the Android Widevine DRM? Regards, STeN you must be certified by google to work with the Widevine APIs. the certification is called CWIP and requires paying a substantial sum and going through a course. 来源: https://stackoverflow.com/questions/10350245/android-widevine-hls-drm-support

Best way to implement HTML5 video

十年热恋 提交于 2019-12-05 09:45:33
I understand that HTML5 video is way more complicated than its proponents would like us to believe. Safari uses the proprietary H.264 codec, whereas Firefox, Chrome and Opera all support the open-source Theora. Internet Explorer doesn't support either, so needs a fallback, such as .mov or Flash. I found a superb guide somewhere that put together a step-by-step guide for HTML5 on all these browsers, but I can't find it anywhere. Very annoying :( What's the best way to implement HTML5 video so that all these browsers are covered? (Unfortunately, Flash is not an option.) Edit: Ok, from what I've

Windows: How to build X264.lib instead of .dll

帅比萌擦擦* 提交于 2019-12-05 08:31:40
问题 I downloaded the X264 source and installed mingw. Step 1: Executed this in the MINGW bash: ./configure --disable-cli --enable-shared --enable-win32thread - -extra-ldflags=-Wl,--output-def=libx264.def and then 'make' Step 2: Renamed the libx264-142.dll to libx264.dll and Opened up VS2012 Command Prompt and executed this: LIB /DEF:libx264.def which gave me libx264.lib and object libx264.exp Step 3: Included the lib file in a VS2012 project which uses the X264 API. Problem: When I start the

Time stamp and composition time offset

青春壹個敷衍的年華 提交于 2019-12-05 06:41:32
问题 Does H.264 buffer contains Time stamp and decoding time stamp information. when we get the H.264 nalu data does that contain timing information in it? 回答1: If you mean raw H.264 NAL units than no they don't contain timing information if mean something like PTS/DTS. Timestamps are on higher level in containers like MKV/MP4/TS. The only time related information in H.264 specs afaik are num_units_in_tick/time_scale in VUI that can be used to finding FPS in case of constant frame rate (fixed

Decode h264 rtsp with ffmpeg and separated AVCodecContext

Deadly 提交于 2019-12-05 06:08:53
I need some help with decodein rtsp stream of video. I get it from AXIS IP-camera. I use ffmpeg library for it. It is neccessary to create AVCodecContext separately, not from AVFormatContext->streams[...]->codec; So i create AVCodec, AVCOdecContext and try to init them. AVCodec *codec=avcodec_find_decoder(codec_id); if(!codec) { qDebug()<<"FFMPEG failed to create codec"<<codec_id; return false; //--> } AVCodecContext *context=avcodec_alloc_context3(codec); if(!context) { qDebug()<<"FFMPEG failed to allocate codec context"; return false; //--> } avcodec_open2(context, codec, NULL); Then in main