Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
33 views

How to automate ffmpeg to split and merge parts of video, and keep the audio in sync?

I have a Python script that automates trimming a large video (2 hours) into smaller segments and then concatenating them without re-encoding, to keep the process fast. The script runs these ffmpeg ...
Tree's user avatar
  • 31.3k
0 votes
0 answers
5 views

Issues with Video Recording Duration and Smooth Playback when Using v4l2 to MP4 (FFmpeg)

I'm trying to record a video from a USB device with v4l2 framework and save it in MP4 format using FFmpeg. My sample code successfully captures and saves the video, but I'm running into some issues: ...
Reena's user avatar
  • 11
-3 votes
1 answer
65 views

How do you convert fragmented MP4 to MP4 with ffmpeg and keep all fragments? [closed]

I am trying to convert a fragmented MP4 (fMP4) to a single MP4 file using ffmpeg. I expected the following command to work, but it only results in the initialization segment and the last three ...
Lars Rönnbäck's user avatar
0 votes
2 answers
95 views

Ffmpeg it's not setting the correct variable names and hence throwing Unable to choose format

I'm trying to automate the subtitle addition to a folder with some videos so I wrote the following script: forfiles /p "C:\Users\titos\Resilio_Sync\4K_Video_Downloader\videoprocess" /m *.mp4 ...
Miguel Arrieche's user avatar
1 vote
1 answer
40 views

Video Frame-by-Frame Deraining with MFDNet in Python

As this CodeReview question mentioned, I am trying to modify the code to process frame-by-frame rain streaks removal in a video. FFmpeg package is used in this code. import argparse import os import ...
JimmyHu's user avatar
  • 509
3 votes
0 answers
89 views

Calculating PCR (Program clock reference) in MPEG2 Transport stream

i am implementing transcoder and packager for abr protocols (HLS/DASH), and also udp mutlicast as output option. I am currently finishing multiplexing of mpeg 2 transport streams, but i do not really ...
Tomislav Timic's user avatar
1 vote
1 answer
119 views

Video streaming error: Uncaught (in promise) NotSupportedError: Failed to load because no supported source was found

