w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Cutting the videos based on start and end time using ffmpeg
You probably do not have a keyframe at the 3 second mark. Because non-keyframes encode differences from other frames, they require all of the data starting with the previous keyframe. With the mp4 container it is possible to cut at a non-keyframe without re-encoding using an edit list. In other words, if the closest keyframe before 3s is at 0s then it will copy the video starting at 0s and use an edit list to tell the player to start playing 3 seconds in. If you are using the latest ffmpeg from git master it will do this using an edit list when invoked using the command that you provided. If this is not working for you then you are probably either using an older version of ffmpeg, or your player does not support edit lists. Some players will ignore the edit list and always play all o

Categories : Linux

Playing videos on iPhone after video conversion using ffmpeg
I just wrote a blog post that covers encoding_h264_for_ios that shows examples of h.264 encoding that do and do not work on iOS hardware. The specific command line that I use is this: ffmpeg -y -i INPUT.mov -c:v libx264 -pix_fmt yuv420p -preset:v slow -profile:v baseline -crf 23 OUTPUT.m4v If I were you, I would try to encode the videos on the command line and test them on iOS hardware without the web interface. Then, go step by step with specific command line options until you found the one that was breaking the iOS playback.

Categories : Android

ffmpeg commands to concatenate different type and resolution videos into 1 video and can be played in android
You can use concat to append all the videos one by one after converting them to a single format. You can also use the below command to convert differently formatted video to one format: ./ffmpeg -i 1.mp4 -acodec libvo_aacenc -vcodec libx264 -s 1920x1080 -r 60 -strict experimental 1.mp4 Convert everything to mp4 and then follow the instructions given in the link above. This will enable you to join all the videos in a single file.

Categories : Android

android : merge two videos
com.coremedia.iso.PropertyBoxParserImpl; InputStream inputStream = getClass().getResourceAsStream("/isoparser-default.properties"); In Android projects, this: inputStream = null;

Categories : Java

AVAssetExportSession merge videos with stereo
I found that you can replace AVAssetExportSession with SDAVAssetExportSession. You can then specify audio settings as you would for the AVAssetWriter while leveraging the benefits of the AVAssetExportSession. I had to change __weak typeof(self) wself = self; to __weak SDAVAssetExportSession * wself = self; on line 172 of SDAVAssetExportSession.m.

Categories : IOS

Merge images and videos to make a complete movie
You can use AVMutableComposition. To create the video track from your UIImage use AVAssetWriter. Take a look at this Beautiful Link : Create movie from array of images. This is the Best Answer.

Categories : Iphone

PHP str_replace replace space with dash, but too many dash
You can use the more powerful preg_replace, instructing it to replace runs of dashes and/or spaces with a single dash: $name = preg_replace('/[s-]+/', '-', $name); [s-]+ is a regular expression that matches "one or more of: whitespace and dashes".

Categories : PHP

FFMpeg - Merge multiple rtmp stream inputs to a single rtmp output
Copy video stream and merge two mono steams Try the amerge audio filter: ffmpeg -i rtmp://ip:1935/live/micMyStream7 -i rtmp://ip:1935/live/MyStream7 -codec:v copy -filter_complex "[0:a][1:a]amerge" -codec:a aac -strict -2 -f flv rtmp://ip:1935/live/bcove7 ...or simply use -ac 2: ffmpeg -i rtmp://ip:1935/live/micMyStream7 -i rtmp://ip:1935/live/MyStream7 -codec:v copy -ac 2 -codec:a aac -strict -2 -f flv rtmp://ip:1935/live/bcove7 I added -codec:v copy to stream copy the video instead of re-encoding it. I am unable to try the commands right now, so they are untested, and I will probably not be able to reply until Monday.

Categories : Java

Android FFMPEG: Could not execute the ffmpeg from Java code
Do you have root on the device? Mount '/data' and then enter your same 'ffmpeg' command in the shell and see whether the error is the same. Try using the shell to test out different command expressions. Try 'ffmpeg' alone and with just one input file. See whether those commands produce expected output. My wild guess would be that there is an issue with calling 'ffmpeg.main()' that relates to the details of your build.

Categories : Android

OpenCV won't open some videos of many videos of the same format
I understand that this is a crash? If so, the answer is pretty simple: there's a bug in codec, from the name of the DLL I think that's ffmpeg H264 codec. You should try to update it, or just avoid it.

Categories : C++

