w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

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

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

merging videos together (AVFoundation)
This will work fine AVMutableComposition *mainComposition = [[AVMutableComposition alloc] init]; AVMutableCompositionTrack *compositionVideoTrack = [mainComposition addMutableTrackWithMediaType:AVMediaTypeVideo preferredTrackID:kCMPersistentTrackID_Invalid]; AVMutableCompositionTrack *soundtrackTrack = [mainComposition addMutableTrackWithMediaType:AVMediaTypeAudio preferredTrackID:kCMPersistentTrackID_Invalid]; CMTime insertTime = kCMTimeZero; for(AVAsset *videoAsset in assets){ [compositionVideoTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, videoAsset.duration) ofTrack:[[videoAsset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0] atTime:insertTime error:nil]; [soundtrackTrack insertTimeRange:CMTimeRangeMake(kCMTimeZero, videoAsset.duration) of

Categories : IOS

Python: Get resolution of videos from streaming links
The easy way to do this is to use the web service API for each site. For example, the YouTube API lets you issue a search and get back metadata on all of the matching videos. If you look at the video, properties, you can check definition == 'hd', or you can iterate the videoStreams for the video and check whether heightPixels >= 720 or bitrateBps >= 8*1024*1024 or whatever you think is an appropriate definition for "HD" if you don't like theirs. You can find the APIs for most sites by just googling "Foo API", but here are links for the ones you asked about: Daily Motion Metacafe: I can't find the API docs anymore, but it's just simple RSS feeds. YouTube The hard way to do this is to write a universal video downloader—which is very, very hard—and process the file with someth

Categories : Python

Android-how to show the videos in grid view using video url string
I have a database which contains list of image and video path. This works fine for me public class GridGallery extends Activity { ArrayList<String>list; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.grid_gallery); DataModel dbModel = new DataModel(this); list = dbModel.selectAll(); GridView sdcardImages = (GridView) findViewById(R.id.sdcard); sdcardImages.setAdapter(new ImageAdapter(this)); } /** * Adapter for our image files. */ private class ImageAdapter extends BaseAdapter { private final Context context; public ImageAdapter(Context localContext) { context = localContext; }

Categories : Android

SUSY static grid, but with set widths according to resolution
You want to use Susy's static output. To do that, set $container-style: static;. See the docs on the official Susy site.

Categories : CSS

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++

C# Tracking mouse movement at a resolution greater than monitor resolution
My initial purposed solution did the trick. On trackingEnabled I center the mouse and check how much it has moved every 100ms, after that I recenter it and send the data to my controller. using System; using System.Timers; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using PIC18F_Servo_Control_V2; namespace FSI_Grid1 { public partial class Form1 : Form { TabControl LeftControlTab; System.Timers.Timer myTimer; public delegate void UpdateStatusBarDelegate(); TabPage myTabPage; Grid myGrid; serialConnection myConnection; int timerDelay = 100; int initialX, initialY, currentX, currentY, minX, mi

Categories : C#

How to calculate aspect ratio resolution on any display resolution
Ok I found the solution myself. To calculate where on the screen the video with a 2,35:1 ratio is playing simply do: DisplayWidth / videoaspectratio eg: On my laptop with 1600x900 16:9 display it's: 1600 / 2,35 ~= 680 Because the video player should play it in the middle of the screen the position of the rectangle should be at: x-axis left border = 0 right border = DisplayWidth y-axis upper border: (DisplayHeight - 680) / 2 lower border: DisplayHeight - upper boarder This should work for any given screen size.

Categories : Misc

Win 8 MonoGame - Game resolution vs. screen resolution
Since Metro app's are generally full-screen by default (although they could be snapped too) you can use the following properties from the Window class: Window.ClientBounds.Width Window.ClientBounds.Height Hope that helps.

Categories : C#

Set resolution of a specific JFrame, not the computer's resolution
Graphics2D has a scale option, look after it in the Javadoc. In your case, it's simply this: public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; g2.scale(0.5, 0.5); // 50% x and 50% y // rest of rendering }

Categories : Java

IPad Retina Resolution Vs Normal Resolution
You should set it at 1024, and then target retina and higher resolution displays with device pixel ratio media queries. Read more here: http://menacingcloud.com/?c=highPixelDensityDisplays

Categories : HTML

Finding the largest resolution from set of resolution
You just need to multiply width by height to find the resolution. Note that you might not have an item having both the max width and the max height in your list. PHP extraction : // I assume your set of string is an array $input = <<<RES 1024 x 768 1280 x 960 1280 x 1024 1680 x 1050 widescreen 1280 x 800 widescreen 1440 x 900 widescreen RES; $resolutions = explode( " ", $input ); // Build a resolution name / resolution map $areas = array(); foreach( $resolutions as $resolutionName ) { preg_match( '/([0-9]+) x ([0-9]+)/', $resolutionName, $matches ); // Affect pixel amount to each resolution string $areas[$resolutionName] = $matches[1]*$matches[2]; } // Sort on pixel amount asort($areas); // Pick the last item key $largest = end( array_keys($ar

Categories : PHP

Extjs create a grid feature or grid plugin that sets a tooltip for each column in the grid
In your plugins init method, you will be able to loop through the columns of the grid (the constructor and initComponent methods of the grid will have already been called at this point). That means that you can inspect each column to see if the user has setup a custom renderer. If there is none, you can put your one, and if there is one, you can chain the existing renderer with yours. EDIT Ext.define('My.Plugin', { init: function(grid) { // You may not need the scope, but if you do, this binding will // allow to preserve the scope configured in the column... var pluginRenderer = Ext.Function.bind(this.renderer, this); Ext.each(grid.query('gridcolumn'), function(col) { var renderer = col.renderer; col.renderer = renderer

Categories : Extjs

How to use Grid inside Grid (Nested Grid) on Devexpress tools in WPF
To show a nested grid for your GridControl rows define DataRowTemplate. like this: <my:GridControl Name="dgPhotoJobs" MouseDoubleClick="dgPhotoJobs_MouseDoubleClick"> <my:GridControl.Columns> <my:GridColumn FieldName="JobName" Name="grdColumnJobName" /> <my:GridColumn FieldName="JobDate" Name="grdColumnJobDate" /> </my:GridControl.Columns> <my:GridControl.View> <my:TableView NavigationStyle="Row" ShowAutoFilterRow="True" ShowGroupPanel="False" MultiSelectMode="Row" Name="JobTableView" AllowEditing="False" Focusable="False"> <dxg:TableView.DataRowTemplate>

Categories : C#

Is merging branch A into B same as merging B into A?
No, if you merge A into B, then in the end branch A will only have A's changes, and B will have both A+B changes. If you merge B into A, then A with have both A+B changes, and B will only have B's changes. Start: /A1-A2-A3 X B1-B2-B3 A to B with a merge commit: /A1-A2-A3 X B1-B2-B3-A*(1,2,3) A to B with fast forward: /A1-A2-A3 X A1-A2-A3-B1'-B2'-B3' B to A with merge commit: /A1-A2-A3-B*(B1,B2,B3) X B1-B2-B3 B to A with fast forward: /B1-B2-B3-A1'-A2'-A3' X B1-B2-B3

Categories : GIT

High resolution timers vs low resolution timers
Typically, a low resolution timer will fire an interrupt to the processor every x amount of time (say, every 1, 5, 10, 16.6667, 17.81291 or 20ms - examples, there are many other values it could be). This is used by the OS to switch task when a task has been running for "too long" as well as maintaing current time, "timing out" waiting events, and such things (e.g. a sleep type function call would set itself to "time out" at the end of the sleep time). A high resolution timer is typically a hardware register that is continually counting [up or down]/updating at a frequency in the high KHz or higher (such as 32768Hz, 36KHz, 12MHz, 2.2GHz - these are just some examples, could be almost anything). Typically, this is used by "reading the current value", and you get whatever the current count

Categories : C++

iOS Drawing a grid view for dragging/dropping objects that snap to that grid
I would probably start with a UICollectionView, as it's going to provide a lot of flexibility for laying out your views, as well as support for animating inserting/removing views. When your user releases the view you want to insert, you'd probably need your UICollectionViewDataSource to provide a new cell at the desired location (make the cell transparent) and get its frame. Then use an animation to move the view to the cell's location, and in the animation's completion handler add it as a subview of the cell. Some handwaving pseudo-code below: UIView * viewToDrop; // your view being dropped NSIndexPath * indexPathOfInsertedCell; // figure this out... not sure exactly how you would calculate this--you might need to interrogate the UICollectionViewLayout UICollectionView * collectionVie

Categories : Iphone

Ext JS - Grid when applied with filter leaves empty/blank sections in grid
Try to refresh the Grid View after apply the filter: sencha api: refresh view gridView.refresh();

Categories : Extjs

Kendo UI MVC - Grid Correct way of using a ComboBox in a popup-mode data grid?
Perhaps this example will be useful? - http://demos.kendoui.com/web/grid/editing-custom.html That uses a DropDownList in edit mode, rather than a ComboBox, but the two controls are very similar.

Categories : C#

In Admin Grid : add hidden column to magento adim product grid
You can do this by adding 'no-display' class while adding the column. The code for this is as below: $this->addColumn('column_name', array( 'header' => 'Column Header', 'align' => 'left', 'width' => '120px', 'index' => 'column_index', 'type' => 'text', 'column_css_class'=>'no-display', 'header_css_class'=>'no-display' ));

Categories : Magento

How to use local html5 storage to save grid preferences in Kendo Grid
Found a solution. Make the grid .AutoBind(false) then $(document).ready(function () { storageLoaded = true; $("#Grid").data("kendoGrid").dataSource._pageSize = storage.pageSize; $("#Grid").data("kendoGrid").dataSource.read(); }); now this is making use of an _ variable inside the datasource which could break at any point in the future, but for now it does work. I removed the databound event completely, a friend at Telerik was most helpful in getting me to the solution. Hoping that in the future there will be something like: .Pageable(page=> page.PageSizes(true).Refresh(true).Sticky("gridPageSizeDefault") which will store the value in html5 local storage using the gridPageSizeDefaultkey.

Categories : Kendo Ui

How do I create a grid command in kendo UI that executes and returns an Ajax response which updates the grid
Look at this sample on the Kendo UI Demos. Basically if you want to emit a custom button or something else that runs some code that does Ajax, you're going to have to dive into some JavaScript most likely. .Toolbar(tb => tb.Template(@<text> <button onClick="return importExchangeRates();">Import exchange rates from ECB</button> </text>); Then in your scripts (client-side): function importExchangeRates() { // perform Ajax request here, refresh grid in success handler var grid = $("#exchangeRateGrid").data("kendoGrid"); // return false to prevent button doing silly things with the page in some browsers return false; } I worry that you might be wanting two different data sources for this grid, just from the way you have worded things. If s

Categories : Asp Net Mvc

In a grid change the Selected Item Model properties but it should not reflect back in the grid unless user saves it
Instead of having a designated property in your view model for the selected item, in your xaml that displays the grid you can use something like this: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplication3" xmlns:i="http://schemas.microsoft.com/expression/2010/interactions" xmlns:ie="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="WpfApplication3.MainWindow" x:Name="MyMainWindow"> <Grid> <DataGrid x:Name="myGrid" ItemsSource="{Binding myItems}"> &l

Categories : Wpf

KendoUI grid edit popup, how to hide field in grid
Add to the column definition in the grid the attribute hidden and set it to true columns : [ { field: "Id", width: 90, hidden: true }, { field: "FirstName", width: 90, title: "First Name" }, { field: "LastName", width: 90, title: "Last Name" }, { field: "Title", width: 90, title: "Title", hidden: true }, { field: "Age", width: 50 } ]

Categories : Kendo Ui

Kendo UI Grid: Method "removeRow" deletes all events of the grid
Please try with the below code snippet. VIEW <script> function gridDataBound(e) { var grid = $("#Grid").data("kendoGrid"); grid.tbody.find(">tr").click(function () { $("#divTest").html('Row Index Clicked :' + $(this).index()); }); } function DeleteRow(obj) { var rowToDelete = $(obj).parent().parent() var grid = $("#Grid").data("kendoGrid"); grid.removeRow(rowToDelete); } </script> @(Html.Kendo().Grid<MvcApplication1.Models.TestModels>() .Name("Grid") .Columns(columns => { columns.Bound(p => p.ID); columns.Bound(p => p.Name); columns.Template(@<text></text>).ClientTemplate("<input type='button' class='k-button' value='Delete' onclick='DeleteRow(this);' />"); }) .Pageable() .Sortable() .Filterable

Categories : Kendo Ui

How to draw a simple grid/grill in the background using the R package 'grid'?
I initially thought you needed baseViewports(), but it looks like par("usr") gives you enough information to set up a grid viewport with the coordinates system corresponding to the axes. Note that log scales require extra care. I still think this is a bad idea; it will probably break as soon as you place non-trivial base graphics. One is usually much better off not mixing the two systems. require(grid) require(gridBase) bgGrob <- function(v, h, gp=gpar(fill="grey90", col="red"), vp=NULL, def="native") grobTree(rectGrob(), segmentsGrob(v, unit(0, "npc"), v, unit(1, "npc"), def=def), segmentsGrob(unit(0, "npc"), h, unit(1, "npc"), h, def=def), vp=vp, gp=gp) grid.bg = function(...) grid.draw(bgGrob(...)) ## data x <- 1:10 y <- rev(x) ## layou

Categories : R

How to Set Grid View Header Text As I Am Attaching list to Grid?
Try it <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"> <Columns> <asp:BoundField DataField="YourColumnDataField" HeaderText="item"/> </Columns> </asp:GridView>

Categories : C#

Refreshing parent Kendo MVC Grid when Child grid updated
I cracked it in the end. The Event needs to be on the dataSource, using the Sync event, not on the grid itself. Short version .DataSource(dataSource => dataSource .Ajax() .Model(model => { model.Id(d => d.BillId); model.Field(d => d.BillId).Editable(false); }) .Events(events => { events.Error("error_handler"); events.Sync("resyncParentGrid"); }) <script> function resyncParentGrid(e) { var parentData = $('#BillParentsGrid').data("kendoGrid"); parentData.dataSource.read(); } </script> Full Version @(H

Categories : C#

creating two grids one besides other each grid having each grid with two columns using dojo.
Have you tried to setup two different grids into two different Nodes. Example: <div id="emp1"> insert grid1</div> <div id="emp2">insert grid2</div> Make two diffrent stores for the Grids and startup both seperatly. Regards

Categories : Misc

How to find all the grid points between two grid point in Matlab
Finding all places on a grid that are in a straight line between two points simply requires you to use a line drawing algorithm, such as http://en.wikipedia.org/wiki/Bresenham's_line_algorithm . In MatLab this can be implemented by using the function given here http://www.mathworks.com/matlabcentral/fileexchange/28190-bresenham-optimized-for-matlab/content/bresenham.m Developed by Aaron Wetzler.

Categories : Matlab

Background colors in devexpress grid - winforms grid
The RowStyle event is already raised for each row - http://documentation.devexpress.com/#WindowsForms/DevExpressXtraGridViewsGridGridView_RowStyletopic RowStyleEventArgs e (e.RowHandle) can also be negative when dealing with RowGroups http://documentation.devexpress.com/#WindowsForms/CustomDocument695 Each iteration of your loop was using e.RowHandle without checking for negative values - which was changing the back color of the entire column. I modified your code below to a version that produces an alternating row color pattern on even rows based on the ID column. private void dataGrid_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e) { if (e.RowHandle >= 0) { ColumnView View = dataGrid.MainView as ColumnView;

Categories : C#

How can I create a command by using Grid.RowDefinitions and Grid.ColumnDefinitions
You could always use a User Control and a Content Presenter: http://msdn.microsoft.com/en-us/library/system.windows.controls.usercontrol.aspx http://msdn.microsoft.com/en-us/library/system.windows.controls.contentpresenter.aspx Just create a user control in WPF and put your grid inside it. Then instatiate it like a class from the Main Window and set the Content Presenter's source to the User Control. So: UserControl UserControl1 = new UserControl(); ContentPresenter1.Content = UserControl1; That's just the method I favor as you can have any number of controls in a user control which makes it easy to expand upon and add to your grid later.

Categories : C#

Select a row in extjs grid without moving the focus to that grid
One solution would be a bit of a work around but should do the trick. In whatever event kicks off the grid selection, select the rows you want then return focus to the field in question using: myField.focus() or this.focus()

Categories : Extjs

Kendo ASP.NET MVC Grid and WebAPI - Data does not show up in grid
Your configuration of the datasource is incorrect. The Kendo UI documentation can be hard to follow, but this is how you need to define a datasource: var dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://<remoteserver>/<apicontroller>/<actionMethod>", dataType: "json", data: { customerFilter: "AAAA", topFilter: "10" } } }, schema: { model: { fields: { Customer: {}, Office: {} } } } };

Categories : Asp Net Web Api

ffmpeg get value from cropdetect
cropdetect outputs to the console, so you can parse the output and then use it as a variable: ffmpeg -i input -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1 This will result in something like: crop=640:480:0:50 Then run your actual crop command: ffmpeg -i input -vf $cropvalue,scale=240:-1 -vframes 1 -qscale:v 2 output.jpg -vcodec mjpeg, -an, and -f rawvideo are superfluous Use -qscale:v to control jpg output quality. A sane range is 2-5 (a lower value is a higher quality). Use the scale filter instead of -s; especially if you're already using filters. Also the scale filter will allow you to set a specific width or height and with -1 it will automatically provide the correct value to preserve aspect. Otherwise if you try to force a specific size

Categories : PHP

How to add album art with ffmpeg?
With Recent version, ffmpeg -i out.mp3 -i test.png -map 0:0 -map 1:0 -c copy -id3v2_version 3 metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3 Use -map to associate input stream to the output Use -c copy to directly demux/remux The -id3v2_version 3 is what is missing in your command line. Note that that wil write an IDV2.3 but you can ask for a 2.4 (-id3v2_version 4) with the -id3v2_version 3 option the -metadataoption will be well interpreted

Categories : PHP

ffmpeg + glfwGetTime()
You added the time the decoding needs to decode the Image to the 40ms you have to wait for displaying the next. This error is because you measure the time again at the end of your loop. instead of: } tiempo = glfwGetTime(); } write: } tiempo+=duraction; }

Categories : C++



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