concat

ffmpeg concat videos with different timebase

无人久伴 提交于 2019-12-01 14:45:49
I use ffmpeg.exe -f concat -i file_path_list_txt -c copy out_out.mp4 to concat for file in 1265_*; do ffmpeg -i $file -crf 30 -b:a 23k -b:v 96k -threads 3 -y 'out_'$file; done compressed video. When I play the generated video, the player shows the video length is much longer than the sum of compressed video pieces. And at the linkage between slices,the frame can play a very long time,time on the player is going on,but the frame is still. I use ffprobe to show the original video pieces and compressed video pieces. And found the original videos with same tbr,tbn,tbc , while the compressed not.

XSL combining values of siblings if values of an attribute is same

一个人想着一个人 提交于 2019-12-01 14:10:52
This is how my XML looks like <?xml version="1.0"?> <Nodes> <NodeA NodeAattr="123"> <NodeB NodeBattr="456"></NodeB> <NodeC> <NodeD NodeDAttr="ValueD"> <NodeE Name="ValueABC"> "555" </NodeE > <NodeE Name="ValueABC"> "666" </NodeE> </NodeD> </NodeC> </NodeA> </Nodes> If the values of the Name attribute of NodeE are same, concatenate the values of NodeE. And my final output xml has to look like <NodeA NodeAattr="123"> <NodeB NodeBattr="456"></NodeB> <NodeC> <NodeD="ValueD"> <NodeE Name="ValueABC"> "555" , "666" </NodeE > </NodeD> </NodeC> </NodeA> Please provide me with the xsl.. I am using XSLT1

Changing size of array in extension method does not work?

与世无争的帅哥 提交于 2019-12-01 12:28:04
So basically I wrote my little Add extension method for array types. using System; using System.Linq; public static class Extensions { public static void Add<T>(this T[] _self, T item) { _self = _self.Concat(new T[] { item }).ToArray(); } } public class Program { public static void Main() { string[] test = { "Hello" }; test = test.Concat(new string[] { "cruel" }).ToArray(); test.Add("but funny"); Console.WriteLine(String.Join(" ", test) + " world"); } } The output should be Hello cruel but funny world , but the but funny will never be concatenated within the extension method. Editing the same

FFMPEG -F Concat Video, Audio Sycn Issue

血红的双手。 提交于 2019-12-01 11:51:21
i am having issue, to concat video, it looses the audio sync and audio started from previous video. i have tried below two link/so answer by Mulvya, but none of them work :( here is the code i am trying: 1: re-encode file a (1): ffmpeg.exe -i "f:\1.avi" -af apad -vf scale=1280:720 -crf 15.0 -vcodec libx264 -acodec aac -ar 48000 -b:a 192k -coder 1 -rc_lookahead 60 -threads 0 -shortest -avoid_negative_ts make_zero -fflags +genpts 01.mp4 2: re-encode file b (2): ffmpeg.exe -i "f:\2.mp4" -af apad -vf scale=1280:720 -crf 15.0 -vcodec libx264 -acodec aac -ar 48000 -b:a 192k -coder 1 -rc_lookahead 60

Changing size of array in extension method does not work?

守給你的承諾、 提交于 2019-12-01 10:32:04
问题 So basically I wrote my little Add extension method for array types. using System; using System.Linq; public static class Extensions { public static void Add<T>(this T[] _self, T item) { _self = _self.Concat(new T[] { item }).ToArray(); } } public class Program { public static void Main() { string[] test = { "Hello" }; test = test.Concat(new string[] { "cruel" }).ToArray(); test.Add("but funny"); Console.WriteLine(String.Join(" ", test) + " world"); } } The output should be Hello cruel but

Concat two column in a select statement sql server 2005

纵饮孤独 提交于 2019-12-01 05:42:22
How to Concat two column in a select statement sql server 2005? Here is my statement Select FirstName,secondName from Table ... Now i did try concating secondName with FirstName by using Select FirstName + ' ' + secondName from Table But some values are NULL in secondName column for some records.. My select statement returns NULL instead of FirstName .. I want to have FirstName if secondName is NULL .. SELECT FirstName + ISNULL(' ' + SecondName, '') from Table Douglas Loyo If one of your fields is numeric then you can cast it to a string as follows: SELECT FirstName + ISNULL(' ' + SecondName,

Which is faster: Union or Concat?

 ̄綄美尐妖づ 提交于 2019-12-01 02:37:17
I don't care about the order of the elements. http://msdn.microsoft.com/en-us/library/system.linq.enumerable.union.aspx http://msdn.microsoft.com/en-us/library/bb302894.aspx Union removes duplicates. Concat does not. So, they produce different results if the sources either contain any items in common, or have any internal duplicates. If you can guarantee there are no duplicates, or if there are few and you don't care about having them in your output, Concat will be faster since there's no need to test each value against what has already been yielded. However, if there are many duplicates and

MySQL CONCAT(“string”,longtext) results in hex string

强颜欢笑 提交于 2019-11-30 22:58:01
问题 I'm experiencing a weird hex string result when trying to concat a string with a column that should be of LONGTEXT type. The query goes like this: SELECT concat("abc",t.LONGTEXT_VALUE,"cde") FROM mytable t 61626354657374696e67636465 The hex string 61626354657374696e67636465 is the correct value, just in hexadecimal form. A SELECT on the column itself will return the normal string: SELECT t.LONGTEXT_VALUE FROM mytable t Testing 回答1: Have you tried casting? Usually works pretty well for me.

C# : concatenate 2 MP3 files

本秂侑毒 提交于 2019-11-30 20:25:33
I tried to concatenate 2 MP3 files using the code below. I got a new file which I can play the first half of (complete first file), but the second half is silent. The length of the new file was correct. What do I do wrong? List<Byte[]> files = new List<byte[]>(); var tempfile = File.ReadAllBytes(Path.Combine(path, "1.mp3")); files.Add(tempfile); tempfile = File.ReadAllBytes(Path.Combine(path, "2.mp3")); files.Add(tempfile); Byte[] a=new Byte[files[0].Length+files[1].Length]; Array.Copy(files[0], a, files[0].Length); Array.Copy(files[1], a, files[1].Length); File.WriteAllBytes(Path.Combine(path

mapcat breaking the lazyness

浪尽此生 提交于 2019-11-30 19:08:06
I have a function that produces lazy-sequences called a-function. If I run the code: (map a-function a-sequence-of-values) it returns a lazy sequence as expected. But when I run the code: (mapcat a-function a-sequence-of-values) it breaks the lazyness of my function. In fact it turns that code into (apply concat (map a-function a-sequence-of-values)) So it needs to realize all the values from the map before concatenating those values. What I need is a function that concatenates the result of a map function on demand without realizing all the map beforehand. I can hack a function for this: