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 (...)
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 (...)