Tag Info

New answers tagged

0

While I don't know about setting the profile, this is the x265 CLI code when setting the profile to main still picture : param->maxNumReferences = 1; /* The bitstream shall contain only one picture (we do not enforce this) */ /* just in case the user gives us more than one picture: */ param->keyframeMax = 1; param->bOpenGOP = 0; ...


2

The overlay filter has a shortest option: If set to 1, force the output to terminate when the shortest input terminates. Default value is 0. Example: ffmpeg -i input -filter_complex "color[c];[0:v][c]overlay=shortest=1" output Usage of shortest is needed because the color duration is indefinite (unless you use the d option).


0

.wav is a RIFF File format (msdn) Size of RIFF chunk data is stored in 32 bits. (max. unsigned value is 4 294 967 295) RIFF is limited to ~4.2 GBytes per file. When software creating a very big RIFF chunk, its storing size in 32 bit value. At some point integer overflow is occur and higher bits of number is dropped: Example file: 6.220 GBytes / ...


0

Your syntax for the overlay is correct as per the example given, however invoked like that it will repeat indefinitely as you note. You will need to include the repeatlast=0 option: repeatlast If set to 1, force the filter to draw the last overlay frame over the main input until the end of the stream. A value of 0 disables this behavior. Default ...


0

Assuming Linux or some flavor of UNIX and image.png is literal: cd /media/volume/mp3_directory ls *.mp3 | while read mp3File ; do outputFile=$(basename "${mp3File}" .mp3) ; ffmpeg -i "${mp3File}" -loop 1 -i image.png -c:a copy -c:v libx264 -shortest "${outputFile}".mp4 ; done


0

If you want to batch convert you should use the shell for it (assuming Linux). Use find to return all files in a directory and '| xargs' to apply the given ffmpeg command to each.


1

Here's what I'd suggest: If you're able to test the output sync of your camera by using a raspvid preview window and you find the camera to be lagging behind, then I'd say the camera's h264 encoder is to blame. If it's in sync, however, then FFmpeg is doing a number on the piped input. If the camera's h264 encoder is the problem and the video lag behind the ...


0

Your two inputs seem to be the same file (2.mp4); so you can do a bitstream copy as mentioned on the documentation page on Concatenating videos as the codec parameters will match: file concat.txt: file '/full/path/to/2.mp4' file '/full/path/to/2.mp4' and then use the command: $ ffmpeg -f concat -i concat.txt -c copy out.mp4 However, you will have to ...


2

Your friend is right- ffmpeg only cuts at keyframes when doing a stream copy. If you transcode, you can do a frame-exact copy; for example: $ ffmpeg -i source.mkv -ss 01:02:37.754 -map_chapters -1 -c:v libx264-c:a copy -crf 18 -t 00:04:52.292 output.mkv Change the value for crf to suit your quality. Do note that since this is a transcode it will take much ...


0

ffmpeg -i in.mp4 -c copy -metadata:s:v:0 rotate=90 out.mp4 That's worked for me but not work all video player. But it is so fast than other commands. It just change the rotate flag. (Note special angle can't work with this).


1

The reason it's slow is not because of the rotation, it's because you reencode the video. When you don't specify an output video codec, the default for mp4 is H.264 (libx264) preset medium, which depending on the resolution and your hardware, can be slow. I see you try to go around that by specifying "-c copy", but you can't : rotating the video means ...


1

I'm suggesting rotate instead of transcode. ffmpeg -i input_video -vf "rotate=PI/2" output_video Also see here and here for more information. Hope this helps!


1

The -itsoffset option should do what you want: -itsoffset offset (input) Set the input time offset. offset must be a time duration specification, see (ffmpeg-utils) the Time duration section in the ffmpeg-utils(1) manual. The offset is added to the timestamps of the input files. Specifying a positive offset means that the corresponding ...


2

My approach would be two separate commands, one to calculate the dimensions and another to overlay. You can simply use FFprobe which comes alongside with FFmpeg. To calculate the dimensions you can use the following command. ffprobe -v error -show_entries stream=width,height -of default=noprint_wrappers=1 input_video This will result like following. ...


0

I also had the same issue, I have a way where I am able to append audio back to this filter,simply add [0:a]aresample=44100; It will resample audio at 44100 Hz(Change this value as per need) but Yes audio will now be there.Hope it helps.


1

Here's the trick... FFmpeg and its related tools, FFserver and FFplay, don't have any mechanism for live input-switching to a single running output. They also don't have any built-in way to trigger an external event when a UDP stream starts up; at least none that I've been able to find. In order to pull off your intended action, one solution would be to ...


0

To delete your unwanted source files after each successful FFmpeg operation, you can add script code to the end of your FFmpeg commands with a double ampersand. This way the source won't be deleted if FFmpeg errors out for some reason, but you should still be cautious... Nothing worse than wiping out your source before discovering you set the wrong seek or ...


1

