17:42
I developed a small application for my father. It uses Spring Boot, MySQL and FFMPEG, which I currently installed on Linux.
I want to host it, deploy it automatically, have a back up and root access for FFMPEG installation.
It runs smoothly locally on Windows / Linux, now I want to host it somewhere.
What I would like to have:
Ease of deployment: I got experience in adminstration of linux root servers, but I look for something easy to integrate and maybe automatically deploy it from Github or Gitlab
Backup: I want to backup the database ideally to another (...)
23:04
I want to use ffmpeg as a middleman to perform a functionality. The camera frames will be read through opencv and passed to ffmpeg for processing. FFMPEG need to pass the processed frames to opencv for displaying. Below is what I tried. The code hangs and is not displaying anything. Any help will be appreciated.
import cv2
import math
import subprocess as sp
import ffmpeg
import numpy as np
def main():
cap = cv2.VideoCapture(0)
if not cap.isOpened():
print("Camera can't open\\nexit")
return -1
width = 640
height = (...)
23:24
I have this command that I run via cmd in a folder and it executes without problems:
for %i in (*) do ffmpeg -y -i "%i" -vcodec copy -acodec copy -map 0:v -map 0:a "%i.mp4"
Now I want to create a batch file that I can just open and it will execute this command in the current folder.
However for the life of me I cannot get anything to work.
Ive tried googling the answer and tried lots of answers from here also, but it seems my knowledge is lacking a bit.
If anyone can give any tips that would be appreciated, thanks.
I apologize beforehand if something is blatantly (...)
21:39
I'm using ffmpeg to check for errors in video files, but while it reports tons of issues it doesn't tell me where exactly the error happens in the file. It just dumps some crazy long hex numbers (0x7fa…) which doesn't tell me anything. Is there a way to make it report some timestamps, or at least estimated timestamps, or byte-offsets into the stream? I tried the -debug_ts flag, but nothing changed in the output.
$ ffmpeg -debug_ts -v error -i a_broken_file.mp4 -f null -
[h264 ⓐ 0x7fa513023400] Reference 4 >= 4
[h264 ⓐ 0x7fa513023400] error while decoding MB (...)
09:54
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',
fontsize=30,
fontfile=r"D:\\projects\\python\\editor_bot\\downloads\\Candara.ttf",
text='test test test.',
x='if (eq(mod(t\\\\, 15)\\\\, 0)\\\\, rand(0\\\\, (w-text_w))\\\\, x)',
y='if (eq(mod(t\\\\, 10)\\\\, 0)\\\\, rand(0\\\\, (h-text_h))\\\\, y)')
.output(f'output-final.mp4')
.run()
)
second
fil = (...)
08:12
I am trying to use a custom font in the subtitles of a video using ffmpeg, but despite my efforts, the font defaults to Helvetica. Here is the code I am using:
import ffmpeg
import os
import tempfile
def test_subtitle_font(font_path):
# Simple arbitrary video and audio stream
video = ffmpeg.input('color=color=black:size=640x360:duration=5', f='lavfi')
audio = ffmpeg.input('anullsrc=channel_layout=stereo:duration=5', f='lavfi')
# Create arbitrary temp subtitle file
with (...)