codec

Mime type video/avc supported by multiple encoders on my Android device

风格不统一 提交于 2019-12-07 17:04:10
问题 When I enumerate all the media codecs on my device, I noticed that mime type "video/avc" is supported by the following encoders: OMX.qcom.video.encoder.avc OMX.google.h264.encoder When you call MediaCodec.CreateEncoderByType() , how does Android decide which encoder to pick? Also, besides Google's encoder, many devices may have another encoder specific to the hardware, such as the one from Qualcomm in my case. Generally speaking, should one choose native encoder over the one from Google?

Again: UnicodeEncodeError: ascii codec can't encode

烂漫一生 提交于 2019-12-07 16:19:38
问题 I have a folder of XML files that I would like to parse. I need to get text out of the elements of these files. They will be collected and printed to a CSV file where the elements are listed in columns. I can actually do this right now for some of my files. That is, for many of my XML files, the process goes fine, and I get the output I want. The code that does this is: import os, re, csv, string, operator import xml.etree.cElementTree as ET import codecs def parseEO(doc): #getting the basic

Collection of video samples with different codecs

安稳与你 提交于 2019-12-07 10:25:17
问题 I'm in a middle of trying to buy iptv device and of course different iptv devices supports different kind of file formats, video codecs and audio codecs. Can someone recommend me a collection of videos which would be encoded using different versions and different video and audio codec - as much as possible different combinations. I understand that supporting everything (all video and all audio codecs) is pretty much impossible - so it would be good if they are sorted in most used - least used

Force MATLAB mmreader or avireader to use a different codec?

微笑、不失礼 提交于 2019-12-07 06:52:08
问题 How do I force MATLAB functions to use a different codec when I need to play an AVI file? I am using windows7 and I find that indeo5 codec is not working properly because of the OS. All code works fine on XP. Thanks! 回答1: If your question is about how to play an avi using a codec other than the one used to create it, you'll have to use some kind of image conversion software ( RAD video tools aka bink and smacker is popular and free ) to recompress the movie using the new codec. There may be

Why codecs.iterdecode() eats empty strings?

社会主义新天地 提交于 2019-12-07 06:49:39
问题 Why the following two decoding methods return different results? >>> import codecs >>> >>> data = ['', '', 'a', ''] >>> list(codecs.iterdecode(data, 'utf-8')) [u'a'] >>> [codecs.decode(i, 'utf-8') for i in data] [u'', u'', u'a', u''] Is this a bug or expected behavior? My Python version 2.7.13. 回答1: This is normal. iterdecode takes an iterator over encoded chunks and returns an iterator over decoded chunks, but it doesn't promise a one-to-one correspondence. All it guarantees is that the

decode 7-bit GSM

丶灬走出姿态 提交于 2019-12-07 06:30:48
问题 I found this post on how to encode ascii data to 7-bit GSM character set, how would I decode 7-bit GSM character again (reverse it back to ascii)? 回答1: For Python2: import binascii gsm = ("@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞ\x1bÆæßÉ !\"#¤%&'()*+,-./0123456789:;<=>?" "¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑÜ`¿abcdefghijklmnopqrstuvwxyzäöñüà") ext = ("````````````````````^```````````````````{}`````\\````````````[~]`" "|````````````````````````````````````€``````````````````````````") def gsm_encode(plaintext)

Playback 24bit audio not possible

这一生的挚爱 提交于 2019-12-06 20:01:26
问题 I'm trying to play a 24bit audio file with my AutoHotkey app. It just uses SoundPlay. Windows 7 has no problem, however Windows XP users cannot play the 24bit files. The documentation says: All Windows OSes should be able to play .wav files. However, other files (.mp3, .avi, etc.) might not be playable if the right codecs or features aren't installed on the OS. Possible fixes mentioned in the article How to play 24bit WAV files in Windows Media Player are fixing the problem for Windows Media

VideoWriter not working on Win7-64Bit VM

倾然丶 夕夏残阳落幕 提交于 2019-12-06 13:21:26
问题 I coded the below which tries to hold a picture and count number hundred and finally grab all them to a video with following codec MP42(MPEG4-V2) #include <stdAfx.h> #include <iostream> #include <opencv2\opencv.hpp> using namespace cv; using namespace std; int n=0; char a; int main(int, char** argv) { Mat image= imread("C:\\Users\\Metin\\Desktop\\images.jpg"); Mat newimage; VideoWriter vide ("Hopdedik.avi",CV_FOURCC('M','P','4','2'),30.0,image.size()); vide.open("Hopdedik.avi",CV_FOURCC('M',

android mediacodec: real time decoding h264 nals

给你一囗甜甜゛ 提交于 2019-12-06 08:31:34
问题 I'm trying to decode h264 nals in real time with android low level media api. Each nal contains one full frame, so i expect that after feeding input with my nal and calling dequeueOutputBuffer it would "immediatly" (with the litle delay of course) display my frame but it doesn't. I see the first frame and the dequeue returns the first buffer only afer feeding the decoder with the second one which at this time should render the second frame. Frames are encoded with zerolatency preset of x264

Again: UnicodeEncodeError: ascii codec can't encode

一曲冷凌霜 提交于 2019-12-06 01:38:41
I have a folder of XML files that I would like to parse. I need to get text out of the elements of these files. They will be collected and printed to a CSV file where the elements are listed in columns. I can actually do this right now for some of my files. That is, for many of my XML files, the process goes fine, and I get the output I want. The code that does this is: import os, re, csv, string, operator import xml.etree.cElementTree as ET import codecs def parseEO(doc): #getting the basic structure tree = ET.ElementTree(file=doc) root = tree.getroot() agencycodes = [] rins = [] titles =[]