0

I am having issues in a windows Batch file where I when i start a video to stream it will play like 1 sec from last video that I had encoded at the beginning .

I originally thought it was because of the fade in. I have added several variations that DO stop it from happening to the files in a loop.

added this:

 select='gte(n\,16)'

as well as this:

 -flush_packets 0 -tune zerolatency -output_ts_offset 1 -fflags +genpts -flags +global_header -auto_convert 1 -flags2 local_header -pkt_size 1316 -fflags nobuffer

now what is strange the batch file closes, thus FFMPEG is closed, but it still has some of the last video it encoded BEFORE still in there.

here is what i got to stop it from doing each time in a loop BUT it does NOT solve the issue of the last video still in there at the start of the encoding

here is my code now:

%ffmpeg% -stream_loop -1 -f lavfi -i "movie=filename=\'!videoName!\':loop=0,setpts=N/FRAME_RATE/TB" -f lavfi -i "amovie=filename=\'!audioName!\':loop=0,asetpts=N/SR/TB" -vf "select='gte(n\,29)',realtime,fade=t=out:st=!fadeout!:d=!fadeDur!" -af "afade=t=in:st=0:d=!fadeDur!,afade=t=out:st=!fadeout!:d=!fadeDur!" -t !time2loop! -preset ultrafast -shortest -map 0:v:0 -map 1:a:0  -c:v libx264 -bsf:v h264_mp4toannexb -c:a aac -b:a 128k -ac 2 -ar 44100  -f mpegts "srt://%ip%:5000?mode=caller&transtype=live&latency=0"

So even with the fade in i get a that clipping noise i have also tried adding:

-r 60 -preset medium -async 1 -vsync 1 

as well as in this in the audio filter

aresample=async=1:min_hard_comp=0.100000:first_pts=0
1
  • It looks like this is caused by the fadein, it still will clip i have added select='gte(n\,0)' and no fade in, to no avail May 22 at 18:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.