0

安装在 Debian 11 Bullseye Opera-stable_80.0.4170.72 上。没有 chromium-codecs-ffmpeg-extra 包,视频不在 Facebook 和 Twitter 上播放。

# Launching the terminal
# Installing the archiver
sudo apt install zstd
# Creating a folder
mkdir ${HOME}/ffmpeg-codecs && cd ffmpeg-codecs
# Downloading the package
wget https://archlinux.thaller.ws/community/os/x86_64/opera-ffmpeg-codecs-94.0.4606.81-1-x86_64.pkg.tar.zst
# I'm looking at the location of the file in the package
tar -I zstd -tf opera-ffmpeg-codecs-94.0.4606.81-1-x86_64.pkg.tar.zst | grep libffmpeg.so
command output: usr/lib/opera/lib_extra/libffmpeg.so
# For unpacking libffmpeg.so I use Midnight Commander
# Checking dependencies
ldd libffmpeg.so
# making a backup copy
sudo cp /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so.bak
# creating a soft link
sudo ln -sf ${HOME}/ffmpeg-codecs/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so
Now the video is playing!

我的问题:如何使用以下命令从终端仅解压缩文件 libffmpeg.so 而没有文件夹和子文件夹:

tar -I zstd -xvf opera-ffmpeg-codecs-94.0.4606.81-1-x86_64.pkg.tar.zst
4

1 回答 1

0

我自己决定了这个问题。我阅读了链接上的文件

https://www.gnu.org/software/tar/manual/html_section/transform.html
document section
‘--strip-components=number’
Strip given number of leading components from file names before extraction.

我查看了档案的结构

tar -I zstd -tf opera-ffmpeg-codecs-94.0.4606.81-1-x86_64.pkg.tar.zst

结构体

解压 libffmpeg.so 到文件夹 ${HOME}/ffmpeg-codecs

tar -I zstd -xvf opera-ffmpeg-codecs-94.0.4606.81-1-x86_64.pkg.tar.zst --strip=4 usr/lib/opera/lib_extra/libffmpeg.so

问题可以关闭。

于 2021-11-01T11:10:11.883 回答