将缩略图链接到视频文件并添加标题

发布于 2024-10-05 02:18:44 字数 431 浏览 0 评论 0原文

远景,但是……

我有 200 个缩略图和 50 个视频。每个视频有 4 个缩略图可供选择,但我只需将 1 个缩略图链接到相应的视频。

所以我有 video1thumb1、video1thumb2.jpg、video1thumb3.jpg、video1thumb4.jpg ---- video1.avi video2thumb1、video2thumb2.jpg、video2thumb3.jpg、video2thumb4.jpg ---- video2.avi video3thumb1、video3thumb2.jpg、video3thumb3.jpg、video3thumb4.jpg ---- video3.avi ...等等...图像位于 /Image 文件夹中,视频位于 /videos 文件夹中。

现在...是否有一个脚本/程序/代码可以让我选择最佳图像或每个视频并为每个视频添加标题?

Long shot here but...

I have 200 thumbnails, and 50 videos. That's 4 thumbnails per video that I can choose from, but I only need to link 1 thumbnail to the appropriate video.

So I have
video1thumb1, video1thumb2.jpg, video1thumb3.jpg, video1thumb4.jpg ---- video1.avi
video2thumb1, video2thumb2.jpg, video2thumb3.jpg, video2thumb4.jpg ---- video2.avi
video3thumb1, video3thumb2.jpg, video3thumb3.jpg, video3thumb4.jpg ---- video3.avi
... and so on... Images are in the /Image folder, and videos are in the /videos folder.

Now... Is there a script/program/code out there that will allow me to choose the best image or each video AND add a title to each video?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

任谁 2024-10-12 02:18:44

您可以将问题分解为不同的部分:

  1. 从 3 个中选择最佳缩略图。
  2. 为每个视频添加标题。

对于第一部分,您可以使用 bash(如果您使用的是 Linux)和 imagemagick(跨平台成像库)轻松完成此操作。

对于每个视频,您都需要执行以下操作(我感觉到一个 for 循环):

filename=videoX.avi

#
# Strip the file extension.
#
vname="${filename%.*}"
#
# Show the three thumbnails side by side.
#
montage $vname-thumb1.jpg $vname-thumb2.jpg $vname-thumb3.jpg -adjoin - | display
#
# Get the user to select the best thumbnail.
#
echo "Which thumbnail do you prefer: 1, 2 or 3?"
read -n 1 -s reply
if [ "$reply" = "1" ] || [ "$reply" = "2" ] || [ "$reply" = "3" ]
then
    cp $vname-thumb$reply.jpg $vname-selected.jpg
else        
    echo "Invalid response: $reply"
fi

You can break down your problem into separate parts:

  1. Pick the best thumbnail out of 3.
  2. Add title to each video.

For the first part, you can easily get this done using bash (if you're on Linux) and imagemagick (cross-platform imaging library).

For each video, you would want to do something like this (I sense a for loop):

filename=videoX.avi

#
# Strip the file extension.
#
vname="${filename%.*}"
#
# Show the three thumbnails side by side.
#
montage $vname-thumb1.jpg $vname-thumb2.jpg $vname-thumb3.jpg -adjoin - | display
#
# Get the user to select the best thumbnail.
#
echo "Which thumbnail do you prefer: 1, 2 or 3?"
read -n 1 -s reply
if [ "$reply" = "1" ] || [ "$reply" = "2" ] || [ "$reply" = "3" ]
then
    cp $vname-thumb$reply.jpg $vname-selected.jpg
else        
    echo "Invalid response: $reply"
fi
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文