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 (...)
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 (...)
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 = (...)
09:48
I want to show the video on the browser streamed by ffmpeg.
Here's the python script which i made but can't find the way to do so since i am not much into javascript. Can anyone help me please ?
import socketio
import subprocess
import uvicorn
sio = socketio.AsyncServer(async_mode='asgi', cors_allowed_origins='*')
app = socketio.ASGIApp(sio)
ⓐsio.event
async def connect(sid, environ):
await sio.enter_room(sid, 'Streaming')
ⓐsio.event
async def stream(cid):
video_path = (...)
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 (...)