According to the generic codec options, you can add -time_base to the libx264 encoder set during the creation of the transitional clips. If I'm reading your file comparisons correctly -- ab-transition.mkv is showing a tcb of 1/120 while B.mkv is showing 1/125 (which is the value you want, right?) -- I'd suggest including an -r value in as well to make ...


3

Getting the smallest video with the least amount of quality lost is more of a challenge than anything else. There are guides scattered among the Web that will recommend you settings to use on FFmpeg for things like game captures, streams, DVD rips, etc. If you want lossless lossless, try this: ffmpeg -i input.mp4 -c:v libx264 -crf 0 output.mp4 The ...


0

What are you trying to achieve in the first place ? My guess is that you forgot to specify which codecs ffmpeg uses on the stream after the decoding. It reencodes any input with libx264 as a default and it's too slow for your computer => you miss frames from the input. When specifying an avi file, ffmpeg will use mpeg4 as a default codec which is much ...


1

The blurring is happening because you're reencoding the whole video, not because of a faulty subtitle burner. I'd suggest specifying H.264 as your video codec and at the same time copy the audio track, otherwise ffmpeg will reencode it using libvo_aacenc : ffmpeg -i input.mp4 -vf "ass=subtitle.ass" -vcodec libx264 -x264-params crf=18 -preset veryslow ...


3

You can try to encode with libx264 crf 18. It is well known for producing a (arguably) "visually lossless" result. ffmpeg -i input.avi -vcodec libx264 -x264-params crf=18 -preset veryslow -acodec copy out.mp4 Notice that I used a veryslow preset which will give you the smallest file possible. Also, I decided to copy the audio track instead of reencoding ...


0

MP4 does not support SRT. You can either use softsubs or hardsubs. softsubs Subtitles that consist as a separate stream in the file. They can be toggled on/off by the player, and do not require the video stream to be re-encoded. ffmpeg -i input.mkv -c copy -c:s mov_text output.mp4 Player support for timed text softsubs in MP4 can be rather poor. You'll ...


0

Some really good information about h264 encoding here: https://trac.ffmpeg.org/wiki/Encode/H.264 A pretty good benchmark are the default presets which will be better than using an mpeg4 codec (which is what you are using in the original question). Try: ffmpeg -i test.mp4 -vf scale=640:480 -c:v libx264 -c:a libfdk_aac -ab 128k out.mp4 If that works for ...


0

You can use silencedetect with filter_complex. So you can select the required channels from the input video and get them through filters. Following is the FFmpeg command I'm suggesting. ffmpeg -i input_video -filter_complex "[0:a]silencedetect=n=-50dB:d=1[outa]" -map [outa] test1.mp3 This will give you the corresponding silent time periods and you can use ...


1

I didn't have time to test it but this should work if you want to go with MoviePy: from moviepy.editor import * clips = [ VideoFileClip("vid1.mp4"), VideoFileClip("vid2.mp4"), VideoFileClip("vid3.mp4"), ... ] fade_duration = 1 # 1-second fade-in for each clip clips = [clip.crossfadein(fade_duration) for clip in clips] final_clip = ...


0

Here is audio concat example: ffmpeg -y -f s16be -i /dev/zero -af "[in]anullsink;amovie=1.wav[a1];amovie=silence.wav[a2];amovie=2.wav[a3];amovie=4.wav[a4];[a1][a2][a3][a4]concat=n=4:v=0:a=1[out]" -shortest -t 12 output.wav Notice couple of things you need to know here: I started with a clean input /dev/zero, it's nice, yet, can there is probably a nicer ...


0

FFmpeg is capable of handling this. What you need to use is filter_complex with filter chaining. You can create a silent audio with aevalsrc. To create a 5 sec silent audio, aevalsrc=0:d=5 So the following command will work for you. ffmpeg -i input_audio_1 -i input_audio_2 -i input_audio_3 -filter_complex " aevalsrc=0:d=10[s1]; aevalsrc=0:d=15[s2]; ...


0

Merge audio and video file by FFMPEG use this command. ffmpeg","-y","-i", VideoPath, "-i", audioPath, "-map", "0:0", "-map", "1:0", "-codec", "copy", "-shortest", outputFilePath


0

Postprocessing Genrally, crap in = crap out, but you could possibly make it look "better" with one of the many FFmpeg postprocessing filters: fspp, pp, pp7, spp, uspp. original image with typical artifacts postprocessed image Example command ffmpeg -i input.mpg -vf "pp=hb/vb/dr/fq|8" -c:v libx264 -crf 23 -preset medium \ -tune animation -c:a copy ...


2

According to an entry on the FFmpeg Auto Installer's "support forum", re-running the script should pull down the latest source and upgrade your installation for you. Since said forum is pretty janky (tread carefully, traveler), I pulled the installer down and took a precursory look at its innards. It does appear that the FFmpeg-specific script is set up to ...


0

try to restream audio on rtp://127.0.0.1:1235 and combine the video in mp4 container.