should this mvc action be trimmed down
I would recommend that you create a "repository" to hide the details from the Controller action. An "Upsert" method would allow this to be clearly and elegantly implemented hiding the details from the controller.

Categories : C#

property name trimmed in '.observes()'
The error is raised due to the selectionBinding you gave to Ember.Select... The ApplicationController didn't owe any property "obj_type" either as its property or in its content... App.ApplicationController = Em.ObjectController.extend({ obj_type: '', obj_reflector: (function(){ // Not aware what are you trying with createRecord(); // this.set('obj',App[this.get('obj_type')].createRecord()); }).observes('obj_type') }); Your working fiddle is here

Categories : Ember Js

Trimmed input value displayed in div
I restructured your code a bit from the first fiddle. I threw out all inline javascript and it's handlers, the onFocus, onBlur, onClick and replaced with jQuery equivalents and I think I got what you wanted. I used jQuery's on() method to do the same thing which cleaned up the HTML a lot. Then I used a function within show() to trigger a few other functions. This could be more procedural but I thought it was nice and clean. And lastly I extracted out the trimming and substringing to it's own function so that you can reuse it later on. A fiddle here and the code below: $('input').on('click', function() { var $input = $(this); $('#show_hide').show(function(){ $('#show_hide2').text('Copy this text into the wiki, it will display as:'); var text = trimInputValue($inp

Categories : Javascript

Getting date and time in a trimmed way
Though its completely wrong to store date/date time data as string, you could use the ToString overload to specify the format: var stringedDate = DateTime.Now.ToString("dd MM',' yyyy 'at' H':'mm");

Categories : C#

trimmed when sending data via NSURLRequest
If I understood you correctly, here's what you need: \/qwerty\/\/\/qwertyuiop More about the escaping characters you can read here:Wiki

Categories : Iphone

Box-shadow trimmed in CSS columns in Chrome
I think column-count is conflicting with chrome... Try This, div#column-container { /* Set 2 columns*/ /* insignificant */ width: 50%; } div#column-container div { background-color: yellow; /* set shadow for yellow elements */ box-shadow: 0px 0px 15px #000; -webkit-box-shadow: 0px 0px 15px #000; -moz-box-shadow: 0px 0px 15px #000; /* Make sure that yellow div is not split between columns */ display: inline-block; /* the rest - not significant */ width: 46%; height: 70px; margin-top: 0; margin-bottom: 20px; margin-right: 2%; float:left; }

Categories : CSS

Redirect to security-trimmed menu node
I seem to have figured out one option, at least: I created an event handler for MenuItemDataBound, and redirected based on the Url of the first item bound to the menu, like so: On the aspx, set the Menu's OnMenuItemDataBound="Menu1_MenuItemDataBound" Then created the following method in the code-behind: protected void Menu1_MenuItemDataBound(object sender, MenuEventArgs e) { string Url = ((SiteMapNode)e.Item.DataItem).Url; Response.Redirect(Url); } Seems to work as expected. If you have a better solution, let me know.

Categories : C#

PDF scaling/importing pages that have been trimmed/cropped
Although it's hard to be sure without seeing the PDF itself, I suspect your problem is that this PDF specifies a CropBox on at least some of its pages. If that's the case, then I think that you would want to do something like page.setBoundingBox(reader.getCropBox(i)); right after you get the page reference. Note that the default value of a page's CropBox is it's MediaBox, so the addition of the above line shouldn't negatively impact the layout of PDF pages that do not specify a CropBox. (I am not an iText user, so this is a bit of speculation on my part...) Good luck!

Categories : Java

PHP- Codeigniter - return all input data trimmed
No, you don't use pre_controller for it. Use pre_system instead. You want to do the modification of the input variables as early as possible otherwise Codeigniters input class will work against you (depends a bit on configuration, but pre_system is the safe way if you don't want to get code executed from within config.php context). For your recursive trim needs, this should do it: array_walk_recursive(array(&$_SERVER, &$_COOKIE, &$_GET, &$_POST), 'trim'); as those input arrays only contain string values at their leaf-nodes. However take care with doing general things, it's often cause of side-effects, like with CI XSS filtering. Another alternative might be extending the input class if you're looking for a CI specific solution.

Categories : PHP

