The audio is fine in one section of a video which is only a few secs long but the picture is glitchy so I'd rather just erase the picture for that portion. How do I do that?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 12 of 12
Thread
-
-
One way to do it is ApplyRange, and Expr
You enter the inclusive frame numbers that you want blacked out
Assuming this is 8bit video, and you want "video black" (Y=16, U=128, V=128) and you want frames 1000-2000 to turn "black"
Code:#source ApplyRange(1000, 2000, "expr", "16", "128", "128")
-
Thanks. I tried that and it gave this error:
Script error: Invalid arguments to function "ApplyRange" in line 3
Here's my script:
Code:LoadPlugin("X:\Portable Installations\MeGUI 2525\tools\ffms\ffms2.dll") FFVideoSource("E:\video.mp4", fpsnum=25, fpsden=1, threads=1) ApplyRange(724, 763, "expr", "16", "128", "128")
-
An alternative way if you don't want to use avs+ is just to splice in a blankclip to replace those frames
Code:LoadPlugin("X:\Portable Installations\MeGUI 2525\tools\ffms\ffms2.dll") orig=FFVideoSource("E:\video.mp4", fpsnum=25, fpsden=1, threads=1) b=blankclip(orig) #makes a blankclip the same characteristics as "orig" orig.trim(0,723) ++ b.trim(724,763) ++ orig.trim(764,0)
-
If you want to keep the audio just apply ColorYUV(gain_y=-256, off_y=16, cont_u=-256, cont_v=-256) to the segment you want black.
Code:# load video+audio as "orig" then: part1 = orig.trim(0,723) part2 = orig.trim(724,763).ColorYUV(gain_y=-256, off_y=16, cont_u=-256, cont_v=-256) # cont_u=0 and cont_v=0 are equivalent to GreyScale(), or Tweak(sat=0) part3 = orig.trim(764,0) part1++part2++part3
Last edited by jagabo; 14th Nov 2022 at 20:11.
-
It worked in the preview in AvsPmod but when I encoded the source 1080i 25 fps video with this script it comes out in 720p 59.94 fps despite me NOT adding a downscale or framerate change to the script:
Code:LoadPlugin("X:\Portable Installations\MeGUI 2525\tools\ffms\ffms2.dll") orig=FFVideoSource("E:\video.mp4", fpsnum=25, fpsden=1, threads=1) b=blankclip(orig) orig.trim(0,723) ++ b.trim(724,763) ++ orig.trim(764,0) AssumeTFF() Yadif(mode=1, order=1)
-
Maybe you mixed up scripts or forgot to save it before encoding ? Or messed up the encoding settings ?
-
Not sure what happened but I tried to encode it again and it encoded properly this time. Thanks
-
BTW, there are other ways to cover up mistakes or technical glitches. The pros do it with B-roll, which is video of surrounding areas or something related to the event, but not of the thing currently being photographed.
As a variation on this idea you can sometimes repeat a portion of a scene take much earlier or later, so the viewer isn't confused.
If you have anything you have cut, perhaps it is good enough to use as a cover shot.
Depending on the length of the gap, you can sometimes slow down adjacent clips, as long as someone's lips don't have to be synced to the sound. I did this for a ballet performance I streamed where the video glitched for 3-5 seconds. The dancers slowed down a a bit, but it looked pretty natural, and it didn't take you completely out of the experience of watching the performance, as a blank screen would certainly do.
If you have one or two good frames in the middle of the noise and garbage, take a snapshot of that frame and freeze on it. If you have several good frames, use each one of them for the appropriate amount of time.
All of this is much easier to do in your NLE than it is in AVISynth.
Bottom line: a black frame is very distracting and I would advise against doing that unless none of the options above will work.
Similar Threads
-
Can I run AviSynth through FFmpeg completely portable?
By seanmcnally in forum Video ConversionReplies: 8Last Post: 17th Jan 2022, 19:45 -
how to download a portion of video from m3u8 that has separate video audio.
By adi111 in forum Video Streaming DownloadingReplies: 8Last Post: 5th Aug 2020, 14:53 -
AviSynth and Santiag to make an anti-aliased video
By Alkimical in forum RestorationReplies: 1Last Post: 25th Jan 2020, 13:43 -
AviSynth: Use the first frame of the delayed video instead of a black one.
By irn-bru in forum EditingReplies: 2Last Post: 27th Aug 2018, 10:47 -
Clarification needed on re-encoding cut portion of video
By Budman1 in forum EditingReplies: 4Last Post: 13th Jun 2018, 10:16