encoding

Can non-standard sampling rates be used with AAC encoding?

≡放荡痞女 提交于 2020-01-05 09:14:43
问题 I am trying to up-sampling an M4a file from 41000 to another non-standard sampling rate let's say 5000. ffmpeg -i audio.wav -ar 5000 audio_.wav This worked fine with wav files whoever it didn't work with m4a. Any ideas why? If non-standard sampling rates don't work with AAC I need any documentation or reference for that. 回答1: The set of available sampling frequencies is limited by AAC ADIF (Audio Data Interchange Format) and ADTS (Audio Data Transport Stream). So other rates just can't be

Display Big5 encoding from dBase on the web

帅比萌擦擦* 提交于 2020-01-05 09:12:18
问题 I have a dBase III file, the Chinese words inside is encoded in Big5. With the help of PHP ODBC, I can retreieve/ insert record to/ from the dBase file. However, I couldn't diplay the chinese words (Big5) correctly. When I use mb_detect_encodingfunction to detect those chinese words, it appears as "UTF-8". I guess the odbc dump the data in the form of "UTF-8" instead of it's original encoding (ASCII/ Big5). I would like to ask, how can I display the words correctly? Thanks so much for your

Error (little-endian) reading a XLS file with python

时光总嘲笑我的痴心妄想 提交于 2020-01-05 09:06:20
问题 I download a XLS file from the web using selenium. I tried many options I found in stack-overflow and other websites to read the XLS file : import pandas as pd df = pd.read_excel('test.xls') # Read XLS file Expected "little-endian" marker, found b'\xff\xfe' And df = pd.ExcelFile('test.xls').parse('Sheet1') # Read XLSX file Expected "little-endian" marker, found b'\xff\xfe' And again from xlrd import open_workbook book = open_workbook('test.xls') CompDocError: Expected "little-endian" marker,

Java Strings breaking file operations

╄→尐↘猪︶ㄣ 提交于 2020-01-05 08:53:10
问题 I have a glitch in my program that causes a question mark (\u003f) to appear in the sixth (index = 5) slot in strings when I encrypt them. Normally, this is reversed upon decryption. However, it is not reversed if I save the string to a file first. I have determined that when I save a string containing Unicode characters to a file, I will not be able to determine the correct length for the file. I have managed to reproduce the glitch in the following function... public static void testFileIO

mediaCodec android- How to do decoding encoding from buffer to buffer

强颜欢笑 提交于 2020-01-05 08:32:55
问题 I want to decode and then encode a video file. The example I found on bigflakes is using the Inputsurface for decoding. I want to directly provide the decoded data to the encoder as input. I am getting error that the output buffer from decoder is null, when I provide that as input to the encoder. Any suggestions ? Thanks 来源: https://stackoverflow.com/questions/25901345/mediacodec-android-how-to-do-decoding-encoding-from-buffer-to-buffer

Where and how do I set the correct encoding when uploading files using xhr

假如想象 提交于 2020-01-05 08:02:11
问题 I am uploading image files, and I need them to work with accented characters - so I have made everything use UTF-8 . I use this javascript function to upload them: $('#files').change(function(e) { var formData = new FormData(); for (var i=0; i<this.files.length;i++){ formData.append(this.files[i].name, this.files[i]); } var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function(e) { if ( 4 == this.readyState ) { showMessage("Uploaded."); } }; xhr.open('post', 'accoms/upload.jsp', true)

Hive ParseException in Drop Table Statement

一世执手 提交于 2020-01-05 06:55:10
问题 I'm using python and pyodbc module in particular to execute Hive queries on Hadoop. The portion of code triggering issue is like this: import pyodbc import pandas oConnexionString = 'Driver={ClouderaHive};[...]' oConnexion = pyodbc.connect(oConnexionString, autocommit=True) oConnexion.setencoding(encoding='utf-8') oQueryParameter = "select * from my_db.my_table;" oParameterData = pandas.read_sql(oQueryParameter, oConnexion) oCursor = oConnexion.cursor() for oRow in oParameterData.index:

Why is video made with MediaCodec garbled for Samsung Galaxy S7?

回眸只為那壹抹淺笑 提交于 2020-01-05 06:51:08
问题 When I encode a video via Surface -> MediaCodec -> MediaMuxer, I get a very strange result when testing on the Samsung Galaxy S7. For other devices tested (emulator with Marshmallow and HTC Desire), the video comes out correctly, but on this device the video is garbled. Using MediaCodec to save series of images as Video had a similar output of video, but I don't see how the solution could apply here because I am using a Surface as input and set the color format to COLOR_FormatSurface. I also

Why is video made with MediaCodec garbled for Samsung Galaxy S7?

有些话、适合烂在心里 提交于 2020-01-05 06:51:05
问题 When I encode a video via Surface -> MediaCodec -> MediaMuxer, I get a very strange result when testing on the Samsung Galaxy S7. For other devices tested (emulator with Marshmallow and HTC Desire), the video comes out correctly, but on this device the video is garbled. Using MediaCodec to save series of images as Video had a similar output of video, but I don't see how the solution could apply here because I am using a Surface as input and set the color format to COLOR_FormatSurface. I also

how to extract DER encoded certificate from base64 string

一世执手 提交于 2020-01-05 05:27:07
问题 Looking for help on how to decode the following base64 MerkleTreeLeaf string. The MerkleTreeLeaf structure is a composite data structure that contains a timestamp as well as a digital certificate. The structure is encoded as a Base64 encoded byte string. Within this byte string, there is an actual certificate encoded in DER format. I am looking for a php solution to extract the DER encoded certificate. Here is a sample of the base64 encoded string AAAAAAFNDPxFcQAAAAUaMIIFFjCCBLygAwIBAgIQM