Tag Info

New answers tagged

1

The problem is that ffmpeg chooses the default for -vsync based on the output muxer. Its mp4 muxer defaults to vsync 1, but it chooses a very high framerate so that it can put a frame at the exact right time for every input frame. (The input frame timing isn't constant. It averages 14.97 fps, according to ffmpeg. Probably from a phone camera? They do ...


1

Thanks to Andy Furniss on the ffmpeg-users mailing list, I've got this one solved. One needs to explicitly tell ffmpeg not to scale the loudness: ffmpeg -drc_scale 0 -i foo.m2ts foo.wav Source: [FFmpeg-user] Erroneous volume level shifts using ffmpeg to convert AC3 in M2TS to WAV


0

It's not stated what the framerate of your MOV is, and thus whether or not you will be needing to speed up the audio to match a correlate 23.976 to 24.000 speedup of your video to match the DCI DCP specs. This link outlines a DCP workflow that may be of help: http://johnpilgrim.net/client/reference/DCP/HOWTO.html (I am aware that this does not directly ...


0

In an option: -xerror The command line option is documented as doing exactly what you want. Add the option and ffmpeg will exit on a stream error (also setting exit value to 1) from: ffmpeg -h full | grep xerror .... -xerror error exit on error


1

You're asking ffmpeg to encode the files into mp4 instead joining them into a single stream. You need to concatenate into temp.ts and then convert that into .mp4 with -codec copy. Also, I believe you need to convert adts to aac in the second step -bsf:a aac_adtstoasc.


0

ffmpeg -i video.webm -i audio.opus -c:v copy -c:a aac -strict experimental output.mp4 it should look something like this. ffmpeg -i audio.opus -i vid.webm -c:v copy -c:a opus -strict experimental output6.webm replace aac with opus and the two files around with opus being in front(i think), it should work.


1

You can use the following to add all images with a jpg extension to an mp4 video ffmpeg -framerate 1 -pattern_type glob -i '*.jpg' video.mp4


1

Filtering requires re-encoding, but you have another option: 1. Make each segment What you can do instead is stream copy each segment using -ss and -t or -to with -c copy. Example to skip first 10 seconds and make 20 second output: ffmpeg -ss 10 -i input -t 20 -c copy output Example to skip first 10 seconds and stop at duration 30 resulting in a 20 ...


1

sub2video: non-bitmap subtitle That's your error. You have text-based subtitles, so you need to burn them with the subtitles filter. ffmpeg -i input.mp4 -filter:v subtitles=subtitles.srt output.mp4 The overlay filter only works when your subtitles are images, which is the case for dvdsub, for example.


0

Example The option you need is -compression_algo with a value of raw or 1: ffmpeg -i input -compression_algo raw -pix_fmt rgb24 output.tiff As for the reason for the -pix_fmt rgb24 option see answer to Use ffmpeg for JPEG to TIFF conversion. Private options You can view information and options specific to each encoder (also called "private options"): ...


2

The easiest method is to use a static build of ffmpeg. Just download, extract, and execute it. You can move the binary wherever you prefer. To use it either: place it somewhere in your PATH, or navigate to the directory containing the binary and run ./ffmpeg, or provide the full path to the binary, such as /Users/Tenaciousd93/ffmpeg. If the static build ...


1

If you want to remove a single I-frame, you have to extract the bitstream to an Annex B format (e.g. ffmpeg -i input.mp4 -c:v copy -an output.h264, and then find the bytes that represent the NAL unit(s) containing the frame(s) you want to remove. Remove those bytes until the next start code, and save the stream. Or, you could splice the video by using the ...


2

One solution is to change the internal format of the overlay stream to include an alpha channel. To do that, use the format filter: -filter_complex \ "[1:v] format=pix_fmts=yuva420p, fade=t=in:st=3:alpha=1 [logo]; \ [0:v][logo] overlay [outv]" This solution is also backwards compatible with input containing an alpha channel.


0

ffmpeg doesn't have any decent audio filters for noise-reduction built in. Audacity has a fairly effective NR filter, but it's designed to be used with 2-pass operation with a sample of just the noise, and then the input. The comments at the top of https://code.google.com/p/audacity/source/browse/audacity-src/trunk/src/effects/NoiseReduction.cpp explain ...


0

It turns out that the video I was attempting to double-deinterlace was actually 25p that was encoded into a 50i video file in order to conform to an older AVCHD standard. Apparently this is a common practice for tapeless cameras from the mid-late 2000s. So of course when I attempt to deinterlace I only end up with, at most, the original source 25 frames per ...


0

From: http://stackoverflow.com/questions/17265381/ffmpeg-get-value-from-cropdetect ffmpeg -i input -t 1 -vf cropdetect -f null - 2>&1 | awk '/crop/ { print $NF }' | tail -1


0

I had the same problem. It not you that's it's the ffmpeg wiki that's out of date: https://trac.ffmpeg.org/wiki/Create%20a%20thumbnail%20image%20every%20X%20seconds%20of%20the%20video show's fps. Instead of fps, use the -r option ffmpeg -i my_movie.mp4 -ss 00:00:10.000 -f image2 -r 1 img%03d.jpg


1

You can specify the frame rate for the input and/or the output. Same frame rate for input and output ffmpeg -loop 1 -framerate 10 -i in.png -t 30 -pix_fmt yuv420p out.mp4 Because the output will inherit the input frame rate you only need to declare the input frame rate if you want both the input and output to have the same frame rate. The default frame ...


0

You can use the cat command from the shell to concatenate the .vob files into one. Here is an example: To concatenate file1.vob, file2.vob and file3.vob from within the same directory into Allfiles.vob you can use the following command: cat file*.vob > Allfiles.vob


2

From what I see your videos have different framerates, 16fps and 12fps. For concatenating videos and using the concat demuxer, the only thing that can be different for the videos to concatenate might be the bitrate, everything else, resolution, fps, codec, color format...must be equal. See the FFmpeg wiki Concatenation section Possible solutions Equalise ...


1

PATH The guide places the binary in ~/bin. A vanilla, minimal installation of CentOS 6 & 7 has ~/bin in the PATH as set by ~/.bash_profile: # User specific environment and startup programs PATH=$PATH:$HOME/.local/bin:$HOME/bin export PATH You can double-check with echo $PATH: ...


2

ffmpeg logs to stderr, so you have to check that. Since you're already outputting to stdout, you have to redirect stderr to a file, for example: ffmpeg … 2> log.txt


2

For JPG output use -q:v to control quality. Range is 2-31. A lower value is a higher quality, and therefore higher file size. The -crf option is used by the encoders libx264 (H.264 video) and libvpx (VP8/VP9 video), but the values vary between these encoders. It is not for mjpeg (JPG images/MJPEG video) or libtheora (Theora video). Also, you may find the ...


0

These type of problems seems to be fixable by updating ffmpeg, but I am paranoid about updating/changing anything codecs-wise on my system and have decided to rather use the windows binaries of ffmpeg through wine. It seems to work fine. Python wine wrapper: I have written the following python wrapper which must be placed in the same directory as ...


1

If you need the file to be playing on Windows XP, you cannot use H.264 video and AAC audio. Your least common denominator is whatever Windows Media Player 11 supports, which is the latest version you can get for XP. Or you provide codecs with your video. Or a proper player, like VLC. See this chart. The only video codec for which you don't need additional ...


1

You can reference both the height of the input (ih), and the height of the box (h). This allows more flexible placement; especially if your inputs vary in size. To place the box directly on the bottom: y=ih-h To place the box 10 pixels above the bottom: y=ih-h-10 See the FFmpeg drawbox video filter documentation for more options.


0

But what does the :v mean? This is the stream specifier. For example, 1:v refers to second input:all video streams (note that ffmpeg starts counting from 0). This can be refined even more; 1:v:2 refers to second input:video stream type:third video stream. So this will choose the third video stream from the second input. How would I go about ...


0

I resolved this by running the following commands in terminal (I use the package manager homebrew for managing Unix based tools under OSX) brew uninstall lame brew install lame sudo brew link lame


2

VLC player will display the name of the current playing file for about 5 seconds at the bottom of the video, on top of your own figures, then it will disappear. Since my own one lasts for only 4s then it's "always" there even though I set repeat on ;).


1

I'm looking for a command to move the video's atom to the beginning so the video will start very quickly You're already doing that by setting -movflags +faststart. So you're fine. The video has an average bitrate of about 1 MBit/s, which is okay, but probably a little too much for 360p video. For me, your video takes rougly 4–5 seconds to start, on ...


2

You just need to add another overlay filter. The new overlay filter will use the output from the previous overlay as an input along with the logo image. -loop 1 \ -framerate 1 \ -i logo.png \ … -filter_complex \ "[1:v]drawbox=t=5:c=white[fg]; \ [0:v][fg]overlay=(W-w)/2:(H-h)/2:shortest=1,drawtext=…,drawtext=…,drawbox=…[bg]; \ ...


3

The index variable for FOR loops is case sensitive.  You need to change %%~nA to %%~na (or capitalize the other occurrences).


2

Slideshow with static image background You don't need to use the movie source filter, and use -filter_complex instead of -vf. ffmpeg \ -loop 1 \ -framerate 1 \ -i bg.jpg \ -framerate 1/5 \ -i "C:/test/%03d.jpg" \ -filter_complex "overlay=(W-w)/2:(H-h)/2:shortest=1,format=yuv420p" \ -c:v libx264 \ -r 30 \ -movflags +faststart \ output.mp4 ...


1

Meh, I don't know how to answer this without recommending an actual product. But ok here we go. Generally speaking these cheap little video converters all use one of a few known chipsets and they've been around for years so Linux support is generally very good. Also good news is that, with these basic converters, the video steam is exposed as /dev/video0, ...


0

I got this to work with the guardian project version of ffmpeg build (for a command line output). See my fork here: https://github.com/touchlab/android-ffmpeg Essentially, you need to get the ffmpeg configure to use the fake-pkg-config, and modify that to look at param 3 instead of param 2 (which is in my fork). There are a few instructions at the top of ...


3

This works: -vf "drawtext=text=string1 string2 string3 string4 string5 string6 string7 :expansion=normal:fontfile=foo.ttf: y=h-line_h-10:x=(mod(5*n\,w+tw)-tw): fontcolor=white: fontsize=40: shadowx=2: shadowy=2" See Desmos for how it works. x-axis is the video width. y-axis is time. The black line is the width of the image (adjustable in Desmos ...


2

Use tw. From the drawtext filter documentation: text_w, tw the width of the rendered text Using your example you would simply add: x=(2*n)-tw


0

I used the Media Autobuild Suite and it works like a charm, if you remove the --enable-libblueray from the ffmpeg configure line in the media-suite_compile.sh It automagically downloads the needed compiler and libraries and compiles everything for you. (including the requested libfdk_aac library)


3

You can use the drawtext filter. dynamic text The text can be changed during encoding if you use textfile and reload options: textfile A text file containing text to be drawn. The text must be a sequence of UTF-8 encoded characters. reload If set to 1, the textfile will be reloaded before each frame. Be sure to update it atomically, or it may be read ...


1

There are two problems: You're using PNG images as input. When converting images to video, the ffmpeg tries to preserve the image colorspace by choosing the yuv444p pixel format, which uses no chroma subsampling. Like it says: No pixel format specified, yuv444p for H.264 encoding chosen. Use -pix_fmt yuv420p for compatibility with outdated media players. ...


1

The best way to use current ffmpeg on Linux is to download a static build from this download site. I typically either uninstall distro-provided ffmpeg and put it where the distro's version would be or put it somewhere in the path where it is found earlier than the distro version or just call it with the full path


0

Several problems here: You are using an old version of avconv from the Ubuntu 12.04 repos. This version does not have an H.264 encoder (libx264) compiled into it. That's why it chooses MPEG-4 Part II video instead, using the mpeg4 encoder. While it still uses the same .MP4 container, MPEG-4 Part II is not as efficient as H.264. Your command uses -q:v 10, ...


-2

Try ffmpeg -i input.webm -sameq out.mp4 As alternatives, you can try FFMC: http://www.noobslab.com/2013/04/latest-ff-multi-converter-for-ubuntu.html or pre-compiled Miro: http://www.getmiro.com/download/for-ubuntu/


0

After some more research, I found out this previous post. So for generating *.mp4 file, the trick is to use: $ avconv -i input.avi -c:v libx264 -crf 22 -c:a libfaac -movflags faststart output.mp4 However -movflags faststart make sense only in the case of mp4 generation. Looking at man avconv from a debian/jessie system, I was able to find the suggested ...


1

WebM containers typically contain VP8 or VP9 video. The MP4 container format however does not support VP8 or VP9 video, at least according to the registration authority. In your command you are trying to copy the video bitstream, and obviously it will fail: codec not currently supported in container You have two options: Re-code the video to H.264 ...


0

The problem was in using the same file as input and output. Figured it out while writing the question. I'm keeping the question because I couldn't find it by googleing the error messages.



Top 50 recent answers are included