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
31
votes
5 answers

Encoding H.264 from camera with Android MediaCodec

I'm trying to get this to work on Android 4.1 (using an upgraded Asus Transformer tablet). Thanks to Alex's response to my previous question, I already was able to write some raw H.264 data to a file, but this file is only playable with ffplay -f…
gleerman
  • 1,793
  • 4
  • 24
  • 38
26
votes
2 answers

ffmpeg command for faster encoding at a decent bitrate with smaller file size

I'm currently using an implementation of ffmpeg on my android app. I'm allowing users to take short videos within my app and then when they upload them to the server, I'm crunching them down with ffmpeg to decrease file size so they're not passing…
Blair Holmes
  • 1,521
  • 2
  • 22
  • 35
26
votes
2 answers

Is there a downside to putting the MOOV atom at the beginning of an MP4 file?

I see tons of questions about relocating the moov atom from the end of a MP4 video container to the beginning, to make the video "web optimized" or easier to stream. It seems like most tools require an explicit option to do this when first encoding…
Coderer
  • 25,844
  • 28
  • 99
  • 154
23
votes
2 answers

Android MediaCodec Encode and Decode In Asynchronous Mode

I am trying to decode a video from a file and encode it into a different format with MediaCodec in the new Asynchronous Mode supported in API Level 21 and up (Android OS 5.0 Lollipop). There are many examples for doing this in Synchronous Mode on…
22
votes
1 answer

Image sequence to video quality

I have been experimenting with creating a video from a sequence of images. When I use the suggested ffmpeg method: ffmpeg -f image2 -i image%d.jpg video.mpg The video is not really as good as I hoped it would be :/ For example with VDUB, If I…
brux
  • 3,197
  • 10
  • 44
  • 78
22
votes
9 answers

Using FFMPEG to reliably convert videos to mp4 for iphone/ipod and flash players

I need to convert videos for use in both a flash player and the iphone/ipod touch. I'm using the following batch script with ffmpeg: @echo off ffmpeg.exe -i %1 -s qvga -acodec libfaac -ar 22050 -ab 128k -vcodec libx264 -threads 0 -f ipod %2 This…
Jake Stevenson
  • 3,009
  • 6
  • 35
  • 40
21
votes
1 answer

What is PTS in reference to video encoding?

Could someone briefly explain what the acronym PTS means in reference to video encoding?
jtrim
  • 3,465
  • 4
  • 31
  • 44
19
votes
5 answers

Combining two video from ffmpeg

I want to combine two mp4 videos to form a single mp4 video using ffmpeg. what i tried so far is ffmpeg -i input1.mp4 -i input2.mp4 output.mp4 But, every time i get the video with video codec of first input and not the other. How can i combine…
Astha
  • 1,728
  • 5
  • 17
  • 36
19
votes
3 answers

How to encode images into a video file in Java through programming?

I am trying to encode some images of same resolution into a video file using, For that I have tried: jCodec jcodec..example description But it is very time consuming and not a proper tool to encode large number of images and it creates a quick time…
user3751794
18
votes
1 answer

streaming video FROM an iPhone

I can get individual frames from the iPhone's cameras just fine. what I need is a way to package them up with sound for streaming to the server. Sending the files once I have them isn't much of an issue. Its the generation of the files for streaming…
iHorse
  • 595
  • 3
  • 9
  • 12
18
votes
2 answers

How to convert RGB from YUV420p for ffmpeg encoder?

I want to make .avi video file from bitmap images by using c++ code. I wrote the following code: //Get RGB array data from bmp file uint8_t* rgb24Data = new uint8_t[3*imgWidth*imgHeight]; hBitmap = (HBITMAP) LoadImage( NULL, _T("myfile.bmp"),…
TTGroup
  • 3,575
  • 10
  • 47
  • 79
17
votes
1 answer

Trying to use openH264 as an alternative to libX264 in FFMPEG C project

I have an application that transcodes a video frame by frame using FFMPEG and x264 encoder. I am looking to release this application but the licensing of x264 made me switch to using openh264 instead. I managed to compile everything smoothly…
tishu
  • 998
  • 15
  • 29
16
votes
3 answers

How to convert bitmaps to video?

My application creates images from fractals and I love the feeling of 'flying' around a fractal. I once saved about 2000 bitmaps to file and created an AVI from it using Premiere. That experience is rather frustrating though I succeeded in creating…
Arnold
  • 4,578
  • 6
  • 52
  • 91
16
votes
4 answers

Video bitrate and file size calculation

Folks, I am trying to understand the relationship between video bitrate, image size, codec, and the file size. For example, if I have a movie that has an image of 1920*1080 pixels, the bitrate is 24 MBPS, the length is 2 hours and the codec used is…
Peter
  • 11,260
  • 14
  • 78
  • 155
16
votes
1 answer

What does "copy" do in a ffmpeg command line?

I know that it copies something but other than that what does it do (to what extend it affects the output file)? Is it a switch or option? Why does it not have a hyphen before the word itself? I see from other questions that it can copy streams…
ccsalison
  • 331
  • 1
  • 2
  • 10
1
2
3
63 64