encoding

(FFmpeg) VP9 Vaapi encoding to a .mp4 or .webm container from given official ffmpeg example

别等时光非礼了梦想. 提交于 2019-12-24 07:50:04
问题 I'm trying to implement vp9 hardware acceleration encoding process. I followed ffmpeg offical github's example (Here -> vaapi_encode.c). But given example only save a .yuv file to .h264 file, I would like to save the frames to either .mp4 or .webm container. And having the ability to control the quality, and etc. I'm not reading frames from a file, I'm collecting frames from a live feed. When having full 5 secs of frames from the live feed, encode those frames using vp9_vaapi to a 5 secs .mp4

Broken UTF-8 URI Encoding in JSPs

a 夏天 提交于 2019-12-24 07:38:52
问题 I got a strange issue with wrong URI Encoding and would appreciate any help! The project uses JSPs, Servlets, Jquery, Tomcat 6. Charset in the JSPs is set to UTF-8, all Tomcat connectors use URIEncoding=UTF-8 and I also use a character encoding filter as described here. Also, I set the contentType in the meta Tag and my browser detects it correctly. In Ajax calls with Jquery I use encodeURIComponent() on the terms I want to use as URL Parameters and then serialize the whole parameter set with

How to read non-english texts in java? They are represented in wrong encoding

妖精的绣舞 提交于 2019-12-24 07:38:04
问题 I use apache HttpClient. And when I'm trying to "read site", all non-english content is represented wrongly. Actually, it's represented in windows-1252 but it should be in UTF-8. How can I fix this? I tried to use InputStreamReader (inputStream, Charset.forName ("UTF-8")) , but it didn't help (wrong symbols transformed into ????????). 回答1: If the file is in Windows-1252, then telling it to use UTF-8 isn't going to work. Give it Windows-1252 as the charset name, and then you can read the

python subprocess encoding

冷暖自知 提交于 2019-12-24 07:18:50
问题 I'm trying to store the output of powershell in a var: import subprocess subprocess.check_call("powershell \"Get-ChildItem -LiteralPath 'HKLM:SOFTWARE\\\\Microsoft\\\\Windows\\\\CurrentVersion\\\\Uninstall' -ErrorAction 'Stop' -ErrorVariable '+ErrorUninstallKeyPath'\"", shell=True, stderr=subprocess.STDOUT) this way, using check_call , it prints ok, for example: DisplayName : Skype™ but this way it only prints to screen, so i have to use import subprocess output = subprocess.check_output(

How do I decode data when I don't know the specific encoding

寵の児 提交于 2019-12-24 07:11:56
问题 I'm receiving data using an OSC server and the data looks like this: b'Muse-C46F/elements/alpha_absolute\x00\x00\x00,ffff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' b'Muse-C46F/elements/alpha_relative\x00\x00\x00,ffff\x00\x00\x00\x7f\xc0\x00\x00\x7f\xc0\x00\x00\x7f\xc0\x00\x00\x7f\xc0\x00\x00' b'Muse-C46F/elements/alpha_session_score\x00\x00,ffff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' b'Muse-C46F/elements/alpha_absolute

Passing an encoding switch to the JVM for a Gradle “JavaExec” task

醉酒当歌 提交于 2019-12-24 07:04:46
问题 I am having a few encoding problems here. This is on a W10 OS but I'm using both the DOS console and the Cygwin shell to run tasks directly. When in Eclipse I'm running using the Buildship plugin, and for my "production" output I'm making a "fat" jar (i.e. containing all the dependency jars). To get the fat jar to run in a DOS console I go like this: > chcp 65001 > java -jar -Dfile.encoding=UTF-8 myFatJar.jar To get the fat jar to run in a Cygwin console I omit the "chcp" command ... and both

outputting \r\n after text is decoded - PHP

半城伤御伤魂 提交于 2019-12-24 06:41:57
问题 I am building an application where users can enter a note into a textarea. The note is then encoded when entered into the database. When I decode the returned value, the nl2br function isn't working. It isn't replacing the \r\n with the br tag. When not encoding/decoding text, it works. I am using the following code to encode/decode my information: http://www.myphpscripts.net/tutorial.php?id=9 If I enter into a textarea: Hello World It encodes it, and then returns when decoded Hello\r\nWorld.

Convert utf-8 XML document to utf-16 for inserting into SQL

有些话、适合烂在心里 提交于 2019-12-24 06:41:47
问题 I have an XML document that has been created using utf-8 encoding. I want to store that document in a sql 2008 xml column but I understand I need to convert it to utf-16 in order to do that. I've tried using XDocument to do this but I'm not getting a valid XML result after the conversion. Here is what I've tried to do the conversion on (Utf8StringWriter is a small class that inherits from StringWriter and overloads Encoding): XDocument xDoc = XDocument.Parse(utf8Xml); StringWriter writer =

Cannot encode to UTF-8 in JNI

家住魔仙堡 提交于 2019-12-24 06:41:14
问题 I'm trying to return jstring encoded with UTF-8, but app crashes and JNI writes out error: JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal continuation byte 0x30 My snippet: jstring Java_tgio_rncryptor_RNCryptorNative_generateKey(JNIEnv *env, jobject instance, const jstring salt_, const jstring password_) { const char *salt = env->GetStringUTFChars(salt_, 0); const char *password = env->GetStringUTFChars(password_, 0); RNCryptor *cryptor = new RNCryptor(); string

Wrong charset in ASP classic loaded via AJAX

狂风中的少年 提交于 2019-12-24 06:39:08
问题 I have issue with dynamic loading of part of content on ASP classic page. I use AJAX to load on page dynamically, depending on dropdown selected option. Generated contains some Labels for containing dropdowns and option text inside of dropdowns. Labels are constants encoded in UTF-8 and contain some western European accented characters, and option texts are loaded from database, contain accented characters too but are coded in ANSI. tags are set to utf-8 but it affects only first load of page