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
112
votes
2 answers

Problem setting video frame rate using AVAssetWriter/AVAssetReader

Situation: I am trying to export video with some parameters like video bit rate, audio bit rate, frame rate, changing video resolution, etc. Note that I am letting the user set the video frame rate in fractions; like user can set the video frame…
Sunil Chauhan
  • 2,074
  • 1
  • 15
  • 33
105
votes
5 answers

Rotate mp4 videos without re-encoding

I'm looking for a way to rotate videos shot with my Nexus 4 on my Debian Wheezy sytem. The videos are shot in portrait mode and I would like to rotate them to landscape mode. Preferably the rotation is command-line driven. I have found several…
stedes
  • 1,481
  • 3
  • 13
  • 17
103
votes
4 answers

Using ffmpeg to encode a high quality video

I have a set of video frames saved as images in a directory, and I'm trying to encode these to a good quality video, however every setting and every format I try produces very noticeable artifacts. The basic command is this: ffmpeg -r 25 -i %4d.png…
CakeMaster
  • 1,807
  • 4
  • 16
  • 16
70
votes
2 answers

What is the difference between H.264 video and MPEG-4 video?

Are these both the same? Is H.264 codec of MPEG-4? What if I need to convert flv to high definition H.264 video format? I want make online tv streaming and want to use PHP or Python.
Ravi Sharma
  • 1,162
  • 3
  • 11
  • 20
67
votes
1 answer

Encoder crash on Adreno GPU while encoding from Surface

I've been struggling with this issue for more than a week, and most likely it is a bug in the Qualcomm GPU/hardware video encoder. Since we are pressed to release the application, and their developer forums did not provide any feedback, I am posting…
user1592546
  • 1,480
  • 1
  • 14
  • 30
65
votes
4 answers

How to generate video file from QImage sequence using QMediaRecorder in Qt5 C++

Basically what I want is to encode a video using QMediaRecorder by supplying as a source a sequence of QImages that I generate in custom code at run-time. So far I have found no easy way to do this, and everything points at the solution where I have…
Mr. Developerdude
  • 9,118
  • 10
  • 57
  • 95
59
votes
2 answers

FFmpeg output file format with no extension

I'm developing a system which needs to store videos in the form: /path/to/video/ So I do not have an output extension. I'm using ffmpeg to convert those videos, but it seems that it uses output file extension to determine the…
Simone Margaritelli
  • 4,584
  • 10
  • 45
  • 70
41
votes
4 answers

Choosing a video codec for screen recording

I'm doing a series of tutorials by recording the screen and my voice. Just as PNG works best for screenshots, while JPEG is better suited for photographs (although lossy), which video encoding & container formats are better for screen…
Dheeraj Vepakomma
  • 26,870
  • 17
  • 81
  • 104
40
votes
2 answers

Extracting frames from MP4/FLV?

I know it's possible with FFMPEG, but what to do if I have a partial file (like without the beginning and the end). Is is possible to extract some frames from it?
blez
  • 4,939
  • 5
  • 50
  • 82
40
votes
4 answers

Is there a way to use ffmpeg to determine the encoding of a file before transcoding?

I am planning to use ffmpeg to ensure all video files uploaded to my website are encoded as mp4 h264. Rather than automatically processing every file I would like to minimise the processing overhead by only processing those files that are not…
Bill Noble
  • 463
  • 1
  • 5
  • 5
40
votes
4 answers

Encode a series of Images into a Video

How can I create a video file from a series of images/photos on Android? Can this be done with the current SDK? or do I need a codec library?
Rad The Mad
  • 640
  • 3
  • 9
  • 17
38
votes
5 answers

Suggested Compression Ratio with H.264?

Note bene: I realize this is an immensely complicated question with about a million levels of nuance that I'm trying to reduce to a single number... I'm about to undertake a large video encoding project using H.264 encoding. We are trying to create…
Nuby
  • 2,378
  • 2
  • 21
  • 26
38
votes
4 answers

How to encode Bitmaps into a video using MediaCodec?

I would like to encode a set of Bitmaps that I have into an h264. Is this possible via MediaEncoder? I have written some code in order to do it, but the output cannot be played in any media player I have tried. Here's some of the code that I…
BVB
  • 5,380
  • 8
  • 41
  • 62
38
votes
4 answers

How to disable subtitles decoding in ffmpeg

I'm trying to convert some video file containing video, audio and subtitles streams into another format using FFMpeg. However, ffmpeg complains about the subtitles format - it cannot decode the stream. Since I don't need this subtitles stream, I'd…
v_2e
  • 2,603
  • 2
  • 22
  • 29
33
votes
9 answers

How to detect if a video file was recorded in portrait orientation, or landscape in iOS

I am using AlAssetsGroup enumerateAssetsAtIndexes to list the assets in the Photos (Camera) app. For a given video asset I want to determine whether it was shot in portrait or landscape mode. In the following code, asset is an AlAsset and I have…
George C.
  • 681
  • 1
  • 6
  • 11
1
2 3
63 64