Text in the TextBlock is not trimmed properly inside the ListBox
The TextBlock in WPF really doesn't want to trim its text. It will do so when there isn't enough space, but as soon as the ScrollViewer can scroll, the TextBlock thinks it has infinite space available, so it won't trim. I think the easiest way to do this is to set the MaxWidth on the TextBlock to the ActualWidth of the ListBox: <DataTemplate> <TextBlock Text="{Binding}" TextTrimming="CharacterEllipsis" MaxWidth="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType={x:Type ListBox}}}"/> </DataTemplate> This is going to be ever slightly too big with the default WPF ListBox Style (which causes the scrollbar to still appear). I would write a custom converter to subtract about 8 from this value: public FudgeFactorConverter

Categories : Wpf

Show a tooltip with icon and header in Winforms Listview (only if text is trimmed)
For making a custom tooltip box, I think you will have to abandon ToolTip. Instead create a Panel with the layout you want, then change the Location of the Panel when you need to display it. You can also add some kind of animation to 'swipe' the Panel into view or something. Loading the information you want in the Panel to display then displaying. As for detecting the text that is in the ListViewItem, there is an ItemMouseHover event that may do the trick.

Categories : C#

What's the difference between "svn merge --reintegrate" and svn merge without reintegrate if I'd like to merge a branch onto the trunk
A sync merge is something completely different than a reintegration merge. The former is used to merge all changes made on the parent branch to the target branch (typically a feature branch), that have not already been merged. The latter is used to merge a (feature) branch back into the parent branch. Basically that means a temporary clone of the (feature) branch is created, a sync merge is made from the parent branch to the temporary branch, and finally the parent branch is replaced by the temporary branch. In other words, the temporary branch contains all changes made to the (feature) branch and parent branch. For some reason, some developers do not understand the difference. So, the SVN developers removed the option --reintegrate in SVN 1.8. With this version, the tool detects automati

Categories : Svn

Server is serving old versions of static files, but trimmed or padded to match length of new versions
In the end it turned out that this was probably being caused by VM issues. The code in question was located on a Windows drive, but was being served from within a Linux VM that was accessing the code via a shared directory. Remounting the share seemed to fix the problem (although not necessarily reliably).

Categories : Caching

merge two data frame with column name but give more result before merge file
Within merge you have the options all.x and all.y, this might help.... # this will give you all obs which are in both chop_result and newchop # and only if they are in both (intersection) merge(chop_result, newchop, by="Sample") # here all chop_result are in the new data frame, if # there is a "Sample" number which is not in chop_result # than it is filled with NA merge(chop_result, newchop, by="Sample", all.x=TRUE) # same as above but now all newchop results will be there merge(chop_result, newchop, by="Sample", all.y=TRUE) hth

Categories : R

How do I get TeamCity to automatically merge a Git feature branch with master and fail the build in case of merge conflicts?
If you're using Github and Pull Requests then check out Hadi Hariri's blog post about how to get the pull request after it has been merged with master: http://hadihariri.com/2013/02/06/automatically-building-pull-requests-from-github-with-teamcity/ Github does an automatic merge for every pull request and the resulting merge is available (though pretty much undocumented) as git fetch origin +refs/pull/298/merge where pull request id is 298. And so all merged pull requests can be fetched with a wildcard in place of the id in Teamcity and be built automatically. The branch specification would look like this: +refs/pull/*/merge EDIT: You say you're not using pull requests so I guess you could do this with some git commands. I haven't tried this out myself so these are only a few tips

Categories : GIT

How to change merge mode for eclipse egit merge tool?
You can change this in Eclipse Git preferences. Go to Window -> Preferences -> Team -> Git and there is dropdown for Merge Merge tool content.

Categories : Eclipse

