Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line ...

0
votes
0answers
6 views

Overlay video with other video

I have a short and a long mp4 video. In the long video, I would like to replace the visual with a part of the visual of the short video. Additionally, I would like to keep the audio of the long video ...
0
votes
0answers
15 views

FFmpeg filter_complex: conditionally select overlay source

I'm trying to overlay an image on top of a live video stream. My filter looks something like this: [input][canvas]overlay=x=((main_w-overlay_w)/2):y=((main_h-overlay_h)/2)[output] However, my input ...
0
votes
1answer
19 views

ffmpeg concat creating time jumps

I am creating timelapse from PNG single frames. Using the first and last frame as stills I create header and trailer with text and fade filter. In the end I use concat to put all parts together. What ...
0
votes
0answers
12 views

Modify video frames but keep their timestamp in python skvideo ffmpeg

I have .ts videos with variable frame rate and I would like to modify the frames of the videos and keep the timestamps belonging to the frames. I am using python and experiencing with ffmpeg, but I am ...
0
votes
1answer
39 views

How to create “diagonal wipe” effect in FFmpeg?

Is it possible to create "diagonal wipe" effect in FFmpeg between two videos? An example: the first video is playing and after some time the second video is replacing the first video starting from the ...
0
votes
0answers
17 views

Attempting to restream an MPEG-TS stream as RTSP resulting in loss of audio?

I am using ffmpeg and ffserver to restream various RTMP and MPEG-TS streams as RTSP. At first glance it appears to be working, but I am running into very weird behavior. At least on two different ...
0
votes
0answers
20 views

FFMPEG Speed drops and warnings

I've been trying to stream from a BlackMagic DeckLink Mini Recorder to 4 different outputs using FFMPEG, but i get a huge delay let say more than 60 seconds of delay, it takes a long time to buffer on ...
0
votes
0answers
15 views

FFmpeg lossless RGB->YCgCo->RGB looking faded

I'm experimenting with using video codecs for compressing still images. I have 24 bit PNGs as the source files and everything is fine using rgb video codecs but I'm having trouble getting yuv codecs ...
0
votes
0answers
11 views

VLC MJPEG streaming falls behind source

I have a TCP streaming video source that I'm trying to publish as MJPEG using VLC. This sort of works: ffmpeg -re -fflags +genpts -stream_loop -1 -i "video.ts" -codec copy -f mpegts tcp://localhost:...
0
votes
2answers
28 views

Is it possible to use 2-pass encoding to create vp9 / webm videos from an image sequence?

I'm currently creating webm videos using ffmpeg to encode an image sequence. My command is: ffmpeg -framerate 30 -f image2 -i frames/%04d.png -i my_audio.flac -c:v libvpx-vp9 -pix_fmt yuva420p -b:v 0 -...
0
votes
1answer
30 views

Is it safe to use the yuva420 pix_format option with ffmpeg to encode webm videos?

I am encoding png image sequences to both webm and mp4 formats using ffmpeg. My goal is to achieve perceptually lossless videos, with the smallest file size I can reasonably achieve. The webm videos ...
0
votes
0answers
17 views

Ffmpeg find loop fragment in video

I found this answer: Finding the place where a video loops vut example Gyan not working. I have that error: Unrecognized option 'filter_complex[0]trim=start_frame=0:end_frame=1[c];[c][0]blend=...
0
votes
1answer
31 views

Output of FFmpeg has a “slow motion” part - what is it and how to avoid?

Source video I have a screencast recorded from iPad with QuickTime Player on macOS. When I open the original recording in QuickTime Player for playback, I can see the playback controls as below: ...
1
vote
2answers
40 views

How to concatenate 2 MP4 videos to output of certain bitrate?

I've already read the other articles about concatenating but couldn't find any that discuss specifying the output bitrate. I have 2 MP4 videos. What I want to do is speed up the first video to 110% ...
0
votes
0answers
21 views

