Questions tagged [ffmpeg]
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 program for transcoding multimedia files.
772
questions with no upvoted or accepted answers
9
votes
0
answers
6k
views
How to produce a zoom animation of a video source with ffmpeg?
I'd like to create a zoom-in animation over numerous frames of a video clip. I've tried a couple of approaches without much luck.
ffmpeg -i test-10s.mp4 -vf "zoompan=z='zoom+0.001'" zoompan-10s.mp4
...
6
votes
0
answers
2k
views
Merge Insta360 INSV files into 360 video with ffmpeg 360vr filter
Insta produces 2 video files, from back and front camera. They have .INSV extenstion, but they are acutally mp4 video files. That's how they look:
And expected result is 360 panorama video:
Can I ...
5
votes
0
answers
196
views
Optimized Parameters of `FFMPEG` for Screen Recording
Windows has a great codec for screen recording called Windows Media Video Screen.
It generates artifacts free videos which are highly compressed (small size).
I was wondering, what would be the ...
5
votes
1
answer
2k
views
Largest input image size when encoding a video?
I got a bunch of really large 16 bit videos, approaching 65535×65535 pixels in size. These are essentially high quality timelapse panoramas. I want to convert them to a 7680×4320 movie (8K UHD, 8 bit)....
5
votes
1
answer
2k
views
Extract the frame (in image format) at exactly every minute (or second) from a video (by ffmpeg)
Motivation: I would like to seek the frame, then take high quality and exact time screenshots (images) from a video.
The video is length is 00:48:43.71 and 23.98 fps (we can think it is 24 fps, isn't ...
4
votes
0
answers
1k
views
How can I change the sample rate of an audio file, without re-encoding?
I have a lossy AAC audio file. I would like it to be slightly faster, and slightly higher pitched. I would like to avoid loosing any audio quality, such as by re-encoding the stream.
I am well aware ...
4
votes
0
answers
9k
views
moov atom not found
I downloaded this video using youtube-dl's HLS downloader. The video was being HLS streamed using AES-128. Even though I could view it perfectly fine when it was being streamed in the browser, VLC ...
4
votes
0
answers
3k
views
Getting FFMPEG to stream video+audio through RTMP
Can someone help me with this:
The video streams fine but I can't hear any audio. I just hear random click sounds. Please help:
ffmpeg -f video4linux2 -channel 1 -i /dev/video0 -f alsa -i plughw:2,0
...
4
votes
0
answers
2k
views
FFmpeg map_channel and video
I have a file that has the following format (note the number of tracks and channels within each track):
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.mov':
Metadata:
major_brand : qt
...
3
votes
1
answer
5k
views
In FFMPEG's H.265 encoder, which CRF value leads to "visually lossless" results?
I am trying to shrink some videos from 1920x1080 to 1280x720 and to achieve a reasonable compromise between video quality and file size. I have decided to give FFMPEG's H.265 encoder a try, and now ...
3
votes
0
answers
701
views
Audio out of sync when import file cut by ffmpeg with -c copy
I have a lot of clips made with ffmpeg using this command:
ffmpeg.exe -ss XX:XX -t XX:XX -i original.mp4 -c copy clip.mp4.
That copy option gives a couple seconds of silence in a result clip, but ...
3
votes
0
answers
161
views
How do I compress a video and preserve quality in moving areas?
It's easier to notice details in still objects compared to moving ones, so modern codecs save bandwidth by reducing detail during movement. However, this optimization seems far too pronounced to me ...
3
votes
0
answers
629
views
Chrome renders WebM Video "darker" than other browsers / media players
Not sure if this is the correct community, but I have a question about video encoding and decoding.
I have a video that gets served in MP4 or WebM formats, depending on browser support. I noticed ...
3
votes
0
answers
4k
views
How to use ffmpeg to send video stream to another server that gives exactly same quality as manually copying the file to that server?
I tried doing this
ffmpeg -i tcp://192.168.1.41:5000?listen -c copy out.avi
and have another client publish to this server using
ffmpeg -i 1.avi -map 0 -c copy -f mjpeg tcp://192.168.1.41:5000
...
3
votes
0
answers
313
views
convert a normal video file into an SBS video in ffmpeg
I am looking to convert a file with ffmpeg into a side-by-side video without cropping or resizing. can you give me an example?
3
votes
0
answers
2k
views
Recording for Youtube: ffmpeg Thread message queue blocked
I was recording screencasts on Ubuntu 16.04 for youtube with my plantronics headset C520-M which worked just nice. I was using ffmpeg successfully.
Now I wanted to add some "live" video explaining ...
3
votes
1
answer
1k
views
Switching between multiple m3u8 playlist
In a live stream setup, I have 2 cameras and each one sends RTMP stream to one different application which is on my Nginx-RTMP server. On the browser I am using Videojs Hls plugin.
Now my question ...
3
votes
0
answers
1k
views
FFmpeg Windows MP4 - remove specific frames
I have a movie - movie.mp4. I wish to remove/delete specific contiguous frames from movie.mp4 which are located somewhere near the middle.
Specifically, total frames in movie.mp4 = 33,595.
I would ...
3
votes
0
answers
4k
views
How to Merge video files having different aspect ratio and make the narrow one padded
I am using below command to merge two videos
complexCommand = new String[]{"-y", "-i", file1.toString(), "-i", file2.toString(), "-strict", "experimental", "-filter_complex",
"[0:v]...
3
votes
0
answers
4k
views
Desktop grabbing with FFmpeg at 60 fps using NVENC codec
I'm having trouble recording my desktop at 60FPS using the latest Windows compiled FFmpeg with NVENC codec. Metadata says the file is 60 fps but when I play it, I can see clearly see it is not 60FPS.
...
3
votes
0
answers
2k
views
FFMpeg encode with original codec
I know about the -c copy switch with ffmpeg, but this does not work with filters as it means "don't re-encode". But what I want is to have my output use the same stream formats as my input. So if I ...
3
votes
0
answers
380
views
Is there a way? multiple images to looping video via ffmpeg?
I want to use ffmpeg to create a 15 second looping video from images for posting to instagram.
For instance:
Camera takes 3 pictures
Each image plays for 2 frames (3 images = 6 frames)
After 6 ...
3
votes
2
answers
3k
views
How to find/detect the real video resolution?
Imagine you have recorded/captured the screen at 1080p, but it was displaying a 480p video maximized to fullscreen.
The result file is technically 1080p, but it really is showing a 480p video, that is ...
2
votes
0
answers
23
views
How to cut a video by time into two pieces losssless and fast?
I have input.mp4 of length 30 minutes.
I want to cut it at roughly 24:35, as losssless as possible, as fast as possible.
So, the first output is from 0 inclusive to 24:35 exclusive. The second output ...
2
votes
0
answers
46
views
To make 'trim' and 'atrim' work synchronously
The following command trims a video using the trim video filter:
ffmpeg -y -i input.mp4 -vf "trim='00\:00\:05':'00\:00\:10',setpts=PTS-STARTPTS" output.mp4
But if the video also contains ...
2
votes
0
answers
74
views
Cutting and rejoining videos causes audio de-synchronization using ffmpeg
I'm trying to cut a video into pieces and rejoin them using ffmpeg on Windows 11 x64. Here's the details of ffmpeg:
ffmpeg version 2023-11-22-git-0008e1c5d5-full_build-www.gyan.dev Copyright (c) 2000-...
2
votes
1
answer
55
views
Is splitting a video for export a good technique?
Currently, I'm making a video that I intend to upload to YouTube. I used After Effects and Premiere Pro for this. Since it's a video that's almost 2 hours long, the export takes me about 16 hours ...
2
votes
1
answer
339
views
How to know which ffmpeg encoders are hardware accelerated?
On any given build of ffmpeg, ffmpeg -encoders will list which encoders can be used for encoding video.
Of the encoders listed, how can I tell which ones use hardware acceleration?
2
votes
0
answers
112
views
Any way to *list*, not remove, duplicate frames in an an MP4 file?
I can use ffmpeg -mpdecimate to remove duplicate frames in a video file, but is there any way to just list them, using ffmpeg or otherwise?
Ideally I'd get an output saying nothing happens at time x ...
2
votes
0
answers
340
views
What actually distinguishes various MPEG-4 Part 2 video codecs (divx, xvid, mpeg4, msmpeg4v1, mp4v, etc.)
I recently audited a large folder containing a variety of encoded videos from 2002-2014. Using ffmpeg, I extracted and recorded metadata, including the video codec used on the film. An example command ...
2
votes
1
answer
2k
views
Use ffmpeg to stream rawvideo from a USB camera
I have a image sensor that streams 640x480 in RAW8 format. A USB controller is receiving this data, packing two pixels of 8-bits each and sending to USB as a 16-bits per pixel YUV422 format (this is ...
2
votes
0
answers
908
views
FFMPEG conversion failed at random times on live stream to youtube
I am running a bash script using ubuntu server on arm64 that live streams video and audio to youtube, heres the script below
#! /bin/bash
VBR="8000k"
FPS="24"
QUAL="superfast&...
2
votes
0
answers
1k
views
Copy timecode from SEI Picture Timing to MXF Timecode Stream with FFmpeg
I am receiving an HEVC encoded live stream that contains SMPTE 12-1 timecode in the SEI picture timing, as it is recommended in ITU-T Rec-H.265-202108 Annex D.3.3 Picture timing SEI message semantics....
2
votes
1
answer
1k
views
Can I inject subtitles into a live stream with FFmpeg?
In my live streaming scenario I need to grab a video source and inject subtitles that I generate algorithmically during the stream (i.e. I do not know the subtitles upfront), and publish the streams ...
2
votes
0
answers
276
views
Problem combining multiple filters with ffmpeg
I'm trying to generate a video file out of 3 files:
file #1 and #2 are both dynamically generated image list file;
file #3 is a dynamically generated pcm file;
I need to slow down or speed up the ...
2
votes
0
answers
375
views
Stabilize MP4 from gyroscope metadata? (Insta360)
I just got an Insta360 One R 1-inch sensor and the footage is shaky as hell. I realised that you need their desktop application to actually stabilise in post-production but since I'm on Linux this is ...
2
votes
0
answers
34
views
Add splashscreen before video
I have:
splash.png having the same size as video resolution
video.mp4 in 60 fps already encoded via -vcodec h264 -crf 23 -acodec copy
I want to prepend (not overlay) video video.mp4 with ...
2
votes
0
answers
1k
views
HLS stream playing only when first segment is in m3u8 list
I am transcoding a live DVB-T2 HEVC stream to H264 using ffmpeg. I have decided to use the HLS (segmented) output format (because I want to play the stream in a web browser, e.g. on Android phone).
I ...
2
votes
0
answers
229
views
ticker text does not run really smooth
I want to create a ticker text video like the news ticker you see sometimes in TV. So I use
ffmpeg -loop 1 -i Transparent_800x20.png -vf drawtext="fontsize=16:fontcolor=black:fontfile=...
2
votes
1
answer
356
views
How can I programatically identify video frames containing a fixed rectangular area of a certain color?
I have video material containing frames with a rectangular area of uniform color interspersed with other content. I would like to identify these frames, with the intent of removing them. The ...
2
votes
0
answers
326
views
How to perform a "lighten only" operation in ffmpeg for prop flicker removal
I have footage shot from a helicopter and I would like to remove the rotor blades. Since the blades are so fast it seems feasible to use the pixel values from the next frame (usually the sky) wherever ...
2
votes
1
answer
1k
views
FFmpeg: chromakey without green edges
I have a video of a person on green background and I'm trying to turn background transparent:
ffmpeg -i bg.mp4 -i man.mp4 -filter_complex '[1:v]colorkey=0x00ff00:0.3:0.3[ckout];[0:v][ckout]overlay[out]...
2
votes
1
answer
2k
views
Correct method to set font-size in .ASS file
My final video output is 1080:1920 (9:16 aspect ratio), after padding.
In .ass file, I set
PlayResX: 1080
PlayResY: 1920
and then the font-size=130. But, this font-size doesnt occupy exact 130 pixels ...
2
votes
0
answers
664
views
Is there a hardware acceleration for audio encoding?
Video encoding with HW acceleration takes way less time than audio encoding. Is there a way to convert ac3 to aac faster?
2
votes
0
answers
1k
views
Why has grayscale a higher bitrate than YUV with H.265/HEVC?
For compression purposes, I am re‐encoding a grayscale video to the H.265/HEVC codec. Although the input video is more or less perfectly grayscale in aspect, it is provided in the yuv420p pixel format....
2
votes
0
answers
221
views
CODEC and Resolution in Multi-Variant Master playlist
I am recording my content in wowza using cupertino hls (.ts files).
I am building a playlist from these chunks at an interval of 30 mins. But while creating master playlist with all the bitrates, i ...
2
votes
0
answers
711
views
The ffmpeg webm_dash_manifest demuxer fails with webvtt subtitles
I am trying to create a DASH manifest using ffmpeg and I encounter some difficulties with the subtitles. I get the error
[webm_dash_manifest @ 0x55e19db48180] EBML header parsing failed
[...
2
votes
0
answers
489
views
Efficiently compressing a looping video with h264
I have a video that is initially 19 frames long and lasts for about 0.5 seconds, it's 432kB.
I've looped it over three minutes and the resulting file is quite large (200MB).
Using FFMPEG is there a ...
2
votes
0
answers
1k
views
Make ffmpeg read subtitles as stream
I have a stream (rtmp) and I would like to generate some subtitles for it(based on what's happened on stream). I can generate it like a pipe, or some other way. I use script like this:
for i in $(seq ...
2
votes
0
answers
2k
views
ffmpeg vp9 encoding settings to produce "yuv420p(tv, progressive)"
I have a webm video that was made (from an h264) using AWS Elastic Transcoder, using the "System preset: Webm VP9 720p" preset.
For this file, ffprobe gives:
$ ffprobe converted-mp4.webm
<snip&...