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
5
votes
1 answer

libx264 encode error Input picture width (40) is greater than stride (0)

I used libx264 in ffmpeg to encode video, I used the configuration below. enCodecContext->bit_rate = 300000; enCodecContext->width = 80; enCodecContext->height = 60; enCodecContext->time_base = (AVRational) {1, 25}; enCodecContext->gop_size =…
alijandro
  • 11,627
  • 2
  • 58
  • 74
5
votes
0 answers

Are there some HLS & MPEG-DASH transcoder on the fly?

Are there some free transcoders on the fly which can pack video into hls or mpeg-dash on the fly? I don't want to use live streaming but I want to create vod streaming.
5
votes
0 answers

H.264 video streaming with AVFoundation on OS X?

Based on this stack overflow question and Apple's Direct Access to Video Encoding and Decoding, from WWDC 2014, I've made a small Xcode-project that demonstrates how to decode and display a H.264 stream with AVFoundation. The project is available on…
5
votes
3 answers

How to convert uploaded video and get a screenshot from this file?

I'm building a cms and I want users to be able to upload videos but I'm not familiar with video upload & conversion. Is there an example or has anybody coded a solution like this? I heard about ffmpeg but I don't know how to integrate it with…
HasanG
  • 12,734
  • 29
  • 100
  • 154
5
votes
0 answers

Android MediaRecorder: Continuous overwriting

I'm trying to record a 10 second video for surveillance. That is quite straight forward using MediaRecorder in Android. All i have to do is call mediaRecorder.setMaxDuration(10000); However, i want to continuously overwrite the same 10 second…
user604919
5
votes
3 answers

How to encode jpeg images to H264 very fast (transform images to video)

I have 30 JPEG images (.jpg) at a resolution of 480 x 640. Each image takes aboout 20KB (all of them takes about 600KB). I am using FFmpeg command to encode these images into a video in H264 format. I need this to be done very fast - about 1…
Paul
  • 3,812
  • 10
  • 50
  • 73
5
votes
2 answers

Getting Handbrake encoder to work

I am unable to get Handbrake to work for me in C#. It keeps throwing the error "Value cannot be null." . As you can see in the screenshot below, I've tried a couple of things based on what I know. I would appreciate any of your guidance to help me…
Josh
  • 13,530
  • 29
  • 114
  • 159
5
votes
1 answer

ffmpeg creating multiple output videos, splitting on gt(scene,x)

I want to split one video up into multiple parts based on detecting the first frame of each shot, by select scene in ffmpeg. The following entry records the scene frames and creates a photo mosaic out of them. This indicates to me that the select…
spitfire109
  • 9,651
  • 3
  • 20
  • 28
5
votes
1 answer

Why decoding frames from avi container and encode them to h264/mp4 doesn't work?

I started using ffmpeg and I want to convert avi file to mp4/h264 file. I've read many posts including this, but I couldn't find any good example how to save frames to mp4 file. The code below is simplified one that decodes frames from avi file and…
theateist
  • 13,879
  • 17
  • 69
  • 109
4
votes
1 answer

how to specify OUTPUT_FORMAT_MPEG2TS on android device

I am confused why I cannot use OutputFormat.OUTPUT_FORMAT_MPEG2TS as parameter to MediaRecorder.setOutputFormat method call on device with android version 2.3.6 ? In the android source there is this code bit: /** * Defines the output format. These…
Alex
  • 2,837
  • 5
  • 25
  • 27
4
votes
2 answers

How do I set the interlaced flag on an MKV file so that VLC can automatically play it back deinterlaced?

I've got an MKV file whose source is interlaced NTSC MPEG-2 video. I converted it to H.264 MKV with HandBrake, but this process did not set the "interlaced" flag in the MKV file. The content is interlaced—and I do want it to stay interlaced because…
Todd Lehman
  • 2,880
  • 1
  • 26
  • 32
4
votes
1 answer

Media Foundation. Encoding video from bitmaps with custom IMFMediaSource

Can anyone clarify the following questions? A decent source code snippet or example would be wonderful, the only relevant example I've found so far is WavSource in the SDK. How is the raw bitmap data presented to the encoder? Is it (A)RGB 32BPP or…
J Evans
  • 1,090
  • 2
  • 16
  • 36
4
votes
1 answer

Programmatically comparing two MP4 (mpeg-4) videos

I'm working on software that will create MP4 videos using the MLT Framework. I need to create some unit tests for my processes that will compare a pre-testing creating video with the one that is created. I am using Python for the code. I need to…
Mark S.
  • 1,516
  • 1
  • 16
  • 26
4
votes
1 answer

Multi bitrate live HLS with FFmpeg on Windows

I am trying to encode a live stream into Apple HLS for iPhone on windows. I was looking at different options and wowza can do it, but doesn't support CDN distribution of HLS as far as I can see. Plus it costs a lot of money. What I did find was this…
Nioreh
  • 253
  • 3
  • 14
4
votes
3 answers

ffmpeg ignores every framerate option, locking the result to 25 fps

ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers No matter what I do, ffmpeg just ignores everything and encodes it as if it's 25fps. -framerate 60 does nothing -t 60 does nothing -r 60 makes it to interpolate…