w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Slideshow with video and images using Videojs and Flexslider
I have already fixed the problem. I need it to create a function that actually stops the video before the next slide appears. Here is the code: var myPlayer = videojs("example_video_1"); $(document).ready(function() { $('#testSlider04').flexslider({ animation: "slide", //String: Select your animation type, "fade" or "slide" animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end slideshow: false, //Boolean: Animate slider automatically slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds initDelay: 0, /

Categories : Jquery

Why needs DataContractSerializer alphabetically sorted XML?
It's normal. The datacontract will describe the xml schema for the soap message. The DataContractSerializer use arbitrarily alphabetic order. You could change the order by specifying it : [DataMember(Order = 1)] public int MyProperty { get; set; } Why does it necessary to specify the order? I don't have time to read the SOAP RFC but I think it's normalize. And if we think about it, it's logic for speed and size optimization. DataContract specify the null by not writing any xml for null property value. And imagine if you have an object with 200 properties you have to read all the xml to determine if the property is null. If you have an xml schema that ordered element it's faster. I hope that what I have had to say has contributed to a better understanding.

Categories : C#

alphabetically sorted binary search tree in c?
This line is wrong: temp->data[20] = word[20]; It copies a single character from one invalid location to another. Change it to: strcpy(temp->data, word); since you want to copy a string. Also this line looks wrong: printf("%3d ",treePtr->leftPtr); I'm guessing you want to print the contents of the data string here, so it should be: printf("%s ", treePtr->data); or if you want the integer count element it would be: printf("%d ", treePtr->count);

Categories : C

trying to add seperator in alphabetically sorted list wen first letter will change
Try this: $result = mysqli_query($con,"SELECT * FROM pages order by name ASC"); $lastChar = "?"; //initialization foreach($result as $val){ if($lastChar != $val['name'][0]){ echo $val['name'][0].'<BR>'; //separator } echo $val['name']."<br>"; echo "<hr></hr>"; $lastChar = $val['name'][0]; //update }

Categories : PHP

Color/Line labels are being sorted alphabetically in ggplot. How to avoid?
Your problems are because this is not how things are done in ggplot2. If you are ever using [ inside of aes() that's a sure sign that you're doing it wrong. Instead of three separate calls to a single geom, we melt a data frame and then map variables to aesthetics. dat <- read.table(text = " id A B C 1 1 0 26 44 2 2 0 0 0 3 3 0 0 46 4 4 26 22 0 5 5 16 0 0 6 6 0 0 30",header = TRUE,sep = "") require(reshape2) datm <- melt(dat,id.vars = 'id') datm$variable <- factor(datm$variable,levels = c('C','A','B')) ggplot(datm) + geom_line(aes(x = id,y = value,colour = variable,linetype = variable)) I've used geom_line here because your sample data was too small to use geom_smooth, but it works the same way. Once you've melted your data, you control the or

Categories : R

How to get video frames from mp4 video using ffmpeg in android?
compile ffmpeg.c and invoke its main() via jni. For more details see how to Use FFMPEG on Android . Also refer this github project. And this tutorial too will help you. I hope this will help you.

Categories : Android

How in Dart Editor perform operation "Outline File" (Alt+O) with results sorted alphabetically instead of unsorted order?
You can open the Outline pane by clicking Tools -> Outline. In the Outline pane there is an "A-Z" button that will toggle between sorting the members in natural order and alphabetical order.

Categories : Dart

PHP - Rename files in directory after sorting them alphabetically
I wouldn't recommend that way to sort images, it is both inefficient and as I understand, if people keep sorting, you will end up with long and clumsy file names. Do you have access to a database? You could have a table there which maps indexes to file names which allow you to sort by changing the indexes of a table entry.

Categories : PHP

Watermark in video with ffmpeg Center-Top
ffmpeg -i input1 -i input2 -filter_complex "overlay=main_w/2-overlay_w/2" out Use -filter_complex when you have multiple inputs and or outputs; this option also allows you to omit the movie source filter. See the overlay video filter documentation for more info.

Categories : PHP

using ffmpeg to display video on iPhone
You should not be using ffmpeg in an iOS for a number of reasons. First, there are real license issues that put including ffmpeg in a legal grey area when it comes to iOS apps. Second, performance will be very very poor. Third, iOS already includes APIs that have access to the h.264 hardware on the device. You can find my example Xcode project at AVDecodeEncode, this is an example of using my library to decode from h.264 and then encode back to h.264.

Categories : Iphone

ffmpeg + play video loop
From documentqtion lavf_decoding.html#ga4fdb3084415a82e3810de6ee60e46a61">http://ffmpeg.org/doxygen/trunk/group_lavf_decoding.html#ga4fdb3084415a82e3810de6ee60e46a61 0 if OK, < 0 on error or end of file so if <0 then call av_seek_frame to return to start (same doc)

Categories : C++

Video Trimming via ffmpeg twice crash
Your problem may be related to discussion here The linked thread is old but symptom there was that android/JNI call to ffmpeg worked first time but not the second time. As noted in the thread, the solution is to explicitly unload/load the library in between successive calls to ffmpeg. you could try it.

Categories : Android

Video player for OS X (QTKit, ffmpeg)
You can easily compile ffmpeg by regular "./configure && make" and add built static libraries into your xcode project. More sophisticated approach is to create xcode projects for each ffmpeg library (libavcodec/format/util/etc) and add them as nested projects. It is posible to add external codecs to QTKit? Check Perian project: http://trac.cod3r.com/perian/browser http://perian.org/

Categories : Osx

Readdir images from subdirectories and SORT alphabetically?
Sort after read all, not in recursive steps function ListFiles($dir) { if($dh = opendir($dir)) { $files = Array(); $inner_files = Array(); while($file = readdir($dh)) { if($file != "." && $file != ".." && $file[0] != '.') { if(is_dir($dir . "/" . $file)) { $inner_files = ListFiles($dir . "/" . $file); if(is_array($inner_files)) $files = array_merge($files, $inner_files); } else { array_push($files, $dir . "/" . $file); } } } closedir($dh); // -- SORTING the FILES -- //sort($files); return $files; }

Categories : PHP

FFmpeg - C - Encoding video - Set aspect ratio
to set the output aspect ratio, you can use the `-aspect' option, see ffmpeg documentation. -aspect[:stream_specifier] aspect (output,per-stream)’ Set the video display aspect ratio specified by aspect. aspect can be a floating point number string, or a string of the form num:den, where num and den are the numerator and denominator of the aspect ratio. For example "4:3", "16:9", "1.3333", and "1.7777" are valid argument values. If used together with ‘-vcodec copy’, it will affect the aspect ratio stored at container level, but not the aspect ratio stored in encoded frames, if it exists.

Categories : C

ffmpeg Getting image or thumbnail from video error
You did not give ffmpeg a name :-) So you tried to execute a \bin folder ! $ffmpeg = "C:\Ffmpeg\ffmpeg-20130605-git-3289670-win64-static\bin"; you forget ffmpeg.exe $ffmpeg = "C:\Ffmpeg\ffmpeg-20130605-git-3289670-win64-static\bin\ffmpeg"; I do it for a .avi with following command ffmpeg -i Echo2012.avi -r 1 -s 1024x576 -f image2 -vframes 1 foo-001.jpg Don't execute your command twice ! $command = "$ffmpeg -i $video -an -ss $second -s $size -vcodec mjpeg $image"; echo $command; shell_exec($command); if(shell_exec($command)){ EDIT : your command string : ffmpeg -i upload.tmp -an -ss 12 -s 150x90 -vcodec mjpeg manu.jpg -vcodec codec (output) : Set the video output codec. It's a switch for a output video. You want as output an image. -an : You can disable Audio

Categories : PHP

C api on capturing video stream from webcam using ffmpeg
You are basically repeating the question you are referring to. FFmpeg is basically the name of the library and the ready to use tool (command line interface). Its back end is a set of libraries: libavcodec, libavformat, swscale etc. There is no comprehensive documentation on these libraries, instead there are samples, there is mailing list and other sparse resources. Also, the libraries are open source and all these are quite usable once you get the pieces together. Specific questions on ffmpeg are asked/answered on StackOverflow as well.

Categories : C

Using ffmpeg to watermark a capturing video on Android
Here is an example, how to capture a webcam video on my Windows system and draw a counting timestamp. To list all devices that can be used as input : ffmpeg -list_devices true -f dshow -i dummy To use my webcam as input and draw the timestamp (with -t 00:01:00 1 minute is recorded): ffmpeg -f dshow -i video="1.3M HD WebCam" -t 00:01:00 -vf "drawtext=fontfile=Arial.ttf: timecode='00:00:00:00': r=25: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000000@1" -an -y output.mp4 The font-file Arial.ttf was located in the folder I was with the terminal in. (Source : http://trac.ffmpeg.org/wiki/How%20to%20capture%20a%20webcam%20input and http://trac.ffmpeg.org/wiki/FilteringGuide) I hope it may help. Have a nice day ;)

Categories : Android

Android encode video with ffmpeg while it is still recording
Your real time requirement may lead you away from ffmpeg to webrtc and or to html5. some resources; http://dev.w3.org/2011/webrtc/editor/getusermedia.html (section5) https://github.com/lukeweber/webrtc-jingle-client ondello .. they have api rather than going native and trying to get at the video stream or getting at the framebuffer to acquire an xcopy of what is in the video buffer, and to then duplicate the stream an manage a connection (socket or chunked http), you may want to look at api type alternatives....

Categories : Android

Convert Video in html5 with ffmpeg on aruba
If ffmpeg is installed then you should able to convert using ffmpeg on your server. Logon, change to the directory video1.mpg is located and run: fmpeg -i video1.mpg video.m4v

Categories : Misc

Concat video files of different resolutions using FFmpeg
For merging videos you need to work with the same resolution, you should scale the 640x480 video or compress the 1280x720, it is up to you. I would recommend you compress the bigger one it is faster. Moreover, for merging videos you need a media file with audio and video part. You can create a silence audio with the same duration of your video and after you can add it to your video. Videos should be merged with audio. ffmpeg -ar 48000 -t 60 -f s16le -acodec pcm_s16le -i /dev/zero -ab 128K -f mp2 -acodec mp2 -y silence.mp2 ffmpeg -i video_without_audio.mpg -i silence.mp2 video_to_merge.mpg

Categories : Android

can i use ffmpeg with actionscript to convert a webcam video flv into mp4?
The only option i can think of is to use Air and Nativeprocess as described here http://www.purplesquirrels.com.au/2013/02/converting-video-with-ffmpeg-and-adobe-air/ Otherwise I'm afraid this cannot be done unless someone does a port of FFMPEG to flash. The easiest way to do the video conversion you mention is to install FFMPEG on a server, send a request, and get the result back later.

Categories : Actionscript

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

Fastest way to extract a specific frame from a video (PHP/ffmpeg/anything)
Of course you could code up some C/C++ and link to -lav*, basically creating a simplified version of ffmpeg just for extracting frames, and maybe even do it as a php extension (also I wouldn't run it as the same user, let alone in the same process). But the result is very unlikely to be faster, because you would only avoid some forking and setup overhead, but your likely problem is actually the decoding, which would still be the same. Instead, you should first look into using ffmpeg in fast seeking mode (or fast/accurate hybrid mode). Their wiki states about fast seeking: The -ss parameter needs to be specified before -i: ffmpeg -ss 00:03:00 -i Underworld.Awakening.avi -frames:v 1 out1.jpg This example will produce one image frame (out1.jpg) somewhere around the third min

Categories : PHP

how to change the frame rate for a part of video using ffmpeg
Found a software named openshot.It perfectly matched my requirements. It is built over ffmpeg. I guess this is the best video editing and mixiing tool in linux for lame users. It can help us doing things very fast.

Categories : Ubuntu

how to get width/ height of video file using S3FS, FFMPEG in ec2
I would like to recommend to take a look at the new project RioFS (Userspace S3 filesystem): https://github.com/skoobe/riofs. This project is “s3fs” alternative, the main advantages comparing to “s3fs” are: simplicity, the speed of operations and bugs-free code. Currently the project is in the “testing” state, but it's been running on several high-loaded fileservers for quite some time. We are seeking for more people to join our project and help with the testing. From our side we offer quick bugs fix and will listen to your requests to add new features. Regarding your issue, RioFS is able to read "requested" blocks of files, for example I tried to get properties of a video file stored on S3: Mounted RioFS: ./riofs -c ../riofs.conf.xml http://s3.amazonaws.com bucket_nam

Categories : Amazon

Android FFMPEG command line for video filter
Your ffmpeg build is too old to support the curves video filter with presets. Presets were added on 2013-03-25 (lavfi/curves: add presets support) bumping libavfilter to version 3.48.103. You will need to update your ffmpeg.

Categories : Android

How to split accurately a LONG GOP video (h264/XDCAM...) with FFMPEG?
Please refer to the ffmpeg documentation. You will find an option -frames. That option can be use to specify for a given input stream (in the following the stream 0:0 is the 1st input file, first video stream) the number of frame to record. That option can be combined with other options to start somewhere in the input file (time offset, etc ....) ffmpeg -i intput.ts -frames:0:0 100 -vcodec copy test.ts that command demux and remux only the first 100 frame of the video (no re-encoding). as said you can combine it with a jump. Using ' ‘-ss offset (input)’ ' you can specify a "Frame Accurate" position ie. frame 14 after 1min10seconds = 0:1:10:14. that option should be use before the input like below. ffmpeg -ss 00:00:10.0 -i intput.ts -frames:0:0 100 -vcodec copy test.ts ffmpeg dis

Categories : Bash

ffmpeg generate thumbnail with aspect ratio, but X seconds into video
You can do that with a command line similar to: ffmpeg -i inputVideo -vf scale='min(300,iw)':-1 -ss 00:00:05 -f image2 -vframes 1 thumbnail.jpg So in your script, add -vf (video filter) before scale and reorder input and output parameters like below: $cmd = "/usr/local/bin/ffmpeg -i ".$this->getUploadRootDir()."/".$fname." -vf scale='min(300, iw):-1' -ss 00:00:5 -f image2 -vframes 1 ".$this->getUploadRootDir()."/thumb_".$output;

Categories : PHP

Unable to concatenate video files using FFMPEG, Paperclip, Rails
thanks for the reply :) There is no error message, I have the ffmpeg command in the segment.rb file, I am not even sure if that is the right place? In segment.rb I have class Segment < ActiveRecord::Base attr_accessible :name, :source_video, :the_other_video has_attached_file :source_video has_attached_file :the_other_video end def append_to_video(the_other_video, output_file) system "ffmpeg -i concat: "#{the_other_video.source_video.path} | #{self.source_video.path}" -c copy #{output_file}" end for _form.html.erb <%= form_for(@segment) do |f| %> <% if @segment.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(@segment.errors.count, "error") %> prohibited this segment from being saved:</h2> <ul> <

Categories : Ruby On Rails

recording live video stream from tv card using ffmpeg in windows
First be sure that the video label you use is really the label return by: ffmpeg -list_devices true -f dshow -i dummy More info here But another solution should be ti use the old "Video For Windows" (VFW). To try that, list your device with: ffmpeg -y -f vfwcap -i list And use your device number as value of the -ioption: ffmpeg -y -f vfwcap -r 25 -i 0 out.mp4 And if finally you are able to record your stream, there is different options, but in your case everything is clear describe here ffmpeg -y -f vfwcap -r 25 -i 0 -f image2 -vf fps=fps=1 out%d.jpg

Categories : Windows

Encode x264 video with ffmpeg for Android with starting offset
Upgrading to ffmpeg 1.2.1 fixed the compatibility issue. After that, my Android phone was able to play the videos just fine. The -ss option is trickier than it at first looks. It has a different meaning based on whether it is before or after -i. It turns out, to make it work, you have to use both. You put the main offset before -i, which makes ffmpeg skip to that point in the stream. But, then you also need a small non-zero offset AFTER -i to make it seek to that point within the stream so audio and video will be in sync. For reference, the final working command is: ffmpeg -ss 00:03:52.00 -i in.mp4 -ss 0.1 -t 01:28:33.00 -c:v libx264 -preset medium -crf 20 -maxrate 400k -bufsize 1835k -c:a libvorbis -sn out.mkv

Categories : Android

How to find duplicates in a std::vector and return a std::list of them sorted alphabetically without duplicates in that resulting list
Edit In response to comment: Remove duplicates function name is misleading, it is actually trying to return a list of words that are repeating in the sequence, but that result list only has one copy of each duplicate – user2624236 10 hours ago I hinted std::sort + std::adjacent_find(... std::equal_to<>). Here's the realization of that: template <typename C, typename T = typename C::value_type> std::list<T> adjacent_search(C input) { std::sort(begin(input), end(input)); static const auto eq = std::equal_to<T>{}; static const auto neq= std::not2(eq); std::list<T> dupes; auto end_streak = begin(input); auto dupe_at = std::adjacent_find(end_streak, end(input), eq); for(auto end_streak=begin(input); (dupe_at = st

Categories : C++

Is android ffmpeg library able to play video located in the assets folder
Assets are read-only parts of your APK, and there is no way another APK can access these assets. You can use the native Android classes to play the video(s) you embed in your APK (use mp4 format). If you insist on ffmpeg-assisted playback, you can unpack the asset to private file, or you should write your io handlers for ffmpeg that will use AAsset_read().

Categories : Android

HTML5 video not playing in a bxSlider slideshow on iOS (possibly caused by fitvids.js)
Wrap your second video tag in 'li' tag and take it inside of that 'ul' tag. <ul class="bxslider"> <li> <video width="100%" height="300" id="video1" controls preload="auto"> <source src="http://dev.kirnauskis.com/kirnauskis/design-update01/wp-content/uploads/2013/06/Becel_15s.mp4" type="video/mp4"> <source src="http://dev.kirnauskis.com/kirnauskis/design-update01/wp-content/uploads/2012/10/Becel_15s_120822b.webm" type="video/webm"> <source src="http://dev.kirnauskis.com/kirnauskis/design-update01/wp-content/uploads/2012/10/Becel_15s_120822b.ogv" type="video/ogg"> </video> </li> <li> <video width="100%" height="300" id="video1" controls preload="auto"> <source src="

Categories : HTML

How can i set that the ffmpeg.exe will work as process from the directory i run my application exe file?
Is ffmpeg.exe stand-alone without needing a bunch of additional support files? If so, one option would be to simply copy this executable into your project and deploy it on compilation. Then, a copy always exists in your deployment.

Categories : C#

Turning Lighbox images, into a slideshow
For example, you can add "Next" and "Prev" link and simulate click on next/prev image: <ul> <li><a href="#" class="lightbox">Photo 1</a></li> <li><a href="#" class="lightbox">Photo 2</a></li> <li><a href="#" class="lightbox">Photo 3</a></li> <li><a href="#" class="lightbox">Photo 4</a></li> </ul> <div id="menu" style="display:none;"> <a href="#" id="prev">&laquo; Prev</a> <a href="#" id="next">Next &raquo;</a> </div> $('.lightbox').click(function(){ $('.lightbox').removeClass("active"); $(this).addClass("active"); $('#menu').show(); }); $('#next').click(function(){ var img_index = $('.lightbox.active').index('.

Categories : Jquery

Using fbi as slideshow causes portrait images to autorotate
I know this issue is a little old, but I've been running into this issue as well and think I found the solution this morning. I think it has to do with the EXIF data rotate flag. From what I understand, all programs can handle this flag differently, or not even acknowledge it. So I believe the solution is to rotate the images and save them that way ignoring the EXIF data. I plan on doing it using a windows program I found located here: http://www.makeuseof.com/tag/are-your-iphone-photos-refusing-to-rotate-in-windows-explorer-here-is-the-solution/

Categories : Linux

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

Use Named Pipe (C++) to send images to FFMPEG
I'm doing the same thing but with normal pipe, not named one. My code is working great. Hope it helps #include <stdio.h> #include <iostream> #include <iomanip> using namespace std; int main(int argc, char **argv) { FILE *pPipe; long lSize; char * imgdata; int imgcols = 640, imgrows = 480, elemSize = 3; imgdata = ...; stringstream sstm; sstm << "/usr/local/bin/ffmpeg -y -f rawvideo -vcodec rawvideo -s " << imgcols << "x" << imgrows <<" -pix_fmt rgb24 -i - -c:v libx264 -shortest my_output.mp4"; if ( !(pPipe = popen(sstm.str().c_str(), "w")) ) { cout << "popen error" << endl; exit(1); } // open a pipe to FFmpeg lSize = imgrows * imgcols * elemSize; // write to

Categories : C++



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