18:58
For a given video uploaded by a user, I need to create three versions of it to cover standard definition (SD), high definition (HD), full high definition (FHD), and ultra high definition (UHD e.g. 4K). "resolution/encoding ladders" for standard aspect ratios like 16:9 and 4:3.
For 4:3 we might have:
640 x 480
960 x 720
1440 x 1080
2880 x 2160
For 16:9 we might have:
854 x 480
1280 x 720
1920 x 1080
3840 x 2160
If a user uploads a file in either of those aspect ratios, we can create the four different versions because the resolution (...)
18:15
This is with "FFmpeg Media Encoder" from Google Store (Linux-based Android OS), but it has all the commands of ffmpeg for normal Linux.
shortest truncates the video to match the audio, and -longest has the last half of the video not have audio (for videos twice as long as audio,)
what to use to loop audio (to match length of video with this)?
Video length is 15:02, so used ffmpeg -i "/audio.m4a" -c copy -map 0:a:0 "/audionew.m4a"-t 15:02 -stream_loop -1`, but got (...)
17:55
I am trying to build a C++ program, and the creator is using depreciated functions, I have been replacing them fairly easily, but I am not totally sure how to replace these.
This is a sample from the decode file:
#if defined HAVE_AVCODEC_SEND_PACKET && defined HAVE_AVCODEC_RECEIVE_FRAME
AVPacket* pkt = av_packet_alloc();
if (!pkt)
return 0;
pkt->data=data;
pkt->size=datalen;
int ret = avcodec_send_packet(codecContext, pkt);
while (ret == 0)
ret = avcodec_receive_frame(codecContext,frameIn);
if (ret != 0)
(...)
17:46
1) I wrote a Python code to receive video in real-time, compress it, duplicate the video, and then send it to OpenCV and UDP using ffmpeg. I would like to know how I can duplicate the code to send it to both UDP and OpenCV (without sending it to another device) without affecting the frame rate.
This is the code I used so far:
import subprocess
import cv2
# Start ffmpeg process to capture video from USB, encode it in H.264, and send it over UDP and to virtual video device
ffmpeg_cmd = [
'ffmpeg',
'-f', 'v4l2', # Input format (...)
10:02
I'm working on a React.js project where I need to process videos in the browser using ⓐffmpeg/ffmpeg. I noticed that the package has been updated recently, and the API and functions have changed.
In the older version, I used to import the package and functions like this:
import createFFmpeg, fetchFile from 'ⓐffmpeg/ffmpeg';
However, in the latest version, I see that the import has changed to:
import FFmpeg from 'ⓐffmpeg/ffmpeg';
and all new functions are changed I have checked in by log:
I have check by console ffmpeg, it (...)
08:44
I've 2 h264/aac stream TS files (say a.ts and b.ts) that have same duration and packet numbers. However PCR/PTS/DTS data of their audio/video stream packets are different. How do I copy PCR/PTS/DTS data from a.ts to b.ts using ffmpeg or other tools without actually overwriting the audio and video frames data? Ideally want to do this without re-encoding.
07:49
I am programming a Spring Boot Application using Maven and Java 21. I am trying to record a stream from a url and save it to a mkv file. I intend to do this with kokorin/Jaffree in version 2023.09.10. The recording seems to work ok, however longer videos are terminating unexpectedly. Sometimes after 5 minutes, other times an hour or even longer. Sometimes with Exit Code 0 and sometimes with 1.
I have implemented the recording like this:
ⓐOverride
public void startRecording(RecordingSchedule recordingSchedule)
logger.info("Starting recording for schedule with filename (...)