1

From the FFmpeg documentation on the concat format: All files must have the same streams (same codecs, same time base, etc.). Note that the documentation for the concat filter has similar requirements: The filter works on segments of synchronized video and audio streams. All segments must have the same number of streams of each type, and that will ...


0

You need to specify the options in the filter by name, so your original filter settings would need to be changed to... -filter_complex "[0:v]eq=contrast=1:brightness=0:saturation=1:gamma=1: gamma_r=1:gamma_g=1:gamma_b=1:gamma_weight=1[outv]" ...if you wanted set all of those parameters. Otherwise, the filter is going to ignore your settings and apply the ...


1

Here's the problem: FFmpeg doesn't have a specific AMF (Action Message Format) muxer/encoder -- at least not currently -- so there's no true way to use it to create an "amf0" data stream in your output file to mirror Wowza's results. What your current script is doing is taking whatever data's present in your SRT file and muxing it into your video as a ...


0

Finally created the effects by chaining colorchannelmixer and eq filters. According to the effects mentioned here, I applied sepia effect using colorchannelmixer filter and adjusted rest of the properties using eq filter. For sepia effect you can use sepia matrix by substituting amount with sepia value. All the other properties can be applied directly with ...


0

Try using the apad audio filter to extend the stream with indefinite silence. You should be able to either add an -af command to your existing string... -vf "[0]tinterlace=interleave_top" -af "[1]apad" ...or change your existing -vf string to -filter_complex to handle both the audio and video filtering commands... -filter_complex ...


1

Reputation's not high enough to comment on szatmary's answer, so pardon the redundancy. FFplay syntax would be: ffplay -f dshow -video_size 720x576 -framerate 60 -i video="Decklink Video Capture":audio="Decklink Audio Capture"


1

FFMPEG recently changed the default behavior to auto rotate input video sources with "rotate" meta data. So a new solution to this problem would be to update FFMPEG to 2.7 or the git master branch. However: If you have already implemented one of these solutions and update this is bad news. FFMPEG will rotate your video before your filters will rotate ...


0

ffmpeg comes with a utility call ffplay that should do what your looking for.


0

In your first command, you didn't specify that test.mkv was your output file. Looks like you need to change that part to be something like ... -c copy test.mkv or specify the codec like ... -c:s copy test.mkv. And not sure what that -newsubtitle flag is doing in there. But if you have a subtitles file you want to add in, you should be able to do another ...


2

If you need the original audio with the output file following will work for you. Map the input audio channel to the output using map option. -map 0:a -c:a copy You can make it more accurate by appending a silent audio clip to the start and the end of the video to the same duration as the black screen duration. Same way include the following in ...


2

I don't know, why only every second ffmpeg command is executed, I could not reproduce this on my machine. However, you approach is too complicated. A cleaner solution would be: for bash compatible shells: for i in *.MTS; do ffmpeg -i $i -c:a copy -c:v copy ${i%MTS}mp4 done Please read about the % and related operators in the section Parameter ...


0

Simple: ffmpeg -i Movie.mkv -map 0:s:0 subs.srt


0

For audio cross-fading you can use something like this. ffmpeg -i input_video_1 -i input_video_2 -filter_complex " [0:a]afade=t=out:st=9:d=2[a0]; [1:a]afade=t=in:st=0:d=2[a1]; aevalsrc=0:d=9[s1]; [s1][a1]concat=n=2:v=0:a=1[ac1]; [a0][ac1]amix[a]" -map [a] -c:a libfdk_aac -ac 2 -b:a 128k output_audio Here this will cross-fade the audio from two video files ...


2

You can try this. ffmpeg -i input_video -loop 1 -i input_image -t video_duration -filter_complex "[0:v]scale=iw*80/100:ih*80/100[vo];[1:v][vo]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2,setpts=PTS-STARTPTS[outv]" -c:v libx264 -map [outv] output_video Here you have to use filter_complex and map for overlaying and do the scaling, etc. 0:v refers to ...


0

The eq filter adjusts the color channels relative to their current state, that is, increasing or decreasing their intensity (like a "volume" knob in sound). To achieve your target color temperature with eq you'd have to calculate the current color temperature of each region in the photo and then modify it - something for which you need a frame server such as ...


2

I suspect your text editor had “smart quotes” enabled when you created your Cam1.txt file list, so all those… file '/path/to/file.mp4' …lines ended up like this… file ‘/path/to/file.mp4’ …which ffmpeg misinterpreted as relative paths with funny characters in them. Go through your Cam1.txt and make sure all your paths are encased in old ...


2

Go through the guides and diagnose each error as it arises. For example, "No such file or directory" is vague on its own, but looking at line 42 of ./configure may help.


2

Option 1: Add /home/virtfs/trvl/usr/bin to your PATH variable Option 2: Diagnose why make install did not install ffmpeg into /usr/bin or /usr/local/bin



Top 50 recent answers are included