codec

MongoDB Scala Driver - Rendering BSON Documents

别等时光非礼了梦想. 提交于 2019-12-05 21:28:05
We currently have a Type-Safe query language at work, this custom DSL allows us to easily write database queries that are interpreted and converted into Mongo Queries. We recently swapped over from Casbah to the new Mongo Scala Driver and rewrote our interpreter. I am however having some issues when dealing with optional values. This is an example query: dao.headOption(Order.id === orderId.some) The type stored on the Order Object is an Option so we lift the provided id into an option as well. However whenever I try to render out the generated query for debugging as well as for test cases in

Open and read avi files with OpenCV - Ubuntu

随声附和 提交于 2019-12-05 20:26:32
I have just read this in the book OpenCV 2 Computer Vision Application Programming Cookbook by R. Laganiere : It is important to note that in order to open the specified video file, your computer must have the corresponding codec installed, otherwise cv::VideoCapture will not be able to understand the input file. Normally, if you are able to open your video file with a video player on your machine (such as the Windows Media Player), then OpenCV should also be able to read this file. Unfortunately, things aren't that easy for me. Yes, I can read avi files on my video player, however it does not

How to execute command line ffmpeg commands programatically in android?

女生的网名这么多〃 提交于 2019-12-05 17:09:32
I have successfully built ffmpeg for android using the bambuser . Now I have to build a sample converter application like mp4 to 3gp. I know there are command line commands ffmpeg -i video_origine.avi video_finale.mpg . But I don't know how to execute these commands programatically. I have sample code like jint Java_com_example_ndklearning1_MainActivity_logFileInfo(JNIEnv * env, jobject this, jstring filename) { av_register_all(); AVFormatContext *pFormatCtx; const jbyte *str; str = (*env)->GetStringUTFChars(env, filename, NULL); if(av_open_input_file(&pFormatCtx, str, NULL, 0, NULL)!=0) {

How to choose Full Frames (Uncompressed) as codec for VideoWriter

◇◆丶佛笑我妖孽 提交于 2019-12-05 13:55:25
i want to store uncompressed frames from a device as a video, but i need to know how to choose " Full Frames (Uncompressed) " as a codec for the VideoWriter (in emgu aka openCV). Iam able to choose it from the dropdown menu when iam passing -1 like this VideoWriter myVideoWriter = new VideoWriter ("myVieoColor.avi", -1 , 15, videoSize, true); But i want to choose the Full Frames (Uncompressed) codec automatically. For example i know i can choose the Lagarith Lossless Video Codec by VideoWriter myVideoWriter = new VideoWriter ("myVieoColor.avi", Emgu.CV.VideoWriter.Fourcc('L','A','G','S') , 15,

Collection of video samples with different codecs

爷,独闯天下 提交于 2019-12-05 13:26:08
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 order. For example: .avi - xvid vx.xx video codec + yyy audio codec .mkv - .... YouTube .flv format ..

decode 7-bit GSM

喜夏-厌秋 提交于 2019-12-05 11:35:17
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)? For Python2: import binascii gsm = ("@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞ\x1bÆæßÉ !\"#¤%&'()*+,-./0123456789:;<=>?" "¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑÜ`¿abcdefghijklmnopqrstuvwxyzäöñüà") ext = ("````````````````````^```````````````````{}`````\\````````````[~]`" "|````````````````````````````````````€``````````````````````````") def gsm_encode(plaintext): result = [] for c in plaintext: idx = gsm.find(c) if idx != -1: result.append(chr(idx)) continue idx = ext

Force MATLAB mmreader or avireader to use a different codec?

白昼怎懂夜的黑 提交于 2019-12-05 11:10:20
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! 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 some loss of video quality. If your question is how to tell MATLAB to create an avi using a different codec,

Why codecs.iterdecode() eats empty strings?

假如想象 提交于 2019-12-05 10:38:17
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. 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 concatenation of all output chunks is a valid decoding of the concatenation of all input chunks. If you look at

Playback 24bit audio not possible

有些话、适合烂在心里 提交于 2019-12-05 03:02:00
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 Player, however but not for autohotkey: Step-by-step guide Download Legacy HD Audio Filter regsvr32

H.264 Frames Memory Leak With Some Decoders

柔情痞子 提交于 2019-12-05 02:58:47
I'm receiving an H.264 stream from a DVR using its SDK. There were memory leaks and i thought it was the SDK causing all the leaks. But when i recorded the stream and played the frames one by one reading from the disk (without any 3rd party dlls involved), i noticed that the problem is not the dll but the stream itself. Strange enough, DivX H264 Decoder is the only codec which doesn't cause a memory leak but when the stream runs for a long time, sometimes DivX decoder crashes as well. I'd prefer to use Microsoft DTV-DVD Video Decoder but it causes huge memory leaks and drops a lot of frames.