Trying to clone a gem and git fetch/merge all pull requests but merge fails
Working through this, I devised a method of attempting to install all pull requests (PR's) using captures and scripts. I found that wasn't necessarily a wise thing to do. The PR's often have conflicts. So, I decided that I need to select which PR I want on an individual basis and built this script, where %1 is the PR that I want installed: git checkout pr/%1 git checkout master git merge pr/%1 This is all after running the process specified in the original question, save for the git merge.

Categories : GIT

jgit to detect conflicts before merge and apply merge strategy
If you're using the JGit MergeCommand to run this, the most likely way is to run the merge with a mergeCommand.setCommit(false) (so that you do the dry-run), and then based on your decisions, clean the working directory and re-run the merge command with the appropriate merge strategy.

Categories : GIT

Egit merge: abort/finish merge when no differences can be found
It could be because both files have different eol (end of line) style. In that case, since Egit does support core.autocrlf, make sure: it is set to false, in order for JGit to not change automatically the eol style to convert your local file to the right eol style already versioned in your repo

Categories : GIT

Get string between last dash and last dot
Demo here: var test = "http://foo.com/bar/image/abc.jpg"; var i = test.lastIndexOf("/"); var j = test.lastIndexOf("."); var str = test.substring(i + 1, j); document.body.innerHTML += "<p>" + str + "</p>";

Categories : Javascript

Git: how can i merge two branches by resolving merge conflicts on the tip nodes only?
A rebase will basically undo all of your changes (E-L), update your code to D, then make all of your changes (E-L) on top of D. That's not really what you're looking for. I think you should do a git merge. git checkout cat git merge dog From the git-merge man page: Incorporates changes from the named commits (since the time their histories diverged from the current branch) into the current branch. This command is used by git pull to incorporate changes from another repository and can be used by hand to merge changes from one branch into another. Assume the following history exists and the current branch is "master": A---B---C topic / D---E---F---G master Then "git merge topic" will replay the changes made on the topi

Categories : GIT

Redirect with a dash / hyphen
Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteRule ^[^-]+-for-([^/]+)/?$ /article/$1 [R=301,NC,L]

Categories : Apache

Extract Text after first "-" Dash
So you want everything from the beginning of the string through the 6th character after the first hyphen? This should work. If it's possible to have a string with no hyphen, you'd need to make it more complex, but your examples imply there will always be at least one. SUBSTR( string, 1, INSTR( string, '-') + 6 )

Categories : Oracle

variable variables in sh or dash
I don't think that you have any option but to use eval. The following: sms="SMSFile" email="EmailSubj" for x in sms email; do eval val=$$x; echo variable $$x=$val; done; should result in: variable $sms=SMSFile variable $email=EmailSubj in both sh and dash.

Categories : Unix

RewriteRule: problems with dash
Well you're getting 404 because w in your regex matches only alphanumerics and underscore so it won't match hyphen. Replace your RewriteRule with this: RewriteRule ^colection/([^/]+)/?$ collection.php?title=$1 [L,QSA,NC]

Categories : Htaccess

Why merge-with is used instead of simple 'merge' in Ring, Clojure?
Here's the description of the merge function: reworded it says that if a key is met more than once than value in the latest map will be selected. In the example that you posted that would mean that values of :query-params :params will be taken as is from the tail of the function instead of combining them with what's in the request. Let's look at the example: (def m {:a {:a-key1 "value1"} :b {:b-key1 "value3"} :c {}}) (def m2 {:a {:a-key2 "value2"} :b {}}) (merge m m2) ;-> {:a {:a-key2 "value2"}, :b {}, :c {}} (merge-with merge m m2) ;-> {:a {:a-key1 "value1", :a-key2 "value2"}, :b {:b-key1 "value3"} :c {}} So (merge-with merge ...) construct gives us a way to merge maps in the map. You can look at it this way: merge-with will group all key/value pairs by the key (:a :b :c in ou

Categories : Clojure

Why does git merge with no conflicts still produce a merge commit?
The point of a merge commit is to include two different trees of commits in the parent of the resulting HEAD. There are three possible ways to perform a merge: Create a merge commit with a separate parent for each thing you merged. This means that all of the original commits from the branch you merged will still show up in your history as a separate parallel track. Create a fake merge commit with only one parent which contains all of the merged changes. This results in a simpler history (no separate tree), but it loses all of the commits of the merged branch. This is a bad idea. Create new commits for the merged changes which have the original branch as their parents. This results in a linear history with both sets of commits interspersed. This is what git rebase does.

Categories : GIT

TFS: Is it possible to do a merge after source move during previous merge?
This is just not supported in UI. command tf merge /recursive $TeamProjectAPath1 C:TeamProjectBPath2 /version:{changesetnumber} in console did the requested work...

Categories : Visual Studio 2010

hg mercurial - how to merge in 3 way merge window in shell
If you don't have any differences between your production and development script that should be merged, it is safe to always do update clean with update -C. This will replace all local changes you made with the latest version that you pulled from the repository. So the workflow would be: hg pull hg update -C

Categories : Python

How to change shell to dash from bash
SHELL environment variable picks up the value from /etc/passwd. (It denotes the path to user's preferred command language interpreter.) This value wouldn't change if you change the shell in your session or your script.

Categories : Bash



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.