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

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

Creating Subtitles with video hosted on Vimeo server
Customized player with vimeo is pseudo-impossible, but you can use subtitles with the follow link. Your welcome: https://github.com/Yomguithereal/vimeo-srt

Categories : Javascript

How to render a watermark with transparency into a video
The answer to my question is simple, though it took me a day to find it. The "normal" ffmpeg that comes with the repository of my Ubuntu distro complained about the "c: v libx264" parameter. avconv knows that parameter but is buggy; it just doesn't render transparent images. The solution was as simple as installing the very latest ffmpeg version (i choosed the static version). Now it works like a charm. :)

Categories : Misc

VideoJS player not loading .webm video file for Firefox (throws "Video Error". Works when no other video sources (like mp4/mov) are provided
It seems mov videos are not supported by HTML5 Firefox implementation, I get this error: Specified "type" attribute of "video/mp4" is not supported. Load of media resource http://dev.muzioapp.com.s3-website-us-east-1.amazonaws.com/content/ourMuzeVid1.mov failed. The explanation about this (maybe) confusion is here: http://stackoverflow.com/a/5080583/208067 When the video is not embedded as a html5 video, Firefox looks for a suitable plugin to play the video and finds QuickTime. The video tag does not.

Categories : HTML

video set to "true" in Skype video chat URI, but video is not enabled when call starts
I see you've figured out that there seems to be a problem with video call in the newest versions of Skype for android and ios. Maybe the new apps treat video calls as a conference call even if it's a 1 to 1 call (which isn't supported as stated in the skype api/uri doc), I suggest you report this problem to MS through for example appstore (not sure if there's similar possibility to do so in google play?) and mention the same bug happens on android. If you need something to work ASAP while waiting for MS to fix the bug I'll suggest a solution but it might not be worth the time you'll need to spend in order for a working implementation. But I'll leave that up to you to consider. What you could do is send an message (or just do a regular call) to the remote sentry with an unique message ie

Categories : Android

IE10 not playing a video when using the
When you paste the URL to your browser it doesn't use HTML5 player anymore, so it doesn't say that it is really a supported file; only that the file path should be valid. According to wikipedia, IE10 supports (not only) H.264 for video and AAC for audio - these are very common formats for mp4 container. Chrome's support is much wider (video- and audio-wise). The problem is that the Intro.mp4 file might have different formats altogether (the file could by just renamed or created using unsupported formats). I'd look into the file using properties->details or third party programs (for example Media Info). I don't think it is IE10's issue. The only similar one I've found is when the user was too specific using unsupported format of used codecs ([...] type='video/mp4; codecs="H.264, AAC"'

Categories : HTML

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

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

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

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

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

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

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

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

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

How to encode Bitmaps into a video using MediaCodec?
The output of MediaCodec is a raw H.264 elementary stream. I've found that the Totem media player for Linux is able to play them. What you really want to do is convert the output to a .mp4 file. (Update:) Android 4.3 (API 18) introduced the MediaMuxer class, which provides a way to convert the raw data (plus an optional audio stream) to a .mp4 file. The layout of data in the ByteBuffer is, as of Android 4.3, device-dependent. (In fact, not all devices support COLOR_FormatYUV420Planar -- some prefer a semi-planar variant.) I can't tell you the exact layout without knowing your device, but I can tell you that it wants uncompressed data, so passing in compressed PNG data is not going to work. (Update:) Android 4.3 also allows Surface input to MediaCodec encoders, so anything you can re

Categories : Android

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

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 decode JPEG's and encode video in python?
I would suggest to leave image/video conversion to specialised tools like FFMPEG (there is a nice recipe for your task on that link) and call it from your script.

Categories : Python

Java Encode BufferedImages into video file (mp4)
package org.tkassembled.xuggle; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import java.util.concurrent.TimeUnit; import javax.imageio.ImageIO; import com.xuggle.mediatool.IMediaWriter; import com.xuggle.mediatool.ToolFactory; import com.xuggle.xuggler.ICodec; public class ManualVideoCompile { private static Dimension screenBounds; public static int indexVideo = 1; private static final double FRAME_RATE = 50; private static final int SECONDS_TO_RUN_FOR = 20; private static final String OUTPUT_FILE = "C:/video/today.mp4"; public static void main(String[] arguments) { final IMediaWriter writer = ToolFactory.makeWriter(OUTPUT_FILE); screenBounds = Toolki

Categories : Java

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

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

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

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

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

How to add Subtitles to Youtube video using Youtube API?
Google are calling them "captions" and API section is called YouTube API v2.0 – Captions. Please note the following requirements for executing caption-related API operations: Captions are only available for API version 2. Captions for a video can only be created, retrieved, modified and deleted by the owner of that video. To perform these operations for a video, you must submit authenticated API requests for which the video's owner is the logged-in user. Accordingly, API requests for caption operations must contain a properly formatted Authorization header. Requests to create (POST), update (PUT) or delete (DELETE) captions must identify your developer key using either the X-GData-Key request header or the key request parameter. That means, that you can a

Categories : Javascript

Why would an iPad not render HTML5 video inline, though the video is viewable when I go to the address of the file?
It turns out that iOS does not like when you insert your own controls with JavaScript AND doesn't like it when you autoplay videos. When I turned those features off (using a poster instead), everything worked as expected.

Categories : IOS

HTML5 video fallback - can't play video files in flash player locally
If it's only for local access, you must choose in the FLA's Publish Settings the Option Access local files only for Local playbac security. For more information: http://www.senocular.com/pub/adobe/Flash%20Player%20Security%20Basics.html

Categories : HTML

Open native video player (full screen) when video is pressed in a WebView
The question got a little sideways at the end, but I'll respond to the base question. 1.) "I need to open a native video player any time a user clicks on a video" Verify the link is a video, and fire an intent for ACTION_VIEW, Here's an example: public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.endsWith(".mp4")) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); startActivity(intent); return true; } else view.loadUrl(url); return false;

Categories : Android

upload video clips display video thumb images not working? php
In my opinion you are using wrong thumbnail dimensions. Please echo <?php echo $th_width ." ".$th_height; //check their values what are you getting //before to call following function $im_new = imagecreate($th_width,$th_height); ?>

Categories : PHP

minimizing the video file size when capturing a video in windows phone 8
To reduce the video size we can make the resolution as much low.The code VideoCaptureDevice webcam = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice(); int videoformatcount = webcam.SupportedFormats.Count(); //We will get the avilable video format if (videoformatcount > 0) { var Temp = webcam.SupportedFormats; VideoFormat objVideoFormat = Temp[videoformatcount - 1]; webcam.DesiredFormat = new VideoFormat(PixelFormatType.Format8bppGrayscale, objVideoFormat.PixelWidth, objVideoFormat.PixelHeight, 1); } captureSource.VideoCaptureDevice = webcam; It will help you.The video must be in very low resolution(Available).

Categories : Vb.Net



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