Converting .ts to .mp4 (Output file #0 does not contain any stream)

I'm trying to convert a .ts file a recorded of a soccer game from my TV receiver. For that purpose I'm trying to use FFMPEG to do so. The command I've used is ffmpeg -i 000.ts -c copy ffmpeg-output....
0
votes
0answers
31 views

ffmpeg whitebalance adjustment calculation

I have a video file with a particular grey rgb value which is not correct when sampled with an eye dropper in photoshop. So I want to apply an adjustment via ffmpeg which I can using the eq filter. ...
1
vote
1answer
55 views

High cpu usage with FFMPEG copying video codec from HLS

Reposted from superuser: https://superuser.com/questions/1340574/ffmpeg-copy-hls-high-cpu-usage I have a set of batch scripts (Windows 10) to create an "instant replay" for some (11) HLS streams ...
0
votes
0answers
10 views

Merge audio tracks into 1 with ffmpeg

I am getting the following error when trying to merge multiple video files. mkvmerge -o '/home/videos/marged/new.mp4' '/home/videos/intro.mp4' \+ 'old.mp4' \+ '/home/videos/intro.mp4' Error: The ...
0
votes
0answers
12 views

ffmpeg: can I crop using vf while also using setpts=4*PTS at the same time? [duplicate]

how can i tegether two ffmpeg ffmpeg -i input.mp4 -vf crop=iw:ih/2:0:0 -preset veryfast - out.mp4 ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=1.1*PTS[v];[0:a]atempo=0.9[a]" -map "[v]" -map "[a]"...
0
votes
0answers
18 views

How do I provide attributes to ffmpeg showwaves output filter?

This is what I tried: ffmpeg -i outro.mp3 -filter_complex "[0:a]showwaves=s=128x96:mode=cline,format=yuv420p[v]" -map "[v]" -map 0:a -c:v libx264 -c:a copy output.mp4 It gives me output (mp4) in red ...
0
votes
1answer
21 views

How to encode this settings with ffmpeg?

I just read Recommended upload encoding settings article from official google support. I think this is the best settings for encoding my youtube videos. Can you help me find out how to encode that ...
0
votes
1answer
54 views

How to create “page turn / curl” effect in FFmpeg?

Is it possible to create animation that would be similar to "page turn / curl" effect in FFmpeg between two videos? The basic idea: the first video is playing and after some time the second video is ...
0
votes
2answers
166 views

Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly

I am using below command to push the video to Wowza server, since we are pushing raw h264 video, the rtp packet doesnot have the timestamp, and we could observe audio video sync issue while playing ...
0
votes
0answers
18 views

ffmpeg - voice over

before going with code I'd like to know if is feasible with FFMPEG this kind of task: I have a video, composed by many scenes, and a single audio as background. I 'd like to add a registered voice ...
1
vote
1answer
19 views

FFMPEG - Using variables in curves video filer expression

I'm tearing my hair out trying to get this to work, i assume it's a syntax issue. I'm experimenting with the curves video filter in ffmpeg. When I enter the coordinates in the standard form; ffmpeg -...
0
votes
1answer
64 views

AAC with no global headers is currently not supported

As per ffmpeg bitstream filter documentation, if we use -bsf:a aac_adtstoasc then the AAC stream from a raw ADTS AAC or an MPEG-TS container to MP4A-LATM. https://ffmpeg.org/ffmpeg-bitstream-...
0
votes
0answers
15 views

Why does the volume of the audio significantly go down when converting AAC stereo to AAC mono using ffmpeg

I am attempting to convert a stereo, left-channel-audio-only AAC audio file into a mono AAC file using ffmpeg. When the conversion is complete, I see a significant drop in audio volume in the ...
0
votes
1answer
28 views

“The sample rate of the two audio tracks is different”

I'm trying to merge a few video files through mkvmerge but I get the following error after running mkvmerge -o '/home/videos/marged/new.mp4' '/home/videos/intro.mp4' \+ 'old.mp4' \+ '/home/videos/...
0
votes
1answer
13 views

.webm blocky in initial frames, terrible for looping :(

I made a .webm by compiling a series of rendered out images with FFMPEG. I'm intending for it to loop in background. The problem is, the first frame/frames (not sure) come out very blocky. I used this:...
2
votes
1answer
37 views

How can I batch remove from videos all material that comes before the first all-black frame?

I have many hundreds of videos, each a few minutes long and to which was appended an intro and outro sequence that I would like to automatically remove. There is always an all-black frame immediately ...
0
votes
0answers
21 views

List of light and lossless codecs supporting alpha channel

first question ever. In my app I use ffmpeg to overlay half-transparent graphics (png) on rushes. Now I want to overlay videos like this [one][1] with the following requirements : lossless light (...
0
votes
0answers
166 views

How to download and encode a video from a MPD manifest?

I can watch videos on a website with MPEG-DASH technology. I can obtain the video's manifest.mpd file from the website. (I am not sure whether the file contains any user credentials or not, so I am ...
0
votes
0answers
42 views

FFMPEG AAC convert mp4 video to m3u8 format

I compiled ffmpeg and try to convert mp4 video to m3u8 format. But I get the error: ubuntu@ip-172-31-92-61:~$ '/usr/bin/ffmpeg' '-y' '-i' '/usr/share/nginx/nadtemp/9ee5d1c9ce0a.mp4' '-vcodec' '...
0
votes
1answer
18 views

ffmpeg - Trouble adding watermark + convert video quality in same command

So I have found this neat guide on converting video quality https://gist.github.com/dvlden/b9d923cb31775f92fa54eb8c39ccd5a9 To convert a video to 480p I run the following ffmpeg -i input.mov -preset ...
0
votes
0answers
31 views

Weather graphics with ffmpeg

I am a meteorologist producing my own weather maps. I've borrowed the code I use to produce animations from other VP.SE answers. The question is, am I doing it right? Here's my code. cd /home/...
0
votes
0answers
26 views

rtsp from camera,-> http with ffmpeg not working

I'm having a unifi dome webcam. Connected thrue a USG Pro4. I'm sending a rtsp live stream at 1024x576px. Until now I have been using ffserver to transcode the stream into a new mpjpeg stream that I ...
0
votes
0answers
22 views

Sample K representative frames within a video

I have an image-based processing module that takes photos for some computer vision processing. I have many videos, but I need to sample representative frames as its inputs, preferably those frames ...
0
votes
0answers
17 views

FFmpeg: Rename files

So I got few videos named [Erai-raws] Hanebado! - 01 [1080p][Multiple Subtitle].mkv [Erai-raws] Hanebado! - 02 [1080p][Multiple Subtitle].mkv [Erai-raws] Hanebado! - 03 [1080p][Multiple Subtitle]....
0
votes
0answers
65 views

How can I delete ALL duplicated frames with ffmpeg and mpdecimate?

I have CCTV footage exported from a motion activated camera system. When the camera is not active the exported file keeps time by overlaying a black rectangle on the most recent captured image, and ...
0
votes
1answer
11 views

Keeping sound from underlay video in creating PIP video with ffmpeg

I'm trying to make a video with an overlay video inside (PiP) but I can't get the sound source right, I need the sound from the underlay video but I keep getting the sound from the overlay video. I ...
0
votes
1answer
41 views

Can I update the scan type by ffmpeg?

I have a video, which was recorded by kurento. But the video can't replay. after I checked it, I think the reason is the scan type is incorrect. The work video, Tony-MacBook-Pro:ios tony$ ffmpeg -...
0
votes
0answers
32 views

Is it practical to record hours of 4K video in the field using ffmpeg with low quality loss?

Is it practical to use ffmpeg to capture hours of 4k video, reliably and with low quality loss? Or, has anyone tried it and discovered that it's really, really hard to do it well? We are setting up ...
0
votes
1answer
22 views

Benefit of having a GPU for adding watermark using FFMPEG using x.264

My understanding is that GPU acceleration is not beneficial to encoding using x264. The question is if there is any benefit to having a GPU if you are also adding a watermark.
0
votes
0answers
26 views

Random generation of green frames when exporting frames with ffmpeg

I am converting a TS file to yuv, then the yuv to nut and extracting couple of frames from the nut file using ffmpeg 4.0. Sometimes when I am doing it I am getting green frames at the output. The ...
0
votes
0answers
27 views

Transcoding mass video

I have a small video website based off PeerTube. The videos we upload need to be transcoded, some are old and wont be playable. I would like to know how I can transcode all the videos in a directory ...
1
vote
1answer
22 views

ffmpeg : error when added scale

I am trying to encode batch mkv videos which will give a output with a watermark in it. But when I add the -vf 840:480 or other resolution (like 720p or 1080p), it don't run but without -vf scale it ...
1
vote
1answer
26 views

ffmpeg png optimization like libpngquant?

The png codec in ffmpeg can result large pngs in certain cases. I know pngs are supposed to be non-lossy but there are libraries such as libpngquant that difference between the pixel and the value ...
0
votes
0answers
31 views

Apply scale to an overlay on existing background video

I need to apply an effect to an overlay on a background video, that will move the overlay from one position to another, and also scale it from one value to another, over time. The position values (x ...
0
votes
1answer
10 views

Is there a way to basically start a counter from a given frame in ffmpeg?

I want to perform a simple calculation to move an image along the video with given frames as the length of the animation: overlay=x='( 1 * INDEX)':y='(1 * INDEX)':enable='between(t,438/25,450/25)' ...
0
votes
1answer
36 views

How to have an overlay move to specific points at specific frames using ffmpeg

The folliwng should basically have an image appear on frame 438, and then the same image move to a different position on frame 339, then basically disappear for the rest of the video. ffmpeg -i C:\...