duangsuse::Echo
717 subscribers
4.26K photos
130 videos
583 files
6.48K links
import this:
美而不丑、明而不暗、短而不凡、长而不乱,扁平不宽,读而后码,行之天下,勿托地上天国。
异常勿吞,难过勿过,叹一真理。效率是很重要,盲目最是低效。
简明是可靠的先验,不是可靠的祭品。
知其变,守其恒,为天下式;穷其变,知不穷,得地上势。知变守恒却穷变知新,我认真理,我不认真。

技术相干订阅~
另外有 throws 闲杂频道 @dsuset
转载频道 @dsusep
极小可能会有批评zf的消息 如有不适可退出
suse小站(面向运气编程): https://WOJS.org/#/
Download Telegram
duangsuse::Echo
#youtube #video
给这个视频的字幕
这么多 fork,只有我一个 not even with origin repo 的,而且我的也没有一个 star,可见 star 和 initial fork 没暖用,哈哈
This media is not supported in your browser
VIEW IN TELEGRAM
147-147 "脱下鞋子跳舞"
180-203 ""
231-231 "赤着脚太空漫步"
248-248 ""
266-276 "我笑了你还装酷"
298-327 "阳光晒过的路"
377-386 "正好是年轻的温度"
401-449 "温暖舒服"
452-518 "吵醒了闹区的树木"
521-525 ""
551-567 "吸一口纯氧就潭浮"
603-686 "蓝色背景下我练习飞行的高度"
722-737 "保持我的态度"
754-808 "的未来式由我做主"
831-879 "跳整天的舞玩要整片屏幕"
903-903 ""
941-948 "不断电的焚直线加速"
983-1036 "奔跑在我画的地图"
1063-1378 ""
1393-1409 ""
1434-1512 ""
1544-1544 "自由平等睛爱"
1561-1614 "我复古创新演出"
1615-1635 "我的天赋"
1665-1731 "吵醒了闹区的树木"
1748-1779 "吸一口纯氧就潭浮"
1817-1918 "蓝色背景下我练习飞行的角度"
1942-1942 ""
1966-1966 "我的未来式由我做主"
2051-2051 "每一个动作我都完整投入"
2120-2142 "不断电的你陪我加速"
2251-2286 "奔跑在我们的领土"
iPartment_I_OP.srt
1.6 KB
感觉这么弄还是差了很多,要做到一个可以接受的字幕误差,需要费很多精力自己再在 GNOME Subtitles 这样的软件上调,而本来我们用 CV 就是想做到全自动处理的(而且那看起来并不困难啊),非常鸡肋
iPartmentI_OP.webm
4.4 MB
🤔可以配视频看看,不过字幕不知道能不能直接内嵌到视频元数据里……
https://github.com/krohak/Embedded-Subtitles-OCR/blob/master/Embedded-Subtitles-OCR.ipynb
学习了一些增强的 filtering 技术 🤔

Binarize (High Pass filer)
img = np.array(img)
img = img[:,:,0]
img = img > 170

Bandpass Filter
lower = np.array([140, 140, 140])
upper = np.array([199, 199, 199])
shapeMask = cv2.inRange(image, lower, upper)


🤔
ffmpeg -i Thanksgiving\ clips\ from\ FRIENDS.mp4 -filter:v "crop=in_w:2*in_h/10:0:7*in_h/10" -r 0.5 friends/friends-%08d.jpg
This media is not supported in your browser
VIEW IN TELEGRAM
ffmpeg -filter:v "crop=in_w:in_h/20:0:in_h*97/100" -r 0.5 frames/%04d.jpg -i iPartment_I_OP.mp4
https://github.com/kkroening/ffmpeg-python/issues/246
n,height,width,channels = images.shape
process = (
ffmpeg
.input('pipe:', format='rawvideo', pix_fmt='rgb24', s='{}x{}'.format(width, height))
.output(fn, pix_fmt='yuv420p', vcodec=vcodec, r=framerate)
.overwrite_output()
.run_async(pipe_stdin=True)
)
for frame in images:
process.stdin.write(
frame
.astype(np.uint8)
.tobytes()
)
process.stdin.close()
process.wait()
duangsuse::Echo
https://github.com/krohak/Embedded-Subtitles-OCR/blob/master/Embedded-Subtitles-OCR.ipynb 学习了一些增强的 filtering 技术 🤔 Binarize (High Pass filer) img = np.array(img) img = img[:,:,0] img = img > 170 Bandpass Filter lower = np.array([140, 140, 140]) upper = np.array([199…
./extract_subtitles.py -crop '(313,951)(1343,45)' --crop-debug -filter-code '~cv2.inRange(it, np.array([0xbf,0xbf,0xbf]), np.array([0xff, 0xff, 0xff]))' SomethingNew.mp4 🤔对黑底白字效果很好,出来的文字不需要再编辑了
看来预处理依然是必要的
106-159 "How can something be so nice?"
178-250 "Yet so shocking, yet so nice."
286-321 "How can something be so new?"
367-387 "Yet so known but yet so new?"
414-429 "Ohh, one two, three, the time has gone."
467-514 "Problematic things undone."
537-595 "How can something be so cruel? "
610-683 "Yet so warm but yet so cruel?"
755-945 ""
967-989 "Try to find from a different sight,"
1039-1095 "Get to choose where to look back,"
1120-1235 "Resolve what others can't do for now..."
1280-1366 "What a beautiful way to fix all wrong things."
1383-1439 "Evolve future generations of work teams:"
1509-1612 "But tell me why's that fear of yours,"
1634-1714 "‘Cause you know it is going to work... (keep ittup) ="
1739-1817 "Let's start from now, stay tuned, you're half way through!"
1834-1903 "Break it, crash it, take it farther"
1978-1978 "Making something even smarter."
2047-2047 "Do it, start it, make it happen,\n\nbe"
2065-2079 "Stab in statements screaming louder. "
2119-2160 "How can something be so nice?"
2188-2239 "Yet so shocking, yet so nice."
2261-2283 "How can something be so new? "
2334-2399 "Yet so known but yet..."
2430-2654 "IT'S SOMETHING NEW"
整段就只进行了一次字符替换操作,就直接可以用了。 🤔
test.srt
1.7 KB
前半部分效果还可以,不过说实话本来不是应该“可以”,而是“没问题”才对。
这里有两张图,都是 soft 帧间差矩阵的拼合,下面一张是预先过滤色域了的。可以注意到……几乎一模一样