+ Reply to Thread
Results 1 to 22 of 22
BAR_WIDTH = 64 BAR_HEIGHT = 32 X_POSITION = 200 Y_POSITION = 100 # get the source video, since we aren't explicitly naming it the name AviSynth assigns is "last" WhateverSource("filename.ext") #make a small black bar from a piece of the source video bar = Crop(last, 0, 0, BAR_WIDTH, BAR_HEIGHT).ColorYUV(gain_y=-256, off_y=16, cont_u=-256, cont_v=-256) # overly the bar Overlay(last, bar, X_POSITION, Y_POSITION)
But the time taken to figure out those bar sizes/positions is nearly equal to the time to graphically create them within an NLE. Plus, you would likely have to make use of generous applications of TRIM() so those bars would only be applied to certain frames.
That's a LOT of extra (and IMO, unnecessary) work, just to work with avisynth.
Maybe he doesn't have an NLE.
Will using an 'NLE' or aviutl actually edit the video file though? I don't want the file itself touched unless it doesn't require reencoding it. I'll play around with the script though and see if I can get the position correct, thanks for that... I'll let you know if it works.
Of course, doing what you want requires reencoding. The only possible way to avoid at least reencoding the parts with the black bar is to add it as a subtitle.
Yeah I want this without the files being edited, if the script doesn't work, do subtitle files work with any video container? Most of what I'm working with are .flvs.
I 'do' have aegissub, only ever used it to modify text though, but if you can use that to make a black bar.. perhaps if you can have a black background behind the text, then I could just make it using space.
When you edit a video the original file is not changed. The changes are applied to a new video file created by the editor.
What happens with soft subtitle is player dependent. You can create a graphic subtitle that's a black box and leave it as a separate file, or mux it into the video container. A single 2 hour sub may appear on-screen for the entire duration of the video as long as you don't seek. But if you seek while watching the sub will probably disappear.
Last edited by jagabo; 17th Jul 2014 at 10:41.
See my recent post re: creating black bar subtitles using ANSI text. That might help. Still going to be a pain with placement.
Why wouldn't the script work? What are you trying to cover up? Is it "tactically" difficult? e.g. does it animate, move, change shape /size ? Do you just want a static "block" or shape ?
Maybe it's another one of those sanitizing/censorship jobs.
Okay I tried the script and I've got an issue. The bar appears, but the video isn't playing back correctly. It won't play at all with Avisource, MPC-HC says ffVideoSource isn't an option, and with DirectShowSource the file's audio plays at an extremely accelerated speed, though the video plays at normal speed.
MPC-HC[/url] says ffVideoSource isn't an option,
To hear audio, you need ffaudiosource with audiodub(), or use the ffmpegsource2 wrapper function included with the .avsi
Says FFMpegSource2 isn't an option either, I'll try and find this ffms2.dll, where would I need to put it?
Hmm alright, I copied over the files to the correct folder, now all the ones I try simply say they can't open the file. And since adding those, DirectShowsource won't open it not either.
Er, Cornucopia I might just be blind, but where did you give info on going the subtitle route to make a black bar? If avisynth isn't liking my video files then perhaps subtitle files will...
What is the error mesage you're getting, verbatim ?
Post your exact avs script
Make sure you're using the correct version. E.g. you install avisynth 32bit, you use the x86 version of the ffms2.dll plugin . And that's what you should be using because avisynth 64bit is unstable. Both the ffms2.dll and ffms2.avsi should go in the plugins folder
Are these "regular" flv files? h264/aac compression ? Vp6? What does mediainfo say about these (view=>text)
Directshowsource : Could not open as video or audio, says both returned Unspecificed error on my .avs, line 7
FFvideosource and ffmpeg2source returned simpled "Can't open 'filename'" and quoted line 7 again. Here's my script.
I am definitely using the 32bit version and the x86 version of the plugin.
"BAR_WIDTH = 64
BAR_HEIGHT = 32
X_POSITION = 200
Y_POSITION = 100
# get the source video, since we aren't explicitly naming it the name AviSynth assigns is "last"
#make a small black bar from a piece of the source video
bar = Crop(last, 0, 0, BAR_WIDTH, BAR_HEIGHT).ColorYUV(gain_y=-256, off_y=16, cont_u=-256, cont_v=-256)
# overly the bar
Overlay(last, bar, X_POSITION, Y_POSITION)"
Here's what mediainfo says about the .flv, they're directly downloaded from twitch.tv.
Complete name : C:\Users\Xirix\Desktop\JeffStickAgain1.flv
Format : Flash Video
File size : 200 MiB
Duration : 29mn 59s
Overall bit rate : 931 Kbps
Tagged date : UTC 2014-07-14 15:39:59
Tagging application : flvmeta 1.1-r213
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : 7
Duration : 29mn 59s
Bit rate : 768 Kbps
Width : 854 pixels
Height : 480 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.062
Stream size : 171 MiB (86%)
Writing library : x264 core 129 r2239 c69e2d0
Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=4 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=abr / mbtree=1 / bitrate=768 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 10
Duration : 29mn 59s
Bit rate : 125 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz
Compression mode : Lossy
Stream size : 28.4 MiB (14%)
of course change "PATH" to the real path
For DirectShowSource, you can force an fps, see if that fixes your audio issue. You might have to remove the ffms2 plugins to get it working again, but not sure why that would have affected it in the first place? Maybe something else you did ?
30 because mediainfo says it's 30
or even try convertfps=true
DirectShowSource("video.flv", fps=30, convertfps=true)
DirectShowSource("C:\Users\Xirix\Desktop\JeffStickAgain1.flv", fps=30, convertfps=true)