18:57
I am opening a network file via HTTPS like this:
avformat_open_input(&m_format, "https://www.example.com/file.mp4", nullptr, nullptr);
It works, however sometimes connection is closed and this is logged:
[tls ⓐ 0x7f600ba690] Error in the pull function.
[tls ⓐ 0x7f600ba690] IO error: Connection reset by peer
[mov,mp4,m4a,3gp,3g2,mj2 ⓐ 0x7f6007e450] Packet corrupt (stream = 0, dts = 24188928).
[aac ⓐ 0x7f60324800] Input buffer exhausted before END element found
I found it possible to setup reconnection by logs from this post. Here are their (...)
18:18
I have some problem to add several fade effects to one audio file. When I try to use a command like this:
ffmpeg -y -i /home/user/video/test/sound.mp3 -af "afade=t=in:ss=0:d=3,afade=t=out:st=7:d=3,afade=t=in:st=10:d=3,afade=t=out:st=17:d=3,afade=t=in:st=20:d=3,afade=t=out:st=27:d=3" /tmp/test.mp3
then my output audio file has a fadein and fadeout applied only once. All the next effects don't get applied. Is there any possible way to apply several fade effects to the same audio file? Also, what is the difference between ss and st parameter in this (...)
17:44
In 6.1 Ffmpeg, it use "ch_layout" to replace the "channel_layout" and "number". The "ch_layout" is "AVChannelLayout *" type. This type is defined in channel_layout.h, some kind of "ch_layout" is defined in this file too.
If I want to use the "av_dict_set_int()" set the "ch_layout" to "AV_CHANNEL_LAYOUT_STEREO", what should I fill to the "value"?
/**
* Macro to define native channel layouts
*
* ⓐnote This doesn't use designated initializers for compatibility with C++ 17 and older.
*/
#define AV_CHANNEL_LAYOUT_MASK(nb, m) \\
/* .order */ (...)
11:21
ⓐecho off
setlocal enabledelayedexpansion
rem 设置源视频文件夹路径和目标视频文件夹路径
set source_folder=F:\\BaiduNetdiskDownload\\dhm\\uploaded
set target_folder=C:\\Users\\SF-ZJ-442\\Desktop\\target_folder
rem 确保目标文件夹存在,如果不存在则创建
if not exist "%target_folder%" mkdir "%target_folder%"
rem 设置目标分辨率(例如:1280x720)
set target_resolution=1080:1920
echo start.......
echo "%source_folder%\\*.mp4"
rem 遍历源文件夹中的所有视频文件
for %%i in ("%source_folder%\\*.mp4") do (
rem 提取文件名和扩展名
set "filename=%%~ni"
set "extension=%%~xi"
rem 构建目标文件路径
set (...)
13:13
Hi i have a few mp3 files in my server which constantly change and i need the mp3 id3 tags for people to know what song is being played at the moment preferably via php . I am a complete noob at this so any help is helpful.
14:05
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 (...)
07:39
I use this code to slide previous and next pages up, this is no problems, can I remove png file 1970~1979-last.png and use the last frame of video file 1970~1979.mp4 to instead it?
script-01.txt
color=white:864x504[c];
[0:v]scale=864:504:force_original_aspect_ratio=decrease,pad=864:504:-1:-1,setsar=1[s0];
[1:v]scale=864:504:force_original_aspect_ratio=decrease,pad=864:504:-1:-1,setsar=1[s1];
[c][s0]overlay=y=0-h*t[c];
[c][s1]overlay=y='if(between(t,0,18),max(H-h*t,0),max(0-h*(t-18),0-H))'[v],
[v]tpad=stop_mode=clone:stop_duration=10[s2];
[s2]drawtext=fo
06:28
The data was received by socket ,with no more shell , they are pure I P B frames begin with NAL Header(something like 00 00 00 01). I am now using pyav to decode the frames ,but i can only decode the data after the second pps info(in key frame) was received(so the chunk of data I send to my decode thread can begin with pps and sps ), otherwise the decode() or demux() will return error "non-existing PPS 0 referenced decode_slice_header error" .
I want to feed data to a sustaining decoder which can remember the previous P frame , so after feeding one B frame, the decoder return a (...)
00:16
I have tried to make a bitstream filter for FFmpeg that drops the nth keyframe for positive numbers and allows the first n keyframes and drops the rest for nonpositive numbers, called "datamosh":
ffmpeg -i input.webm -bsf:v datamosh=target=20 -c copy output.webm
outputs the error:
Option 'target' not found
[vost#0:0/copy ⓐ 0x54edc40] Error parsing bitstream filter sequence 'datamosh=target=20': Option not found
Here is the code for the "datamosh" bitstream filter:
#include "bsf.h"
#include "bsf_internal.h"
#include (...)