converter

ffmpeg : how to determine frame rate automatically?

三世轮回 提交于 2020-08-25 18:59:56
问题 I use this simple script to convert video to images using ffmpeg , but frame rate is fixed, how can I determine it automatically? FRAME_RATE="30" SEPARATOR='/' VIDEO_PATH=$1 VIDEO_BASE_DIR=`dirname $1` FRAMES_DIR=$VIDEO_BASE_DIR$SEPARATOR"Frames" rm -rf $FRAMES_DIR mkdir $FRAMES_DIR #Convert video to images ./ffmpeg -r $FRAME_RATE -i $VIDEO_PATH $FRAMES_DIR$SEPARATOR"image%d.png" UPDATE: By ffprobe I checked that my 1st video frame rate is 30. Also results are the same (339 frames are

convert any string or a character in php to unicode code points

人走茶凉 提交于 2020-08-06 05:12:19
问题 How to convert any string or a character in php to "unicode code points" for example : unicode code points of letter अ is 0905 and A is 0041 I need a continuous string if i pass Aअ which will give me a output as 00410905 回答1: Use this function function Unicode_decode($text) { return implode(unpack('H*', iconv("UTF-8", "UCS-4BE", $text))); } If you want to have U+0000 use this : for ($i=0; $i < strlen($word); $i++) { $wordConvert = Unicode_decode($word[$i]); $result .= "U+" . substr(

How do I convert web application into desktop executable?

拜拜、爱过 提交于 2020-06-23 22:33:31
问题 I've HTML application build with AngularJS/jQuery/Bootstrap with AJAX REST API. Is it possible to create executable/installer for Windows operating system? Without any 3rd-party software, it should look like native application, but HTML. For example, Slack messenger has web/mac/windows versions and they look same. Any ideas? // UPD I probably need a wrapper (webview), but I need all features for EcmaScript5/CSS3. 回答1: Electron is the easiest way: 1. Install electron 2. Create and edit main.js

How do I convert web application into desktop executable?

二次信任 提交于 2020-06-23 22:31:51
问题 I've HTML application build with AngularJS/jQuery/Bootstrap with AJAX REST API. Is it possible to create executable/installer for Windows operating system? Without any 3rd-party software, it should look like native application, but HTML. For example, Slack messenger has web/mac/windows versions and they look same. Any ideas? // UPD I probably need a wrapper (webview), but I need all features for EcmaScript5/CSS3. 回答1: Electron is the easiest way: 1. Install electron 2. Create and edit main.js

How to convert a PDF into JPG with commandline in linux?

非 Y 不嫁゛ 提交于 2020-06-10 11:05:30
问题 What are fast and reliable ways converting a PDF into a (single) JPEG using linux commandline? 回答1: You can try imagemagick repository and then convert utility: $ sudo apt-get install imagemagick $ convert input.pdf output.jpg And alternatively other syntax depends on linux distribution. 回答2: Convert from imagemagick seems do a good job: convert file.pdf test.jpg and in case multiple files were generated: convert test-0.jpg --append test-1.jpg ... --append one.jpg to generate a single file,

XAML: Can I refer to a Grid row or column by name?

…衆ロ難τιáo~ 提交于 2020-05-25 08:30:01
问题 If I name each row and column in a grid, can I set a control's grid.row="Row_Top"? I have defined StaticResources to refer to it but is there a converter or some other method to accomplish this without the resource? 回答1: As far as I know there's no built-in way to do it... however, you could use markup extensions to retrieve a row or column by its name : [MarkupExtensionReturnType(typeof(int))] public abstract class GridBandExtensionBase : MarkupExtension { public override object ProvideValue

PHP - Convert string to unicode

半城伤御伤魂 提交于 2020-05-15 19:15:32
问题 I'm working on it $source = mb_convert_encoding('test', "unicode", "utf-8"); $source = unpack('C*', $source); var_dump($source); return: array (size=8) 1 => int 0 2 => int 116 3 => int 0 4 => int 101 5 => int 0 6 => int 115 7 => int 0 8 => int 116 but i want this return: array (size=8) 1 => int 116 2 => int 0 3 => int 101 4 => int 0 5 => int 115 6 => int 0 7 => int 116 8 => int 0 I want use this return in openssl function for encryption. just $source important to me, i write other code for

PHP - Convert string to unicode

▼魔方 西西 提交于 2020-05-15 19:13:37
问题 I'm working on it $source = mb_convert_encoding('test', "unicode", "utf-8"); $source = unpack('C*', $source); var_dump($source); return: array (size=8) 1 => int 0 2 => int 116 3 => int 0 4 => int 101 5 => int 0 6 => int 115 7 => int 0 8 => int 116 but i want this return: array (size=8) 1 => int 116 2 => int 0 3 => int 101 4 => int 0 5 => int 115 6 => int 0 7 => int 116 8 => int 0 I want use this return in openssl function for encryption. just $source important to me, i write other code for

Convert a string with commas to double

半腔热情 提交于 2020-03-20 06:31:54
问题 I have a string like this: 99 365 25,633 gghddhdf 35 I need all the numbers in an array. My problem is how do I handle 25,633 because of the ','. How I can get this number too? My code is: public string campDiff(string lineStr1, string lineStr2) { int size; string sum = null; double num1; double num2; double number; string[] lineArr1 = lineStr1.Split(' '); ; string[] lineArr2 = lineStr2.Split(' '); if (lineArr1.Length > lineArr2.Length) { size = lineArr1.Length; } else { size = lineArr2

HTML5 视频转换软件 Freemake Video Converter

妖精的绣舞 提交于 2020-02-29 03:13:27
HTML5的Video标签可以说算是HTML5的重头戏,各大浏览器都纷纷响应,现代浏览器都能支持Video标签,基于Video标签的播放器也越来越多,但问题是每个浏览器所支持的视频格式不同,想在各大浏览器上播放视频(暂且不谈IE6~8)必须得添加三种视频格式 mp4、ogv、webm,如何生成这三种视频格式呢,还真不好办,目前很多软件都只能生成这三种视频格式中的一种,这就得需要下载几个软件,经过几次所理后才能得到想要的视频。 今天给大家推荐一款免费的视频软换软件 - Freemake Video Converter 他支持多种视频格式转换,最主要的是能一健生成HTML5所需要的三种视频格式,同时生成HTML5示例页面,真是超级方便。 to HTML5 功能很方便 支持对视频做一些简单的剪辑 可以输出多种视频尺寸,好像不支持自定义尺寸。 生成的文件名含三种不同格式的视频和一个示例文件 参考文档: http://www.freemake.com/tw/free_video_converter/ 来源: oschina 链接: https://my.oschina.net/u/124010/blog/102095