Questions tagged [video-encoding]

This tag should be used for questions related with programmatically handling of video encoding in any format. For questions related to trimming and modifying videos use [video-editing], and [video-processing] for questions related to processing videos with filtering video frames.

Video encoding (and video compression) reduces redundancy in video data with algorithms and codecs. Most of the techniques are to combine spatial image compression and temporal motion compensation.

See also:

Read more:

950 questions
14
votes
4 answers

python image frames to video

I am writing a python/django application and it needs to do image manipulation and then combine the images into a video (each image is a frame). Image manipulation is easy. I'm using PIL, but for the convert to video part, I'm stuck. I've found…
lovefaithswing
  • 1,510
  • 1
  • 21
  • 37
14
votes
1 answer

OpenCV encoding to H264

I want to encode images to H264 video in OpenCV. As part of my software for image tracking, I'm using VideoWriter in OpenCV 3.4 (64-bit) with Visual Studio 2017 C++. I use ffmpeg for manual encoding, and as it comes with OpenCV I assume this is the…
Yost777
  • 597
  • 1
  • 6
  • 19
14
votes
2 answers

FFmpeg: how to produce MP4 CENC (Common Encryption) videos

What is the correct syntax to do CENC encryption with ffmpeg? The ffmpeg 3.0 release notes include "Common Encryption (CENC) MP4 encoding and decoding support", and the files libavformat/movenccenc.h and libavformat/movenccenc.c seem to include…
Roland Le Franc
  • 326
  • 1
  • 3
  • 14
14
votes
2 answers

How to use Android MediaCodec encode Camera data(YUV420sp)

Thank you for your focus! I want to use Android MediaCodec APIs to encode the video frame which aquired from Camera, unfortunately, I have not success to do that! I still not familiar with the MediaCodec API。 The follow is my codes,I need your help…
Read Mark
  • 683
  • 3
  • 11
  • 19
14
votes
1 answer

Superimposing two videos onto a static image?

I have two videos that I'd like to combine into a single video, in which both videos would sit on top of a static background image. (Think something like this.) My requirements are that the software I use is free, that it runs on OSX, and that I…
Archagon
  • 2,470
  • 2
  • 25
  • 38
13
votes
4 answers

ffmpeg::avcodec_encode_video setting PTS h264

I'm trying to encode video as H264 using libavcodec ffmpeg::avcodec_encode_video(codec,output,size,avframe); returns an error that I don't have the avframe->pts value set correctly. I have tried setting it to 0,1, AV_NOPTS_VALUE and 90khz *…
Martin Beckett
  • 94,801
  • 28
  • 188
  • 263
13
votes
1 answer

How to use FFmpeg Colorspace Options

I'm trying to understand the difference between Colorspace FFmpeg arguments: Normal option, -colorspace bt709 Number, -colorspace 1 Codec Params -x264-params "colorspace=bt709" Filter -vf "colorspace=bt709" The Colorspace categories…
Matt McManis
  • 4,475
  • 5
  • 38
  • 93
13
votes
5 answers

ffmpeg not finding vcodec libx264

I've installed the latest ffmpeg but it seems unable to locate the video codecs. Do I need to completeley remove ffmpeg and re run the ./configure differently in order for ffmpeg to find the video codecs? Here's my current configuration: FFmpeg…
Ofeargall
  • 5,340
  • 5
  • 28
  • 33
12
votes
4 answers

H.264 (or similar) encoder in C#?

Does anyone know of an open source H.264 encoder in C# (or any other managed language)? I might be able to make do with a python implementation as well. The libraries that I’ve found (e.g. x264) are written in pretty low level c (procedural with…
sharoz
  • 6,157
  • 7
  • 31
  • 57
12
votes
3 answers

fast encoding video codec?

can anybody compare popular video codecs by encoding speed? I understand that usually better compression requires more processing time, but it's also possible that some codecs still provide comparably good compression with fast encoding. any…
Andriy Tylychko
  • 15,967
  • 6
  • 64
  • 112
12
votes
1 answer

Android MediaCodec encoder - weird results for Samsung device

Edit: Seems the issue is this device needs not multiple of 16 dimensions...but multiple of 32. Thing is, I still have no idea how to determine what quantifies as a problematic device. This does appear to use qcom (which I've seen to be problematic…
12
votes
2 answers

Libav (ffmpeg) copying decoded video timestamps to encoder

I am writing an application that decodes a single video stream from an input file (any codec, any container), does a bunch of image processing, and encodes the results to an output file (single video stream, Quicktime RLE, MOV). I am using ffmpeg's…
Jason C
  • 38,729
  • 14
  • 126
  • 182
12
votes
1 answer

ffmpeg conversion command to output to h.264 for iPad

I'm looking for a good (general) conversion command that will convert any input file to h.264 sized for the iPad. Currently I have this command that works, that was adapted from robert.swain With presets: $ ffmpeg -i INPUT -acodec aac -ab 160000 -s…
janet-PCF
  • 189
  • 1
  • 2
  • 5
12
votes
3 answers

How to add audio to video file on iphone SDK

I have a video file and an audio file. Is it possible to merge it to one video with with sound file. I think AVMutableComposition should help me, but I still dont understand how. any advices?
Steve
  • 970
  • 3
  • 8
  • 19
12
votes
1 answer

What is VBV (Video Buffering Verifier) in H.264?

I can't understand what is a VBV (Video Buffering Verifier) and what relations it have with a maxrate. When I use this command: ffmpeg -i input.mp4 -crf 21 -maxrate 750k -bufsize 750k -codec:v:0 libx264 -s 640x360 -r 30 output.mp4 output.mp4 video…
Oleksandr
  • 3,574
  • 8
  • 41
  • 78
1 2
3
63 64