codec

Custom Wrapper Codec Integration into Android

爷,独闯天下 提交于 2019-12-18 13:37:11
问题 I need to develop a custom 'wrapper' video codec and integrate it into android (JB for now, ICS later). We want to use some custom decryption keys from the SIM (don't ask!). The best method (that would allow it to work alongside other non-encrypted media and to use the standard media player or other) seems to be to define our own mime-type, and link that to a custom wrapper codec that can do the custom decryption, and then pass the data on to a real codec. (Let's say the filetype is .mp4 for

Adding video codec to Android

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 11:47:37
问题 Can someone please explain the steps I need to take in order to add a new codec to Android? Also, I would like the codec to be installed as part of an application installation (or first launch) and NOT as part of a full Android OS build. The reason I want to do this is that I have an application that needs to show a video of a non supported codec (HLS or TS), but I wouldn't want to build a full blown video player - just integrate with the existing, built-in, player. Thanks, Alik. 回答1: Can

Can't open video using opencv

心不动则不痛 提交于 2019-12-17 15:57:10
问题 The opencv works fine when doing other things. It can open images and show images. But it can't open a video. The code I'm using to open a video is as below import cv2 cap = cv2.VideoCapture("MOV_0006.mp4") while True: ret, frame = cap.read() cv2.imshow('video', frame) if cv2.waitKey(1) & 0xff == ord('q'): break cap.release() cv2.destroyAllWindows() But when executing, it outputs error messages like below [h264 @ 0x1053ba0] AVC: nal size 554779904 [h264 @ 0x1053ba0] AVC: nal size 554779904

Can't open video using opencv

半腔热情 提交于 2019-12-17 15:56:59
问题 The opencv works fine when doing other things. It can open images and show images. But it can't open a video. The code I'm using to open a video is as below import cv2 cap = cv2.VideoCapture("MOV_0006.mp4") while True: ret, frame = cap.read() cv2.imshow('video', frame) if cv2.waitKey(1) & 0xff == ord('q'): break cap.release() cv2.destroyAllWindows() But when executing, it outputs error messages like below [h264 @ 0x1053ba0] AVC: nal size 554779904 [h264 @ 0x1053ba0] AVC: nal size 554779904

How to decode AAC audio buffer to PCM buffer in iOS? [closed]

China☆狼群 提交于 2019-12-17 10:57:28
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I am trying to decode AAC audio to PCM audio in iOS, what the best way to do this?Any sample code would be very helpful...Is there any simple APIs to do this..? 回答1: I have sample code to do it. At start you should configure in/out ASBD (AudioStreamBasicDescription) and create

Open() and codecs.open() in Python 2.7 behave strangely different

不羁的心 提交于 2019-12-14 02:02:41
问题 I have a text file with first line of unicode characters and all other lines in ASCII. I try to read the first line as one variable, and all other lines as another. However, when I use the following code: # -*- coding: utf-8 -*- import codecs import os filename = '1.txt' f = codecs.open(filename, 'r3', encoding='utf-8') print f names_f = f.readline().split(' ') data_f = f.readlines() print len(names_f) print len(data_f) f.close() print 'And now for something completely differerent:' g = open

Python: How do I read and parse a unicode utf-8 text file?

元气小坏坏 提交于 2019-12-14 01:23:54
问题 I am exporting UTF-8 text from Excel and I want to read and parse the incoming data using Python. I've read all the online info so I've already tried this, for example: txtFile = codecs.open( 'halout.txt', 'r', 'utf-8' ) for line in txtFile: print repr( line ) The error I am getting is: UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: unexpected code byte Looking at the text file in a Hex editor, the first values are FFFE I've also tried: txtFile.seek( 2 ) right after

ffmpeg stream rc buffer underflow

只愿长相守 提交于 2019-12-13 13:14:15
问题 At the moment I'm setting up a screen-sharing platform with the opensource tool ffmpeg / ffserver. At the beginning of the sharing everything is fine. After around 1 1/2 minutes I get the following exception in the output. [flv @ 0x3a47aa0] rc buffer underflow [flv @ 0x3a47aa0] max bitrate possibly too small or try trellis with large lmax or increase qmax I've tried to set an verry high lmax & qmax but this hasn't changed any thing.Additionally I've tried to increase the bitrate , the

FFmpeg check channels of a 7.1 audio for silence

时光总嘲笑我的痴心妄想 提交于 2019-12-13 12:23:20
问题 This is a follow-up question from my previous question asked here, where I needed to look for silence within a specific audio track. Here is the ffmpeg life-saver solution where helps to get some metadata: ffmpeg -i file -map 0:a:1 -af astats -f null - But I have other type of input .mp4 files where they have one single track of 8 (i.e. 7.1) audio channels. Apparently these files are transcoded from an original file (somehow the 4 track stereos are squished into these files). Now similar to

Add SPEEX code support to FFMPEG

我是研究僧i 提交于 2019-12-13 03:34:53
问题 How can I add SPEEX support to my FFMPEG installation? I need to extract the audio from a FLV created by FMS. I just installed it using: app-get install ffmpeg. ffmpeg -version FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr libavutil version: 1d.49.3.0