codec

Is re-encoding JPEG images an idempotent operation?

瘦欲@ 提交于 2019-12-01 04:49:53
I am aware that JPEG compression is lossy. I have 2 questions: Given an operation T: 1. Take a JPEG-80 image 2. Decode it to a byte buffer 3. Encode given byte buffer as JPEG-80 Is T an idempotent operation in terms of visual quality? Or will the quality of the image keep degrading as I repeat T? Does the same hold true for the JPEG-XR codec? Thank you! Edit : Since there have been conflicting answers, it would be great if you could provide references! It's not guaranteed, but it may happen. Especially if you repeat the encode -> decode -> encode -> decode process enough times, it will

codecs.open(utf-8) fails to read plain ASCII file

喜夏-厌秋 提交于 2019-12-01 03:22:05
问题 I have a plain ASCII file. When I try to open it with codecs.open(..., "utf-8") , I am unable to read single characters. ASCII is a subset of UTF-8, so why can't codecs open such a file in UTF-8 mode? # test.py import codecs f = codecs.open("test.py", "r", "utf-8") # ASCII is supposed to be a subset of UTF-8: # http://www.fileformat.info/info/unicode/utf8.htm assert len(f.read(1)) == 1 # OK f.readline() c = f.read(1) print len(c) print "'%s'" % c assert len(c) == 1 # fails # max% p test.py #

MPEG-4 and alpha transparency - the ongoing saga

痴心易碎 提交于 2019-12-01 03:16:21
问题 I'd like to reach some sort of definitive answer for the following questions: Is alpha transparency supported in MPEG-4-based codecs? Is there any way to be reasonably certain that there is no alpha-channel from the output of ffprobe ? Some links I've found on the subject: https://stackoverflow.com/a/5057631/476716 Also, transparent alpha layers, an optional part of the H.264 specification, are now supported in H.264-based QuickTime movies. http://software.intel.com/en-us/articles/alpha

.NET GDI+ image size - file codec limitations

落爺英雄遲暮 提交于 2019-12-01 01:57:08
问题 Is there a limit on the size of image that can be encoded using the image file codecs available from .NET? I'm trying to encode images > 4GB in size, but it simply does not work (or does not work properly i.e. writes out an unreadable file) with .bmp, .jpg, .png or the .tif encoders. When I lower the image size to < 2GB it does work with the .jpg but not the .bmp, .tif or .png. My next attempt would be to try libtiff because I know tiff files are meant for large images. What is a good file

Retrieving movie codec under iOS?

风格不统一 提交于 2019-11-30 15:35:38
I am trying to find the codec used to compress a movie. I am sure if I need to somehow use CMFormatDescription and get a CMVideoCodecType key. I am stuck as to how to get past the metadata array. Any ideas on how to retrieve the codec? AVURLAsset* movieAsset = [AVURLAsset URLAssetWithURL:sourceMovieURL options:nil]; NSArray *tracks = [movieAsset tracksWithMediaType:AVMediaTypeVideo]; if ([tracks count] != 0) { AVAssetTrack *videoTrack = [tracks objectAtIndex:0]; // // Let's get the movie's meta data // // Find the codec NSArray *metadata = [movieAsset commonMetadata]; } A Swift approach to

What to do with the incompatibilities in HTML 5 audio across browsers?

◇◆丶佛笑我妖孽 提交于 2019-11-30 14:10:47
I need to use HTML 5 audio to play sounds. However, the codec support is very irritating: Firefox: Ogg, Wav Safari: Mp3, Wav Chrome: Ogg, Mp3 Opera: Wav I basically need to encode in Wav and Ogg/Mp3. However, Wav's are terrible in size and that is very crucial point for me. So, I guess I should go for Mp3 + Ogg leaving Opera and IE out? According to: http://my.opera.com/core/blog/2009/12/31/re-introducing-video , Opera 10.5 (still in alpha/beta) supports Vorbis and PCM Wav for audio. I don't believe 10.10 actually supports the audio tag. Safari would support Vorbis (and Theora on the video

Camera2 video recording without preview on Android: mp4 output file not fully playable

回眸只為那壹抹淺笑 提交于 2019-11-30 13:08:52
I am trying to record video from the back camera (the one that faces the face) on my Samsung Galaxy S6 (which supports 1920x1080 at about 30 fps). I do not want to have to use any surface for previewing if I do not have to as this is to just happen in the background. I seem to have it working, but the output files are not playable in a way that actually is correct. On my Windows 10 PC, Windows Media Player will show the first frame and then play the audio, VLC will not show any of the frames. On my phone, the recorded file is playable but not totally. It will hold the first frame for 5-8

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

时间秒杀一切 提交于 2019-11-30 13:00:51
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 mp3. Is there a file format/codec that I should use in this case? It used to be that there were no common audio encoding formats for Android and iPhone. iPhone: iPhone audio encoding supported formats Android: Android supported media formats But Android 2.3.3 adds support for AMR-WB and AAC: Android Audio Encoder AAC See Media Framework at Android 2

How to add g729 codec in Android application?

别说谁变了你拦得住时间么 提交于 2019-11-30 09:56:49
问题 i am developing a SIP application for making and receiving a call and i want to add the G729 codec in my application. currently i am doing analysis on open source project SipDroid. if i want to make that application to support G729 codec how to do that? there is a different codecs configuration file in org.sipdroid.codecs package.how do create the this kind of .java file for G729 codec? Any suggestion and response will be appreciated. Log message of asterisk Found RTP audio format 101 Found

how to save the mjpeg stream as 3gp or mp4 format video files to the sdcard in android

微笑、不失礼 提交于 2019-11-30 09:47:54
问题 i have saved the mjpeg stream to the sdcard as xxx.mjpeg .However, the mjpeg video file was not supported in android. so how could i encode mjpeg video into 3gp or mp4 format and then store them on sdcard ,at last ,i can play back the 3gp or mp4 video on my android phone ,thanks in advance. 回答1: I am not aware of state of mobo's ffmpeg source out there. I had built it long back. I tried the rockplayer's ffmpeg port. This has hassle free build. I was able to build it today successfully on NDK