Here is my problem: I have one video src 1080p (on the frontend). On the frontend, I send this video-route to the backend: const req = async()=>{try{const res = await axios.get('/catalog/item',{...
Aizen's user avatar
  • 21
1 vote
0 answers
210 views

Error Error sending packet to decoder -1094995529 when extracting audio from MP4 using FFmpeg C API

I am trying to extract audio from an MP4 file and save it as an MP3 using the FFmpeg C API. My code is able to identify the audio stream, set up the codec contexts, and start reading packets. However, ...
Saad Out03's user avatar
0 votes
0 answers
54 views

How to optimize this code that gets video frame as image

I am quite new to mp4 file. But here is my working attempt to extract image frame given video url and a timestamp. In reality the input url is an 8K 10hours 200GB video, so I can't download it all, I ...
TSR's user avatar
  • 20.2k
1 vote
0 answers
191 views

How to extract the first frame from a video?

I am trying to extract the first frame from a video to save it as a preview. Here's an almost working solution using ffmpeg: func extractFirstFrame(videoBytes []byte) ([]byte, error) { input := ...
Andrew's user avatar
  • 1,044
0 votes
0 answers
3k views

How to Download YouTube Videos in 1080p with English Subtitles Using yt-dlp with Python 3

I am trying to download YouTube videos using yt-dlp in Python 3.9. I want to download videos in 1080p quality and if 1080p is not available, it should download the best available quality. The audio ...
edge selcuk's user avatar
0 votes
0 answers
109 views

Download video with image overlay using flutter_ffmpeg

In my app i have a one video playing on screen, and on top of video I have placed one image. I want to save this video together with overlay image. So how to download using flutter_ffmpeg with flutter ...
Shiv Sharma's user avatar
0 votes
1 answer
344 views

nvenc for ffmpeg hardware acceleration with moviepy producing corrupted mp4

I've been trying to create a Python app that takes an mp4 file, an mp3 file, and a dictionary of captions to produce an output mp4 file. I got it to work well but I found the libx264 codec to be quite ...
six's user avatar
  • 23
-5 votes
1 answer
211 views

When extracting a part of a video with ffmpeg, without reencoding, the output is choppy [closed]

I extract the part 00:02:00.000 to 00:03:30.000 of a video with ffmpeg: ffmpeg -i input.mp4 -ss 120 -t 90 -vcodec copy -acodec copy output.mp4 It works but the output video is jerky/choppy, i.e. not ...
Basj's user avatar
  • 46k
0 votes
1 answer
333 views

What is the purpose of the split filter in FFMpeg? [closed]

In complex filters specifically, is there a situation where it is necessary to use the split filter, rather than use the same input multiple times? For example, consider the following FFmpeg command: ...
TheOrbitHeart's user avatar
0 votes
0 answers
46 views

Android FFmpeg export of the Video in SurfaceView with Pinch/Scale/Zoom/Bg Color Operation

I'm working on a feature in which I need to perform some actions on the selected video from the gallery and then upload it on the Backend server, on this selected video I can pinch it to scale up/down/...
CoderDev's user avatar
0 votes
1 answer
408 views

How to extract a frame from an INSV format 360 video using Python

I have a 360 video captured with an Insta360 X3, which is in the INSV format. I would like to extract a frame from this video using Python, FFmpeg, or any other suitable tool, without using Insta360 ...
Kalpesh Shinde's user avatar
2 votes
0 answers
68 views

FFMPEG in Android Kotlin - processed video should have specific resolution

I'm recording video from both the front and back cameras and I get a PIP video and a horizontal stacked video. I need to merge both videos after that. The problem with merging is that it requires both ...
Utsav's user avatar
  • 259
0 votes
0 answers
19 views

ffmpeg not recording frames

I am using Python to record 5 second videos from 3 webcams at once using ffmpeg. The recordings repeat at intervals of ~25 seconds. The code seems to work except intermittently a recording from one of ...
user avatar
0 votes
0 answers
44 views

drawtext with ffmpeg python

I am trying to add a text to a video using ffmpeg and python. I tried to do this in the following ways, but it didn't work. first ( ffmpeg .input(in_video) .filter('drawtext'...
Wolf Wolf's user avatar
0 votes
1 answer
108 views

ffmpeg: PNGs to mp4 video is strange scaled quicktime

I am trying to create a video from multiple PNG files. The files contain an animation of a line. However, the output MP4 video looks really strange, as if the content is stretched or scaled. Below, ...
v_b's user avatar
  • 46
0 votes
0 answers
68 views

Merge videos on computer automatically

I have some videos regularly downloaded to my computer, these are short videos, around 10-15 seconds each. I usually use https://online-video-cutter.com/merge-videos to merge them, and it serves my ...
Skyturkish's user avatar
0 votes
1 answer
154 views

Flutter: How to use "ffmpeg_kit_flutter" to merge videos?

i am using "ffmpeg_kit_flutter" to merge two videos with code import 'dart:io'; import 'package:ffmpeg_kit_flutter/ffmpeg_kit.dart'; import 'package:ffmpeg_kit_flutter/abstract_session....
Hani Kanakri's user avatar
0 votes
1 answer
58 views

(C_UDP Socket Programming) How can I convert binary file to video format?

I am practicing UDP socket programming. My code's functions are below. Connect Server-Client and send "hello" message each other (it is working). Then Server is sending video file to client ...
user24723398's user avatar
0 votes
1 answer
114 views

How to create video from a stream webcam and canvas?

I am trying to generate a video on browser from different cut: Slide: stream from canvas Video: stream from webcam I just want to allow user to download the video edit with slide1 + video1 + slide2 + ...
Stefdelec's user avatar
  • 2,801
0 votes
1 answer
135 views

ffmpeg merge audio and video from ytdl-core, outputs an mp4 with no time (no seekable)

i'm trying to merge video and audio from ytdl-core with ffmpeg and export it to user in mp4. The output video apears without time (inifit duration) and can not seek or navigate to another point of the ...
Andreu's user avatar
  • 1
0 votes
0 answers
23 views

Try to concatenate videos using FFmpeg Package. My videos concatenate correctly but those that i record from fornt camera rotate 90' in concatenate

Here is my code where I pass a list of image paths that concatenate. I am facing an issue with the front camera video. When concatenated completely some videos rotate 90 degrees. Future<void> ...
Ahmad Akram's user avatar
0 votes
0 answers
113 views

How to read an sdp file using python

I am runnig following command to forward webcam using ffmpeg to a remote IP over a cellular network ffmpeg -i /dev/video0 -c:v libx264 -crf 35 -preset ultrafast -vf "eq=gamma=0.8" -f rtp &...
Mubashir's user avatar
  • 135
0 votes
0 answers
344 views

How to extract the audio stream from an mp4 video file?

Basically I am using this python code but when I put the extracted audio stream below the video stream with the same audio, they don't line up. One interesting detail is when I used the video editor ...
Joan Venge's user avatar
  • 330k
0 votes
0 answers
223 views

Python OpenCV VideoCapture Color Differs from ffmpeg and Other Media Players

I’m working on video processing in Python and have noticed a slight color difference when using cv2.VideoCapture to read videos compared to other media players. I then attempted to read the video ...
cliffsu's user avatar
  • 71
-1 votes
1 answer
254 views

When usg ffmpeg to convert from .mp4 to .avi, how do I get the .avi files to contain the correct (trimmed) frames from the .mp4?

I am using ffmpeg to convert a batch of .mp4 videos to the .avi format from the command line. The .mp4 videos are all trimmed videos that are sub-videos of a longer video. I have basically segmented ...
cassenav's user avatar
  • 151
0 votes
1 answer
499 views

Using FFMPEG and PHP to encode HLS video on the fly

I'm re-encoding a MP4 video to HLS using FFMPEG with PHP. I'm trying to then directly serve to the output to a HTML page's <video> tag. The following script (encode.php) encodes the video as I ...
mrsmith's user avatar
0 votes
0 answers
69 views

Emulate YUV420 stream for OpenCV

I'm working on a project that will treat the images coming from a camera in YUV420 format connected by ethernet. During the development, we can't have constant access to the camera so I wanted to ...
Ivan's user avatar
  • 1,433
1 vote
1 answer
250 views

gstreamer cant demux a .ts video but ffmpeg can. How can I fix the error?

I have a .ts video that when I run through a basic gstreamer pipeline I get an error that it can't demux the video. comand: gst-launch-1.0 filesrc location="/videos/my_video.ts" ! tsdemux ! ...
Zack's user avatar
  • 179
0 votes
0 answers
43 views

How to create video by stitching together images (.png) where the serial on each image file increases by 6

I am trying to create a video (preferably mp4) from a series of png images. However, the name of each image file increases by 6 every frame. For example, I would have depthframe_0000 as the first ...
DataStatsExplorer's user avatar
-1 votes
1 answer
26 views

Cutting sections with -ss and -t is not frame accurate

I'm using ffmpeg 6.0 to extract small sections from longer videos. According to the doc i can use the -ss option to specify the start time and the -t option to specify the duration and this should ...
Théo Champion's user avatar
-2 votes
1 answer
158 views

Converting Multiple Videos from S3 into GIFs with Random Frames using Python and Lambda

I have a collection of videos stored in an S3 bucket, and I'm looking to automate the process of converting these videos into GIFs using Python and Lambda. Each resulting GIF should be precisely 10 ...
rahulfaujdar's user avatar
-2 votes
1 answer
496 views

Can't convert video with cuda after updating ffmpeg

i've used this command sometimes to convert 4k video into 1080p without problem with tool "ffmpeg batch" and ffmpeg 5.1? "2022-08-10-git-8fc7f0fdec-full_build-www.gyan.dev Copyright (c) ...
Peppe's user avatar
  • 1
0 votes
0 answers
28 views

Merge (concat) all video file present in '43. DP (Part1)' and put it into '43. DP (Part1)' and give name merged (concat) file to folder name

I have parent folder alpha part 3 which contain child folder 43. DP (Part1), 44. DP (Part2), 45. DP (Part3). I want to merge (concat) all video file present in 43. DP (Part1) and put it into 43. DP (...
Anu Mau's user avatar
  • 11
-2 votes
1 answer
1k views

FFMPEG fast quality video encoding without quality loss & less storage occupancy (maybe using GPU)

I Have written a go code but it is slow and the video compression rate is also not that impressive. I am new to FFMPEG and my entire project depends on FFMPEG. I have tried different video codecs like ...
Diwash Mainali's user avatar
0 votes
0 answers
17 views

NodeJS FFMPEG : Issues combining the crops and the trims

I'm building a video editor where I can trim multiple clips and adjust the videos by cropping each clip. For example the first clip is centered in the middle and the second clip would be centered at ...
Lqmnn B.'s user avatar
0 votes
0 answers
109 views

Trouble downloading a youtube playlist and converting to mp4 with audio/video

I am having difficulty with a side project I am working on. The goal of the program is to be able to do a few functions with a youtube video or playlist link. download a youtube video and audio and ...
Patrick Coogan's user avatar
0 votes
0 answers
30 views

Create video with size based on image and place a video somewhere with an offset

I am trying out FFMPEG and I am unsure how hard it is to do what I want. I have some device frames and I want to play a video inside the frame. For example, this is a device frame: Now I want to play ...
NoKey's user avatar
  • 383
1 vote
1 answer
86 views

C# 16-bit grayscale Bitmap array to video

I have some scientific data that comes in 16-bit grayscale and is unsigned. I need the wide range of grayscale values and C# already supports the format for Bitmap structure using PixelFormat....
Everyone's user avatar
  • 1,815
0 votes
1 answer
199 views

Extend Frame Size and Re-Encoding Video to be Blu-Ray Compliant with ffmpeg and tsMuxer

I have a media file with the following video stream: Stream #0:0: Video: hevc (Main 10), yuv420p10le(tv, bt709), 1440x1080 [SAR 1:1 DAR 4:3], 23.98 fps, 23.98 tbr, 1k tbn (default) I am attempting to ...
grendell's user avatar
-1 votes
1 answer
117 views

How to record frames with ffmpeg and finish the recording

In the following code, i trying to create a class to record frames from an IP camera (RTSP), save frames on a .avi file and finish the record, but, when i kill the operation, the video file may be ...
Jorge Augusto Wilchen's user avatar
2 votes
0 answers
146 views

Can you reuse an init.mp4 file for two separate FMP4 videos if they are encoded to the same specification?

I have two separate FMP4 (Fragmented MP4) videos that I need to encode. Both videos will be encoded to the same specifications, including resolution, bitrate, and codec settings. I understand that ...
TCR's user avatar
  • 65
0 votes
0 answers
72 views

Saving monochrome video in nvenc lossless

I have a very high res, high frame rate video from a monochrome camera (industrial) - at the moment it is saving all three RGB channels, which means before compression the 1:38s video is 9GB+ I'm ...
TimNewman's user avatar
1 vote
0 answers
73 views

How to extract good quality frame in pixel format from live mpeg-ts stream?

I use the command below to stream my ts file for my programe: ffmpeg -re -i independent_frame.ts -f mpegts udp://127.0.0.1:10002 Below is the code of my programe, I'm trying to extract each frame in ...
Aven's user avatar
  • 11
0 votes
1 answer
210 views

TypeError: __init__() missing 2 required positional arguments: 'stdout' and 'stderr'

I encountered the following error while running a program extract_frame_and_wav_multiprocess.py, which is designed to extract audio and frames from the videos in dataset MSRVTT. Here is the error ...
mike.w's user avatar
  • 39

1
2 3 4 5
97