21:18
I need to create chunks of videos (.ts) of fixed duration (say 5 or 10 seconds) from a mp4 video. And also I need the chunks in different formats (260p, 480p, 720p, 1080p).
I'm able to create the chunks and m3u8 using the command below:
ffmpeg -i input.mp4 -g 60 -hls_time 10 out.m3u8
but not able to create for different resolutions as mentioned above.
21:03
I need to show two similar images from a webcam side-by-side.
I can achieve this with this piped command, but it runs with a few seconds latency:
ffmpeg -f dshow -i video="Logi C310 HD WebCam" -filter_complex "[0:v][0:v]hstack=inputs=2[v]" -map "[v]" -f matroska - | ffplay -
I'd prefer to do the same in just ffplay.
I'd also like to have the resulting image cropped to a square size or to the size of the original image (like if the picture from webcam gets divided by half and the halfs took each other places).
What I need in this end is a tool that (...)
20:01
I am receiving this warning from ffmpeg. The job runs and all the videos seem to output correctly. I have 2 hls, 1 mp4 with overlay + A single thumbnail.
The warning:
Stream #1:0: Video: png, rgba(pc), 500x38, 25 tbr, 25 tbn, 25 tbc
Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (360p.m3u
8) has not been used for any stream. The most likely reason is either wrong type
(e.g. a video option with no video streams) or that it is a private option of s
ome encoder which was not actually used for any stream.
The windows (...)
18:52
I'm trying to convert video to audio using ffmpeg in flutter based application but command is not working.
Is there something wrong with the command?
void convert(File pickedVideo) async
Directory applicationDocDirectory = await getApplicationDocumentsDirectory();
final outputPath = '$applicationDocDirectory.path/output-audio-$const Uuid().v1().mp3';
final session = await FFmpegKit.execute('-i $pickedVideo.path -vn -acodec mp3 $outputPath');
final returnCode = await session.getReturnCode();
(...)
15:01
I have a full time old mp4 video and a newest video, I want to trim frames from old video, then merge new to old trimed to build a new full video, can I do it in one ffmpeg command without reencode?
Something like oldFull.mp4 - lastFrames) + new.mp4 = newFull,mp4
If old full frames are oldFrames, and want to remove last frames as removeFrames, how can I merge new.mp4 to OUT?
ffmpeg -i IN -c copy -bsf:v noise=drop=between(n\\,removeFrames\\,oldFrames) (...)
14:24
I'm trying to convert video to audio using flutter ffmpeg kit package but it is returning ReturnCode 1 which is false
this is the command
Directory applicationDocDirectory = await getApplicationDocumentsDirectory();
outputPath = '$applicationDocDirectory.path/output-audio-$const Uuid().v1().mp3';
FFmpegKit.execute('-i $widget.pickedVideo.path -vn -ar 44100 -ac 2 -b:a 256k -f mp3 $outputPath');
is something wrong with the (...)
10:16
We are using ffmpeg for grabbing X11 session and we had changed a bit the commant run. I will write only the different part of the command; the rest were maintained so are not important for this problem:
ffmpeg ..... -t 00:14:58 (old command)
ffmpeg ..... -f segment -segment_time 900 -strftime 1 (new command)
Resulting files are (in both cases) MP4. But in new - using segments - variant I am able to open the file in VLC player as usual but I cannot do any location inside. So I have to wait for example 700s to see what had happened at that time - I cannot use VLC slider to (...)
13:05
I had previously built this youtube downloader but when I tested it recently; it stopped working.
from pytube import YouTube
import ffmpeg
import os
raw = 'C:\\ProgramData\\ytChache'
path1 = 'C:\\ProgramData\\ytChache\\Video\\\\'
path2 = 'C:\\ProgramData\\ytChache\\Audio\\\\'
file_type = "mp4"
if os.path.exists(path1 and path2):
boo = True
else:
boo = False
while boo:
url = str(input("Link : "))
choice = int(input('Enter 1 for Only Audio and Enter 2 For Both Audio and Video \\n: (...)
12:57
I am attempting to use FFmpeg and JavaScript to convert multiple PNG files to an MP4 video. However, sometimes the output video is not playable (1kb) and no error appears in the output.
This is the command that I run:
ffmpeg -y -r 25 -i "videos-reporter/123/screenshots/%04d.png" -c:v libx264 -preset medium -crf 20 -pix_fmt yuv420p -vf "scale=1200:trunc(ow/a/2)*2,setpts=3.0*PTS" -threads 4 "videos-reporter/123/video.mp4"
Output of playable video:
Input #0, image2, from (...)
12:54
FFMPEG C Library: Encoding h264 stream into Matroska .mkv container creates corrupt files
Above is the related question, and the answer of allocating memory for extradata of codec context works.
But on MacOS, with the encoder videotoolbox, this approach creates corrupted video file for any container, including mp4 and mkv. But what it does better for mkv is that at least the corrupted file is not 0 size.
I was wondering what is the correct way to encode stream to mkv on MacOS?
Below is my code initiating the outputcodec
auto path = previewPath.toStdString(); // (...)
10:19
the gif is not rendering
!ffmpeg -i /content/lipsync_facerefine_studio/assets/7cbdde.jpg -stream_loop -1 -i /content/lipsync_facerefine_studio/temp/c0703.gif -i /content/lipsync_facerefine_studio/lipsync/temp/48409e30-a572-42ac-9893-cf24f3cd866d.wav -filter_complex "[1]fade=in:st=0:d=2.5:alpha=1,scale=499.99999999999994:375.0[layer1];[0][layer1]overlay=x='if(lt(t,2.5),81.0-(w/2)+t*(w/5.0),81.0)':y=81.0:shortest=1[overlay1];" -map 2:a -map '[overlay1]' /content/lipsync_facerefine_studio/temp/temp.mp4 (...)
11:38
I'd like to encode to an XDCAM HD422 MXF file with FFMPEG. I've searched but cannot find the right command line arguments to use.
What command line arguments are required to encode a XDCAM-compliant output file?
06:53
I am using FFmpeg library to transcode a video file into multiple resolutions and create an HLS (HTTP Live Streaming) master playlist.
It takes a video file as input but its does give me the output with HLS playlist.I got a error called "Output format hls is not available". Only the Output directory is creating
I am using FFMpeg 7.0 full build version and also tried older versions and ffmpeg essentials and also tried chocolatey.
if i remove the implementation of HLS from this code.it will create 4 different resolution videos in my output.
Note:I just tried this same (...)