Questions tagged [codec]

Codec is an implementation of compression and decompression of digital data streams and signals in different scales. Digital data like audio, video and electronic documents are been compressed and decompressed using codecs.

A codec can consist of two components: an encoder and a decoder. The encoder performs the compression (encoding) function and the decoder performs the decompression (decoding) function. Some codecs include both of these components and some codecs only include one of them.

There is mainly two kind of data compression technique.

  1. Lossless
  2. Lossy

Lossless Data Compression
Lossless data compression allows the exact original data to be reconstructed from the compressed data.

Lossy Data Compression
Lossy compression is a data encoding method that compresses data by discarding (losing) some of it. The procedure aims to minimize the amount of data that need to be held, handled.

List of Different Codecs
Wikipedia Codec List According to Catagory

FAQs
FAQ about Codecs by Microsoft
Codec Guide FAQ

Other Useful Links
Microsoft codec programming guide
ffmpeg codec programming
Codecguide

1497 questions
14
votes
5 answers

HTML5 video codec support

What codecs will be supported with the HTML5 video tag? Will it vary by browser, or is there a spec of specific codec that will be supported?
John Egbert
  • 5,496
  • 8
  • 32
  • 44
14
votes
1 answer

Lossless ffmpeg conversion/encoding

I'm looking for the best in quality when converting videos. I only want to use lossless audio and video encoders and a good container. How do I enable lossless x264 vcodec for ffmpeg? I currently use ffmpeg -i "inputvideo" -s 1280x720 -ar 48000…
Marc Brown
  • 601
  • 2
  • 11
  • 26
14
votes
1 answer

Java: Guide to write a custom video codec

I have quite a weird question, but here it is: Is it possible, and are there any guides for writing a custom video codec in C++ or Java? Here's the weird part: I don't need to dive into those tons of info about audio and motion picture I don't…
Tony Bogdanov
  • 7,436
  • 10
  • 49
  • 80
13
votes
1 answer

How to play raw NAL units in Android MediaCodec

I initially tried How to play raw NAL units in Andoid exoplayer? but I noticed I'm gonna have to do things in low level. I've found this simple MediaCodec example. As you can see, it's a thread that plays a file on a surface passed to it. Notice…
PPP
  • 1,279
  • 1
  • 28
  • 71
13
votes
2 answers

Display Emoji in Python's console

I wonder if it's possible to print Emojis in a Python 3 console on Windows. Actually, to avoid the following error: codec can't encode character '\U0001f44d' in position 10: character maps to I've used: import emoji as…
dark.vador
  • 619
  • 1
  • 6
  • 25
13
votes
3 answers

Planar YUV420 data layout

In my project I use OpenH264 codec, which is said to output data in the YUV 4:2:0 planar format. After decoding I get one array with width * height * 1.5 elements, which, when displaying, looks like this…
y434y
  • 633
  • 1
  • 8
  • 27
13
votes
2 answers

OpenCV VideoWriter will not open

I'm having trouble instantiating and opening an OpenCV VideoWriter for recording video on a Raspberry Pi (Raspbian Weezy). My project is written in C++, but I've written a minimal Python program that demonstrates the…
ChrisC
  • 2,461
  • 1
  • 16
  • 25
13
votes
2 answers

Issue encoding and decoding an audio recording to G711 ( PCMU - uLaw) format

There isn't too much info about apply this codec when we need to streaming audio. Without apply the codec, my code work like a charm establishing a communication between 2 devices but I need encode/decode in that format because I will need streaming…
Juan Pedro Martinez
  • 1,924
  • 1
  • 15
  • 24
13
votes
2 answers

What codec it is

I have a compressed file its size is 728 and somehow I know this is an audio file and it lasts 1040 ms The compressed file structure is straight forward: It is formed with 14 bytes blocks, each block starts with 0x0C: 0c xx xx xx xx xx xx xx xx xx…
Steven Du
  • 1,681
  • 19
  • 35
13
votes
4 answers

Get supported Codec for Android device

Is there a way to ask an Android device what audio and video Codecs it supports for encoding? I found devices that do not support some of the codecs listed as mandatory in http://developer.android.com/guide/appendix/media-formats.html and there seem…
Marcus Wolschon
  • 2,550
  • 2
  • 22
  • 28
12
votes
3 answers

Check the bandwidth rate in Android

We have an option to check the network connection types in Android (whether it is 3G, edge or gprs). I need to check the the bandwidth rate. I need to initiate a call. For that I need to check the bandwidth rate. Above a particular bandwidth only I…
jennifer
  • 8,133
  • 22
  • 69
  • 96
12
votes
1 answer

How to output x265 compressed video with cv2.VideoWriter

I'm doing some rendering on a 45-min 1.2GB video 80,0000 frames of size 1344x756 each and the video is in the mp4 format, I'm trying to output a video with x265 compression the problem is when I'm using cv2.VideoWriter the output size for 10 minutes…
user12690225
12
votes
5 answers

Which audio format can be recorded and played back by iPhone and Android?

I am designing an app that can record short audio files on iPhone and Android that can be played back on both platforms, as well as hopefully any other smartphone. Right now I'm using *.caf with the iLBC codec, as I know the iPhone does not encode…
Newy
  • 38,977
  • 9
  • 43
  • 59
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

Is there a way to optimize silence periods in Opus better than DTX does?

I'm doing a little bit of research about the DTX option in Opus: Discontinuous Transmission (DTX) reduces the bitrate during silence or background noise. When DTX is enabled, only one frame is encoded every 400 milliseconds. I wonder if…
prgDevelop
  • 1,557
  • 2
  • 15
  • 26