FAQ Database Discussion Community


Can't execute exec command (php / windows / ffmpeg)

php,windows,ffmpeg,exec,command-line-interface
I'm trying to run this command that does work in cli ffmpeg -i tmp1.flv -c:a copy -vf drawbox=:x=0:y=0:color=invert:t=2 output1.flv I was able to run only ffmpeg -version by php. $res = exec("C:\\wamp\\www\\ffmpeg\\bin\\ffmpeg.exe ffmpeg -version"); Location of tmp1.flv file: C:\wamp\www\tmp1.flv When I'm running $res = exec("chdir") => C:\wamp\www\ How can I...

FFmpeg take screenshots from videos with variable duration

ffmpeg
I have bunch of videos which are rather long, so I take screenshots of 10th second (-ss 00:00:10). Sometimes videos are very short, like 5 seconds, and -ss 00:00:10 fails. I don't have an option to compute video size as don't have an option to download them whole (videos are...

Seek and pause video stream from ffserver

ffmpeg,video-streaming,ffserver
I managed to successfully feed ffserver from ffmpeg. ffmpeg takes input as PIPE: ffmpeg -loglevel fatal -f image2pipe -re -vcodec png -i - -vcodec libx264 http://localhost:8090/%s.ffm External java process generates svg/png images and pushes to ffpmepg My ffserver config allows me to buffer live feeds in ffm file without defining...

Debugging an MP4 opened by VLC but not by ffplay

video,ffmpeg,mp4,vlc
I'm writing a code which creates MP4 files. To check it I've created an MP4 file. The file is played correctly by VLC and Firefox, but not by ffplay or by Chrome. I guess the file contains error which VLC can cope with but more aggressive MP4 reader cannot. I've...

Adding simple xor encryption in ffplay

c,encryption,ffmpeg
Looking at ffplay.c (https://github.com/FFmpeg/FFmpeg/blob/master/ffplay.c) and wanting to support some basic encryption, which lines of code are the most relevant? To keep it simple- assume we are using a basic XOR cipher key that matches, in length, the video data. In other words- where is the data actually read and return...

Infinite stream from a video file (in a loop)

video,ffmpeg,video-streaming,avconv
Is there any way howto create an infinite h264 stream from a video file (eg. mp4, avi, ...). I'd like to use ffmpeg to transcode avi file to h264 but there's no loop option for output.

Incompatible pixel format YUV420P with mjpeg

ffmpeg,multimedia,mjpeg
I am using ffmpeg to make a video from jpeg images using mjpeg codec. I use this command ffmpeg -i frame%d.jpg -c:v mjpeg -pix_fmt yuv420p -q:v 1 -y out.mp4 and I have this warning the yuvj420p was chosen instead. After reading about that pixel format, I found its deprecated to...

Adding ffmpeg to heroku buildback nodejs

node.js,heroku,ffmpeg,child-process,buildpack
I've been trying to make a server that can visualize music (This is what I have so far). That's been successful but I want to try and make it work with youtube videos, and I've found a lot of repositories on github for youtube video to audio conversion that make...

ffmpeg how to efficiently decode the video frame?

c++,video,ffmpeg,video-streaming
Here is the code I used to decode a rtsp stream in a worker thread: while(1) { // Read a frame if(av_read_frame(pFormatCtx, &packet)<0) break; // Frame read failed (e.g. end of stream) if(packet.stream_index==videoStream) { // Is this a packet from the video stream -> decode video frame int frameFinished; avcodec_decode_video2(pCodecCtx,pFrame,&frameFinished,&packet);...

FFMPEG attach file as metadata

ffmpeg,attachment
I have a set of images which I want to convert to a video using ffmpeg. The following command works perfectly fine: ffmpeg -y -i frames/%06d.png -c:v huffyuv -pix_fmt rgb24 testout.mkv I have some meta data in a binary file which I want to attach with the video. I tried...

write width and height of an image in txt file with batch

windows,image,batch-file,command-line,ffmpeg
How to save image size (width and height) in new file using ffmpeg or irfanview? I want it to be saved like this: img.png 800 600 img2.png 640 480 .... Thanks in advance....

How to split a video into individual encoded frames?

ffmpeg
Source video is H264 in an mp4 container, I'm trying to split it into individual encoded frames. I tried with the following command line: ffmpeg -i "input.mp4" -f image2 "%d.h264" But that creates jpegs with the extension "h264", rather than actual H.264 frames....

How to cut a Video and mute it in one step with FFmpeg?

video,ffmpeg,mute,ffmpeg-php
I tried this: "ffmpeg -i input.mp4 -ss 00:00:50.0 -vcodec copy -an -t 20 output.mp4" Because I know this is for cutting a s "ffmpeg -i input.mp4 -ss 00:00:50.0 -codec copy -t 20 output.mp4" And I know this is for muting (deleting the all the sound from the video): "ffmpeg -i...

ffmpeg batch script that combines multiple audio clips with one image > mp4

batch-file,audio,ffmpeg
I found this script in another thread and edited it to make this: @echo off for %%F in (*.jpg) do ( if exist "%%~nF.mp3" ( ffmpeg -loop 1 -i "%%~nF.jpg" -i "%%~nF.mp3" -acodec libvo_aacenc -vcodec mpeg4 -shortest "%%~nF.mp4" ) ) It combines all mp3 files with all jpeg files that...

FFMPEG I/O output buffer

c++,c,ffmpeg
I'm currently having issues trying to encapsulate raw H264 nal packets into a mp4 container. Instead of writing them to disk however, I want to have the result stored in memory. I followed this approach Raw H264 frames in mpegts container using libavcodec but haven't been successful so far. First,...

Raw numpy array from real-time network audio stream in Python

python,audio,numpy,ffmpeg,pyaudio
I would like to get raw data (optimally as a numpy array) from a PCM network audio stream for which I have an URL. The goal is to analyze the signal from the network stream in real-time. There seem to be a lot of Python audio modules or wrappers around...

Convert a ffmpeg video to an appropriate dimension

video,ffmpeg
I am writing a video conversion script using ffmpeg, it has been completed to full. Ideally, my video conversion script should output the video to many formats (like YouTube): 140p: 256 x 144 240p: 426 x 240 360p: 640  x 360 480p : 854  x 480 720p : 1280 x 720 1080p :...

FFmpeg - Unrecognized option 'map [outv]'

ffmpeg,java
I am merging some video files with FFmpeg and having an issue with my custom build. I'm using the following Java code for wrapping the ffmpeg command: List<String> cmds = new ArrayList<>(); cmds.add("ffmpeg"); cmds.add("-i"); cmds.add("input1.mp4"); ... cmds.add("-map [outv]"); cmds.add("-map [a]"); ... cmds.add("output.mp4"); ProcessBuilder pb = new ProcessBuilder(cmds); pb.directory(fileExec); Process process...

Mp4 to HLS using ffmpeg

ios,video,ffmpeg,m3u8,hls
I'm trying to convert a local .mp4 video to HLS using ffmpeg in an iOS app. I have integrated the ffmpeg wrapper using pods and generated all the segmented .ts files and the m3u8 file, but some of the .ts file segments are not listed in the .m3u8 playlist file...

video to audio file convert & save through FFMPEG in node js

javascript,node.js,audio,video,ffmpeg
I am working on an FFMPEG on node js. I'd like to retrieve the audio track from a video file using node js. I would also like to save such file but I can't figure out how. I though this line of code would help me : ffmpeg('/path/to/file.avi').noVideo(); I have...

avcodec_open only works with uncompressed format

ffmpeg,static-libraries,codec,avcodec
Context: I have a file called libffmpeg.so, that I took from the APK of an Android application that is using FFMPEG to encode and decode files between several Codecs. Thus, I take for grant that this is compiled with encoding options enable and that this .so file is containing all...

Decode/decompress H.264 back into raw/original file format, then encode into H.265

ffmpeg,h.264,h.265
I have some files encoded using the H.264 codec. There is a loss of quality when I convert them from H.264 to H.265. I imagine I should convert them back to raw/original file format, then encode them into H.265. Is it possible to decompress/decode H.264 into the original format (perhaps...

Stacking 3 gmp4-files using Avisynth and VirtualDub, results in wrong colors and distorted files

video,ffmpeg,avisynth,virtualdub
I need to conduct the seemingly simple task of stacking 3 files next to each other. They are all the same: .avi Container, 320x240, 4:3, 25 fps, GeoVision Advanced MPEG-4 GEO codec. I installed the GeoVision codec (http://www.geovision.com.tw/english/5_8.asp# - select "other utilities"), so my system (windows media player, media player...

ffmpeg: wmv files generated on Mac can't be played in Windows

windows,osx,ffmpeg,file-conversion,wmv
On Mac OS X 10.6.8, I converted a animated gif to a video file in wmv (a requested file format) by using ffmpeg -i File.gif -s 400x400 NewFile.wmv The video file played fine using VLC on Mac. The file can't be played on a Windows 7 machine using the Windows...

Convert image sequence to video using ffmpeg and list of files

bash,ffmpeg
I have a camera taking time-lapse shots every 2–3 seconds, and I keep a rolling record of a few days' worth. Because that's a lot of files, I keep them in subdirectories by day and hour: images/ 2015-05-02/ 00/ 2015-05-02-0000-02 2015-05-02-0000-05 2015-05-02-0000-07 01/ (etc.) 2015-05-03/ I'm writing a script to...

How to use a Pipe between two processes in Process.Start

vb.net,ffmpeg,pipeline,video-encoding
I have to run this command line using VB.NET: "H:\videotest\test.vpy" - -y | "H:\Release\data\bin64\ffmpeg.exe" -hwaccel auto -y -i - -map 0:v:0 -c:v libx265 -crf 20.0 -preset 5 -x265-params...

How to install gstreamer0.10-ffmpeg on Debian 8 Jessie (No installation candidate)

ffmpeg,debian,gstreamer,apt
On a clean Debian 8 installation i had to install some gstreamer-plugins. While most of them were already installed or were easily installable via apt-get, gstreamer0.10-ffmpeg was not installable: sudo apt-get install gstreamer0.10-ffmpeg threw out following warnings: Package gstreamer0.10-ffmpeg is not available, but is referred to by another package. This...

Merge 2 video files with thier audio in a single file side by side

audio,video,ffmpeg,mux
I need to merge 2 video files along with their audio in single file side by side. I am able to merge 2 video files in single file but it using audio of first video file only, where as I need to merge audio of second file as well. below...

What is the difference between FFmpeg Android and FFmpeg Android Java?

android,android-ndk,ffmpeg
I'm trying to use FFmpeg in a new app and found these two repositories on GitHub: http://hiteshsondhi88.github.io/ffmpeg-android/ and http://hiteshsondhi88.github.io/ffmpeg-android-java/. What are their differences? I mean, Android NDK is just a way to put native code together with your Java code, right? If so, using FFmpeg-android as a shared native library...

How to add Title in video by ffmpeg on Node JS

node.js,ffmpeg
I am working on a project where I have to add Title on a video by FFmpeg. I have already succeeded in adding a picture on a video. Can anybody help me to add Text(Title) on a video? Here is my code for adding Image, please suggest the required modification:...

FFmpeg - Requested output format 'mpeg' is not a suitable output format

video,ffmpeg,codec,file-conversion,mpeg
I am trying to use FFmpeg to convert a video from mp4 format to an mpeg, so that I can merge multiple videos. I have a custom build of FFmpeg where I control the configuration options: ffmpeg -y -i VID_20150514_171122_12085.mp4 -an -f mpeg VID_20150514_184208.mp4.0.mpg ffmpeg version git-2015-02-25-b0d3322 Copyright (c) 2000-2015...

Emulation prevention bytes in MP4

video,ffmpeg,mp4,h.264,libavcodec
H.264 defines that a sequence of two zero bytes should be escaped by adding a '3' byte after the two zero bytes ("Emulation prevention"). Is this escaping rule correct also for the mp4 file format? The question is followed by results of debugging ffmpeg. I've tried to open the following...

Stream live webcam AV feed to wowza using FFMPEG

php,ffmpeg,webcam,live-streaming,wowza
I have been trying to find out how to live stream my webcam feed to my wowza server. I am trying to make a web application in php that lets users stream live video through their webcam. I am confused, if i need to install FFMPEG in every user's computer...

FFmpeg android execute

android,ffmpeg,execute
On windows I could cut a video with below code with ffmpeg.exe Can't use ffmpeg in android. I used gradle to grab ffmpeg in my app. dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5' } I have these lines in my method VideoIn = getInternalDirectoryPath() + "/Download/Ab.mp4"; VideoOut =...

Converted Avi to Mp4 using FFMPEG, Converted video not working in html 5

c#,asp.net-mvc,html5,video,ffmpeg
I have a section in my web page where user can upload any types of videos of any format , currently only restricted to .mp4 and .avi. After successfull upload i have displayed the same video to the user. I have bind the path in HTML5 video so that the...

ffmepg video from uneven sequence of png images

video,ffmpeg,screencast
I'm going to make a video from series of screenshots (.png files). For each screenshot there is assosiated timestamp information about when it was taken. The time intervals between screenshots may vary and it's highly desired to preserve that difference in the video. Is there a way to use single...

using iojs express and fluent-ffmpeg

node.js,express,ffmpeg,io.js
i am trying to create a simple io.js that will read an opus file, convert it to mp3, and pass it to a webpage using express. here is what i have tried so far: var express = require('express'); var ffmpeg = require('fluent-ffmpeg'); var app = express(); var fs = require('fs');...

Live streaming HLS via ffmpeg, How to force client to start playing from the beginning? From 1st segment

ffmpeg,streaming,video-streaming,http-live-streaming,hls
Is there a way, maybe via an ffmpeg option or flag, to force the client player to always start the playlist from the beginning when live streaming rather than the real time mid-stream? Say the user comes in 1mn after the stream has started, rather than starting to watch at...

compile FFMpeg for Android (Ubuntu14) - cannot locate symbol

android,ubuntu,android-ndk,ffmpeg
I'm trying to compile FFMpeg for Android and I have troubles running the APK on Android 4 (on Android 5 I don't get this shitty unsatisfied link error): 05-09 15:16:18.880 22160-22304/com.gpac.Osmo4 I/LibrariesLoader﹕ Loading library avcodec... 05-09 15:16:18.910 22160-22304/com.gpac.Osmo4 E/dalvikvm﹕ dlopen("/data/app-lib/com.gpac.Osmo4-1/libavcodec.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "log2f" referenced...

ffmpeg problems (mpeg1video -> ?)

java,ffmpeg
I'm trying to convert various video files from .mpeg to .ogg theora videos. This command works fine when I test it in its own program, but fails to run properly inside the program it was intended for. I don't understand what's breaking here. Adding a -vcodec flag causes other errors....

webm dash encoding… What are the correct ffmpeg parameters?

ffmpeg,webm,dash,dash.js
I'm stumped with encoding videos into a dash compliant format. I'm going from .mp4 to .webm Firstly, I am running OS X and ffmpeg 2.5.4. Here's the encoding commands I am using in my test (I got these from here): ffmpeg -i IMG_0113.mp4 -c:v libvpx-vp9 -s 160x90 -b:v 25k -g...

ffserver - invalid codec name libvpx

ffmpeg,video-streaming,ffserver
I have the following configuration of ffserver.conf: Port 8090 # Port to bind the server to BindAddress 0.0.0.0 MaxHTTPConnections 2000 MaxClients 1000 MaxBandwidth 10000 # Maximum bandwidth per client # set this high enough to exceed stream bitrate CustomLog - NoDaemon # Remove this if you want FFserver to daemonize...

ffmpeg cut first 5 seconds

python,video,ffmpeg
I am having trouble removing the first 5 seconds of a .mp4 video. Here is what I have so far: subprocess.call("ffmpeg -ss 00:00:00 -t 00:00:05 -i /home/requiem/Desktop/t1.mp4 -vcodec copy -acodec copy /home/requiem/Desktop/t2.mp4", shell=True) The issue is that it just takes the first 5 second and saves it, but I want...

How do I upscale an iOS App Preview video to 1080 x 1920?

ios,iphone,ffmpeg,app-store,itunesconnect
I just captured a video of my new app running on an iPhone 6 using QuickTime Player and a Lightning cable. Afterwards I created an App Preview project in iMovie, exported it and could successfully upload it to iTunes Connect. Apple requires developers to upload App Previews in different resolutions...

Convert all images in directory to .mp4 using ffmpeg and a timestamp order

ffmpeg
I have a directory with .jpg images named in UNIX timestamp format. How can I convert all images starting with the oldest timestamp to the newest in .mp4 video format? I found a solution but it uses incremental naming, like image001, image002. I would appreciate any help. Thanks. Using aergistal's...

FFmpeg move overlay from one pixel coordinate to another

video,ffmpeg
I'm trying to write a command within FFmpeg that will first overlay one video stream on top of another one. Then I want the overlayed video to move from one pixel coordinate at a known time, and end at another pixel coordinate at a later time. I'm comfortable with the...

Mozilla Firefox 36 has problems playing my h264 MP4 files

firefox,ffmpeg,h.264,mp4
I try to convert videos with ffmpeg to mp4 format (h264) Profile: High Level: 3.1 (1280x720 with 30fps), Bitrate 1500k The video plays very well in every browser except in Firefox. http://5.79.72.89/trailer/trailer.mp4 At first it needs longer to load and when I seek inside the video most times the video...

FFMPEG - what is the meaning of gt(scene\,0.3)

ffmpeg,ffprobe
I'm using this command in order to detect the shot boundaries in FFMPEG. ffprobe -show_frames -of compact=p=0 -f lavfi "movie=test.mp4,select=gt(scene\,0.3)" By changing the 0.3 value I can get different results. As far as I know this 0.3 value should be the difference of consecutive frames. But I don't understand what...

java processbuilder ffmpeg pipe

java,ffmpeg,pipe,processbuilder
i try to run ffmpeg out java. here my code: String[] temp = {"ffmpeg\\ffmpeg.exe","-i","input_track.ac3","-threads","0","-af","volume=volume="0.0"dB","-acodec","pcm_s32le","-ac","6","-ar","48000","-f","wav","-","|","ffmpeg\\fdkaac","--ignorelength","-m","1","-o","ouput_track.aac","-"}; ProcessBuilder pb = new ProcessBuilder(temp); Process p = pb.start(); int ev = 0; if (p.waitFor() != 0) { ev = p.exitValue(); } i try the comand at windows cmd, here have a problem with "|" at...

How to trim video in android?

android,video,ffmpeg
I know the same question has been asked so many times, but I am not able to solve my issue. Hi, I tried FFmpeg command for trimming video & it works quite good. I want to trim a video & it works, but the only problem I have is that...

ffprobe show_frames for multiple videos

video,ffmpeg,video-streaming,ffprobe
Is there any way that I can see frames for multiple videos at same time in one file? I know how to do that for one video - ffprobe -show_frames http://myvirtualdirectory/myvideo.mp4 > output.txt I have so many videos in my virtual directory - so I want to see all the...

Batch ffmpeg and compress the files

batch-file,ffmpeg
I am doing a bunch of conversions with ffmpeg, where I need to watermark the content. I am using a batch file to run the ffmpeg application, but I want to automate all of this. for %%a in ("*.mp4*") do ffmpeg -i "%%a" -i logo.png -filter_complex overlay "newfiles\%%~na.mp4" pause Source...

FFmpeg on android is crashing in avcodec_decode_video2 function

android,ffmpeg,mpeg-4
FFmpeg is crashing on: libavcodec/utils.c avcodec_decode_video2 around line 2400 ret = avctx->codec->decode(avctx, picture, got_picture_ptr, &tmp); So I've compiled ffmpeg on android using the following configure script (based from here ): prefix=${src_root}/ffmpeg/android/arm addi_cflags="-marm -Os -fpic" addi_ldflags="" ./configure \ --prefix=${prefix} \ --target-os=linux \ --arch=arm \ --enable-shared \ --disable-doc \ --disable-programs \ --disable-symver...

Not able to decode mp4 file using latest ffmpeg library : av_decode_video2

c,video,ffmpeg
I am writing a wrapper code around latest ffmpeg library. I am supplying MP4 files from local system. My problem is that I am unable to get any decoded frames when I use av_decode_video2(). The return value comes out to be negative. I have used av_read_frame() which returns 0. I...

ffmpeg subprocess fail to open on OS X

python,ffmpeg,subprocess
I've got this script: PATH = os.path.dirname(os.path.abspath(__file__)) global TEMP for video in os.listdir(VIDEOS): ffmpeg = PATH + "/ffmpeg/ffmpeg" arg1 = " -v 0 -i " arg2 = VIDEOS + "/" + video arg3 = " -r 1 -f image2 " arg4 = TEMP + "/" + os.path.splitext(video)[0] + "-%d.jpg" subprocess.Popen(ffmpeg...

Send 2 different camera feeds to ffserver from ffmpeg

ffmpeg,streaming,ffserver
I'm currently working in a project where I have to stream 2 webcams streams from a computer to another through a TCP connection, I can stream 1 without problem: using ffserver.conf: HTTPPort 8090 HTTPBindAddress 0.0.0.0 MaxClients 40 MaxBandwidth 30000 CustomLog - NoDaemon <Stream status.html> Format status ACL allow localhost ACL...

Simple ffmpeg program has memory leaks

ffmpeg
Environment: Ubuntu 14.04 I compiled the simple source code from ffmpeg tutorial step 1 at http://dranger.com/ffmpeg/tutorial01.html. When I run the binary through valgrind, it reports a bunch of memory leaks. Here is one example: ==30270== 389,824 bytes in 1 blocks are possibly lost in loss record 8 of 8 ==30270==...

nreco wrapper bitmap streaming through rtmp

bitmap,ffmpeg
I'm developing an application for real time streaming. capture frames from video devices and encoding with a ffmpeg wrapper called nreco. the problerm is that if i try to stream encoded video to red5 via rtmp on red5 server, connection is immediatily closed. this is the code i use to...

Live streaming dash content using mp4box

ffmpeg,video-streaming,html5-video,mpeg-dash,media-source
I'm trying to live stream H.264 content to HTML5 using the media source extensions API. The following method works pretty well: ffmpeg -i rtsp://10.50.1.29/media/video1 -vcodec copy -f mp4 -reset_timestamps 1 -movflags frag_keyframe+empty_moov -loglevel quiet out.mp4 and then: mp4box -dash 1000 -frag 1000 -frag-rap out.mp4 I can take the MP4Box output...

FFmpeg H264 parsing

c++,c,parsing,ffmpeg,h.264
I am using FFmpeg to decoding H.264 video, for the following program: #include <stdlib.h> #include <stdio.h> #include <string.h> #include <signal.h> #include <sys/time.h> #include <time.h> #include <libavcodec/avcodec.h> #include <libavutil/mathematics.h> #include <SDL/SDL.h> void sigint_handler(int signal) { printf("\n"); exit(0); } const char *window_title; SDL_Surface *screen; SDL_Overlay *yuv_overlay; #define INBUF_SIZE 80000 /* * Video...

Realtime decoding - stdin to stdout

c#,audio,ffmpeg
I am searching for a possibility to pass encoded audio data to a ffmpeg process (using stdin) and retrieve the decoded audio data (using stdout). I tried to find the necessary arguments for the ffmpeg process but I could not find any. Is there really no such possibility? Again: I...

Seeking to video frame of h264 codec in mp4 container with FFmpeg. Packet pts is always 0

c++,video,ffmpeg,h.264
I'm trying to seek to the nearest keyframe of a specific frame with FFmpeg but whenever I obtain the next frame with av_read_frame after seeking, the packet pts or dts are always 0. This only happens with h264/mp4 videos as it works correctly for some codecs in .avi container. I...

ffmpeg convert any file to any file

linux,ffmpeg,centos,command
I Want simple command to convert any supported file to any file with little possible video compression. for example avi to mp4 mp4 to 3gp . .etc.. I tried below code ffmpeg -i infile.flv outfile.3gp It works for some but for some other like flv to 3gp conversion it throws...

ffmpeg recording h264 live stream got error

c,video,ffmpeg,video-streaming,video-capture
I am trying to record a h.264 live stream using the following code: AVOutputFormat* fmt = av_guess_format(NULL, "test.mpeg", NULL); AVFormatContext* oc = avformat_alloc_context(); oc->oformat = fmt; avio_open2(&oc->pb, "test.mpeg", AVIO_FLAG_WRITE, NULL, NULL); AVStream* stream = NULL; ... while(!done) { // Read a frame if(av_read_frame(inputStreamFormatCtx, &packet)<0) return false; if(packet.stream_index==correct_index) { //////////////////////////////////////////////////////////////////////// //...

ffmpeg to split mp4 file into segments… after first segment, audio unsynced

ffmpeg,mp4,video-editing
I've used the ffmpeg command line shown in this question to split MKV files perfectly for a long time. Now i have some MP4 files that i'd like to split and at first it seemed to work, but every subsequent segment after the first has the audio not synced! And...

Why pixels color are different before and after encoding? , How to set the same?

video,ffmpeg,watermark
I want to change some pixels of some frames, I do this steps: 1 - Extract frames from FLV video to PNG 2 - Change frame pixels color ,For example I set color of Pixel(0,0) to ARGB (0,0,0,0) 3 - Encode frames to a video by below code: -i Frame%04d.png...

At least one output file must be specified

php,ffmpeg
I am using this command in ffmpeg ffmpeg -i test.flv -i /var/www/phpvibe/logo.gif -filter_complex "scale=1200:-1,overlay=0:0" -s 1280x720 -vcodec libx264 -s 640x360 -movflags test.mp4 2>&1 But i am getting this string(42) "At least one output file must be specified" updated:- php code:- $output ='{ffmpeg-cmd} -i {input} -i /var/www/phpvibe/logo.gif -filter_complex "scale=1200:-1,overlay=0:0" -s 1280x720...

Is it possible to have two images in a single frame in motion jpeg?

ffmpeg,mjpeg
I have a quick time video file, video stream is in motion jpeg format, I extract every frame in the file with ffmpeg -i a.mov -vcodec copy -f image2 %d.jpg I found that in every jpeg file, there are actually two FFD8 marker, which means there are actually two images...

concatenate files in libffmpeg c++

c++,ffmpeg,video-processing
i'm a bit at loss here. My goal is to merge two video files (which might be of different file formats) and i'm already using libffmpeg for other simple tasks. I thought libffmpeg exposed some kind of function to merge files, but i can't find it. I found these pages...

Error with os.system in python script

python,ffmpeg,os.system
I am creating a python script that will convert files using ffmpeg and unoconv. However when I run the program, rather than getting a converted file the program simply displays the text: sh: 1: unoconv -f: not found Here is the script for my program: path = raw_input("Please drag and...

Why is packet.pts != frame->pkt_pts in AVFrame?

ffmpeg
Trying to understand some audio/video sync issues via ffmpeg, I noticed the following. Running this code while (av_read_frame(formatCtx, &packet) >= 0) { if (packet.stream_index == videoStream) { avcodec_decode_video2(videoCodecCtx, frame, &got_frame, &packet); } printf("packet.pts = %d\n", packet.pts); printf("frame->pkt_pts", frame->pkt_pts); } shows that frame->pkt_pts in general differs from packet.pts, despite the documentation...

ffmpeg starts too slow when using ip camera (the same as using OpenCV)

c++,opencv,ffmpeg
Here is my code: ffmpeg -i http://192.168.0.101:8889/video?dummy=param.mjpeg out.mjpg When I run this command, it will immediately print below: ffmpeg version N-70223-g7296716 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm...

Auto Splitting full video using MP4Box

ffmpeg,ubuntu-14.04
Is there any method to achieve auto-splitting of whole video into equal chunks using MP4Box in Ubuntu as we get same using FFMPEG by specifying segments as following ffmpeg -i input.mp4 -c copy -map 0 -segment_time 8 -f segment output%03d.mp4...

FFMpeg working in command line but not in shell_exec

php,video,ffmpeg
When I convert a video using command line(ffmpeg -i dust.mp4 -s 320x240 video.flv 2>&1) it does the conversion fine. But when I use the php code it does not. The code is as follows: echo "Starting ffmpeg...\n\n"; $ffmpeg = "~/ffmpeg_sources/ffmpeg"; echo exec("$ffmpeg -i dust.mp4 -s 320x240 video.flv 2>&1"); echo "Done.\n";...

Why can't curl download the ffmpeg-2.7.tar.bz2?

curl,ffmpeg
I'm working on OS X Yosemite 10.10.2. I want to use curl command to download the ffmpeg-2.7.tar.bz2 as following: curl -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2 It can't work. However it works fine with other url. The message as following when add the --verbose option: $ curl --verbose -O http://ffmpeg.org/releases/ffmpeg-2.7.tar.bz2 * Hostname was NOT...

how can i get image more than one video in ffmpeg in a loop

vb.net,video,ffmpeg,video-editing
i am writing a simple application for creating thumbnails of multiple video somunteneously .but the problem is the image file namei.e one name so it only save the last video thumbnail in the folder . enter code here For Each fi In aryFi proc.StartInfo.Arguments = " -i " + fi.FullName...

how can i set Path of ffmpeg output in vb.net

.net,vb.net,ffmpeg
I am Writing a code in vb.net to Create thumbnails of Video . But I want to set the output path or the storage path of the thumbnails enter code here TextBox2.Text = InputBox("Enter your Desired Name") Dim fileName As String = TextBox1.Text Dim result As String = Path.GetFileName(fileName) proc.StartInfo.Arguments...

Redirect shell output for ruby script

ruby-on-rails,ruby,shell,ffmpeg
I have simple ruby script : #! /usr/bin/env ruby require 'fileutils' FileUtils.rm "output.mkv" if File.exists?("outp ut.mkv") pid = Process.spawn("ffmpeg -i wrong_file.mp4 -c:v libx264 -preset veryslow -qp 0 output.mkv", STDOUT => "output.txt", STDERR => "error.txt") puts "pid : #{pid}" Process.wait(pid) But, STDOUT and STDERR outputs into error.txt, why ? It looks,...

image overlay with ffmpeg runs the script indefinitely

ffmpeg,overlay
I really tried hard, I did not succeed, so I am asking here. I wanted to have an overlay image (jpg) with text on video (mp4; 15 secs) and have fade-in and fade-out for the overlayed image (and not the video). I could do this with the follwing command, but...

One liner to create HLS stream

ffmpeg,gstreamer,hls,mpeg-dash
IIUC with HLS or DASH, I can create a manifest and serve the segments straight from my httpd, e.g. python -m http.server. I have a UVC video feed coming in on /dev/video1 and I'm battling to create a simple m3u8 in either gstreamer or ffmpeg. I got as far as:...

c++ - ffmpeg yadif deinterlacing

c++,ffmpeg
I'm trying deinterlacing video with ffmpeg in my C++ program. First of all, i used avpicture_deinterlacebut is deprecated. Looking for more information, I've tried avfilter_get_by_name("yadif")after avfilter_register_all()but always return NULL. I've tried the next code too, but still not working. I've tried different parameters in avfilter_init_strfunction buterris always less than 0,...

What's the replacement for the avcodec_thread_init?

video,ffmpeg,video-streaming
I am using ffmpeg to encode/decode videos. I used a old version in the past, but recently I switched a new version and found that many ffmpeg functions are non-longer in use. Here is my old code: pCodecCtx=pVideoStream->codec; pCodecCtx->codec_id = pOutputFormat->video_codec; pCodecCtx->codec_type = ffmpeg::AVMEDIA_TYPE_VIDEO; pCodecCtx->bit_rate = Bitrate; pCodecCtx->width = getWidth();...

Splitting up a variable in bash

bash,ffmpeg,mp3
I have a bunch of songs that I have downloaded that I am trying to convert to .mp3 and rename. After converting the .m4a file to mp3 with ffmpeg, they are all in the format of Artist Name - Song Name.mp3. I want to be able to separate the Song...

Ffmpeg hls live streaming - How to generate shorter segments

ffmpeg,video-streaming,video.js,hls
Been using ffmpeg for live streaming via HLS and playing through video.js. It works but there is a 20s delay between the time the stream starts to the time it actually starts playing. Do you know why ffmpeg command below doesn't create segements that are 3 seconds like I have...

HTML 5 how to record filtered canvas

javascript,html5,canvas,ffmpeg
I am gonna use my webcam as a source and show my view on webpage , than I will manipulate my view like (blacknwhite , fiseye, etc.) and show that manipulated video in my canvas. An example ( http://photobooth.orange-coding.net/ ) Ok everything is cool for now . I can capture...

Pipe ffmpeg output to named pipe

linux,ffmpeg,named-pipes
I'm trying to get ffmpegs output to a named pipe, where I could read from another shell. I do not need the video stream piped, just the informations below to get a state of the conversion process back. I am not able to achieve the piping behavior in any way,...

Is there a way of using ffmpeg in c# app?

c#,video,ffmpeg,video-streaming
I'm using the ffmpeg.org and when I run ffmpeg -y -f vfwcap -r 25 -i 0 out.mp4 in command line I can grab the video from my webcam and write it to the out.mp4 file. However, I can't see that stream anywhere. I thought about writing some simple wrapper in...

ffmpeg - combine videos into one wide video

video,ffmpeg
I have 3 video of 1920x1080. They are all the same length/codec. I'd like to combine them (not concatenate), so that the result is one video of 5760x1080. Can someone explain to me how to do this in ffmpeg (or another free application)? Thanks!...

FFmpeg audio crossfade

linux,audio,ffmpeg,cross-fade
I'm trying to merge several videos using ffmpeg and apply the cross-fade transition in between. I got video cross-fade working by referring to this. At the same time I need to have audio also to have cross-fade applied for original audios associated with each video. I referred several places but...

Error opening ffmpeg subprocess in Python

python,ffmpeg,subprocess
What I want to do is opening a ffmpeg process in Python. My code look like this: import subprocess import os def Main(): ffmpeg = "C:\ffmpeg\bin\ffmpeg.exe" args = " -i C:\video.mp4 -r 1 -f image2 C:\FRAMES\frame-%03d.jpg" subprocess.Popen(ffmpeg + args).wait() Main() But even in this simple form I got always the...

FFmpeg: How to convert vertical video with black sides, to video 16:9, with blurred background sides

video,background,ffmpeg,blur
How to make this by using FFmpeg? Example without FFmpeg: Adobe After Effects Sony Vegas Pro...

Buffer a stream piped to res in node.js/express

node.js,ffmpeg,streaming
I have a command I'm running for video streaming via ffmpeg, that basically pipes the response to res within express. For example: var args = ['-re','-i','/video.mkv','-loglevel','quiet','-r',24,'-threads',7,'-b:v','512k','-b:a','96k','-c:v','libx264','-c:a','libfdk_aac','-ar',22050,'-f','flv','pipe:1'] , command = spawn('ffmpeg', args); command.stdout.pipe(res); What I'd like to do is "buffer" this for a few seconds before the output is piped to...

Is there a way to add watermark to all videos in Google Drive’s folder?

google-apps-script,ffmpeg,google-drive-sdk,watermark,video-watermarking
Is there a way to add watermark to all videos in Google Drive’s folder? I found similar service, but it works only with pictures, pdfs - Wappwolf Maybe, it's possible to do by Google Apps Script or some other services (like ffmpeg)?...

Understanding NASM Macro

assembly,macros,ffmpeg,nasm
I've come around this macro in a assembly source file and I just can't figure out how it's working. So first I come around this function (hevc_deblock.h): cglobal hevc_v_loop_filter_chroma_8, 3, 5, 7, pix, stride, tc, pix0, r3stride sub pixq, 2 lea r3strideq, [3*strideq] mov pix0q, pixq add pixq, r3strideq TRANSPOSE4x8B_LOAD...

Is there a Byte Offset in FFmpeg for source Files?

c++,command-line,ffmpeg,offset
I am working on an C++ Application (running on Ubuntu) that opens FFmpeg for video conversion and reads the output through popen(). This works fine but now i need FFmpeg to start reading the source File at a specific Byte Offset. Is there any way to archive this? I already...

Downloading youtube mp3 - metadata encoding issue (python, youtube-dl, ffmpeg)

python,encoding,ffmpeg,metadata
I'm trying to download audio from youtube with youtube-dl.exe and ffmpeg.exe (Windows 7), but I am having some troubles with encoding. I have to parse metadata manually, because when I try to use --metadata-from-title "%(artist) - %(title)" --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=DaU94Ld3fuM I get ERROR: Could not interpret title of video...

Set RTSP/UDP buffer size in FFmpeg/LibAV

ffmpeg,udp,rtsp,buffer-overflow,libav
Note: I'm aware ffmpeg and libav are different libraries. This is a problem common to both. Disclaimer: Duplicate of SO question marked as answered but actually didn't give a proper solution. Insufficient UDP buffer size causes broken streams for several high resolution video streams. In LibAV/FFMPEG it's possible to set...

ffmpeg/batch file: input format stays in output file name

batch-file,ffmpeg,aac,m4a
I created this batch file to put all aac files in one directory into an m4a container. The command works so far, but every new file generated has the format of the input file in the output files name. For example: test(.aac) is in an m4a container but is NAMED...

3 seconds latency while streaming with Wowza Server

ffmpeg,streaming,rtsp,latency,wowza
I'm trying to develop a live streaming application with RTSP protocol. On the PC with the Wowza Server, I execute the following command : Code: ffmpeg -f dshow -i video="Name_Of_My_Cam":audio="Name_Of_My_Microphone" -vcodec h263p -f rtsp -muxdelay 0.1 rtsp://<Wowza_server_ip_adress>:1935/live/test And I'm trying to play this stream on a VideoView on my Samsung...

Runtime.getRuntime().exec() in loops

java,loops,ffmpeg,runtime,exec
I'm writing a little tool to create some thumbnails in java automatically. therefor I execute Runtime.getRuntime().exec(command); in a for-loop. Now my Problem is, that only the first thumbnail gets created. My code so far: public static void testFFMpeg(File videoFile) throws IOException { FFMpegWrapper wraper = new FFMpegWrapper(videoFile); int length =...