小编Mon*_*lal的帖子

多路复用开销:未知 转换失败!ffmpeg

为什么会出现此错误以及如何修复它?

[jalal@goku imageSequence]$ ffmpeg -i video_0.avi -qscale:v 1 keyframes/vid0/img_%%06d.jpg
ffmpeg version 2.6.8 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-ladspa --enable-libass --enable-libcdio --enable-libdc1394 --enable-libfaac --enable-nonfree --enable-libfdk-aac --enable-nonfree --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static …
Run Code Online (Sandbox Code Playgroud)

command-line video conversion ffmpeg video-conversion

7
推荐指数
1
解决办法
1万
查看次数

在给定 grep 结果的情况下,在第三列中查找具有最低值的行

我有一个由这样的行组成的文件(包括其他数字)。这是输出的一部分

$ grep 1848 filename.csv
Run Code Online (Sandbox Code Playgroud)

.csv假设 1848 位于第一列或第二列,如何找到文件中第三列最低的前 5 行?

1848,2598,11.310694021273559
1848,2599,10.947275955606203
1848,2600,10.635270124233982
1848,2601,11.916564552040725
1848,2602,12.119810736845844
1848,2603,12.406661156256154
1848,2604,10.636275056472996
1848,2605,12.549890992708612
1848,2606,9.783802450936204
1848,2607,11.253697489670264
1848,2608,12.16385432290674
1848,2609,10.30355814063016
1848,2610,12.102525596913923
1848,2611,11.636595992818505
1848,2612,10.741178028606866
1848,2613,11.352414275107423
1848,2614,12.204860161717253
1848,2615,12.959915468475387
1848,2616,11.320652192610872
Run Code Online (Sandbox Code Playgroud)

不幸的是,1848 有时也会出现在第三列中,我需要忽略它:

6687,8963,9.241848677632822
6687,9111,10.537325656184889
6687,9506,11.315629894841848
Run Code Online (Sandbox Code Playgroud)

command-line bash scripts grep text-processing

5
推荐指数
2
解决办法
1072
查看次数

将一系列 ppm 图像转换为 avi 视频

我想将一系列 ppm 图像转换为 avi 视频(或 OpenCV 接受的另一种可能的视频格式)。

首先,我将质量没有下降的 ppm 图像转换为 jpg:

for f in *ppm ; do convert -quality 100 $f `basename $f ppm`jpg; done 
Run Code Online (Sandbox Code Playgroud)

然后我使用以下命令转换为avi:

ffmpeg -i CS585Bats-FalseColor_frame*.jpg  -vcodec mpeg4 test.avi
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误:

FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Aug  2 2016 19:05:32 with clang 7.3.0 (clang-703.0.31)
  configuration: --enable-libmp3lame --enable-libfaac --enable-gpl --enable-nonfree --enable-shared --disable-mmx --arch=x86_64 --cpu=core2
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat …
Run Code Online (Sandbox Code Playgroud)

video convert ffmpeg avi image-processing

4
推荐指数
1
解决办法
8814
查看次数

在 Ubuntu 终端中保存 wmv 视频的第一和第二分钟

如何剪切 10 分钟视频的前两分钟并将其保存为 first_2min.wmv,然后将第二个 2 分钟保存为 second_2min.wmv 而不更改 Ubuntu 命令行中的视频设置?视频的原始格式也是 wmv。

video video-editor ffmpeg

4
推荐指数
1
解决办法
568
查看次数

为 Python 2.7 安装 Jupyter Notebook

如何在 Ubuntu 14.04 中为 Python 2.7 安装 Jupyter?

我试过:

sudo add-apt-repository ppa:jolicloud-team/ppa
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

更新输出:

Ign file:  InRelease
Get:1 file:  Release.gpg [181 B]
Get:2 file:  Release [196 B]                                                   
Ign file:  Translation-en_US                                                   
Ign file:  Translation-en                                                      
Hit http://storage.googleapis.com stable InRelease         
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 5,905 kB in 6s (915 kB/s)                                              
W: Failed to fetch http://ppa.launchpad.net/jolicloud-team/ppa/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found
W: Failed to fetch http://ppa.launchpad.net/jolicloud-team/ppa/ubuntu/dists/trusty/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones …
Run Code Online (Sandbox Code Playgroud)

package-management python ppa 14.04 jupyter

3
推荐指数
1
解决办法
2万
查看次数

查找目录中所有图像中的最低高度和最低宽度

鉴于我有大约 50k 图像,如何获得所有高度中的最低高度以及所有宽度中的最低宽度?

我尝试了这个命令,但它只给出了图像的宽度和高度:

identify -format '%w %h' 72028059_11.jpg
600 431
Run Code Online (Sandbox Code Playgroud)

我也从 IRC Linux 频道得到了这个,但是,因为我有 50k 图像,所以需要很长时间才能输出任何结果:

find -type f -name \*.jpg -exec identify -format '%w %h %d/%f\n' {} \; | sort -n -k2
Run Code Online (Sandbox Code Playgroud)

command-line scripts imagemagick image-processing

3
推荐指数
1
解决办法
857
查看次数

将 CSV 文件中的数字转换为其对应的 URL

我有一个包含两列(和一个标题)的 CSV 文件,其中每个元素都包含 0 到 199 之间的任意数字。我想将它们转换为相应的 URL。下面是一个例子:

41,51
Run Code Online (Sandbox Code Playgroud)

应该变成:

http://www.cs.bu.edu/~betke/research/vc-crowd/MSCOCO/41.jpg,http://www.cs.bu.edu/~betke/research/vc-crowd/MSCOCO/51.jpg
Run Code Online (Sandbox Code Playgroud)

这是我要转换的 list.csv 文件:

$ head list.csv
imageA,imageB
41,51
172,100
99,149
83,72
84,160
186,8
93,198
150,21
63,102
Run Code Online (Sandbox Code Playgroud)

command-line csv text-processing

3
推荐指数
2
解决办法
465
查看次数

从文件夹中的所有 jpg 图像中删除 Alpha 通道

如何自动从 jpg 图像中删除 Alpha 通道?

我正在使用基于 PyTorch 的深度学习代码,需要 3 个通道,但我的图像有 4 个通道。我看到了这个答案,但我不知道如何将文件夹中的所有图像转换为没有 Alpha 通道的对应图像。

这是我收到的错误:

[jalal@goku example]$ python img_to_vec_nearest_neighbors.py 
/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88
  return f(*args, **kwds)
/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, …
Run Code Online (Sandbox Code Playgroud)

command-line mogrify png imagemagick image-processing

3
推荐指数
1
解决办法
2425
查看次数

加载的运行时 CuDNN 库:7.0.5 但源代码编译为:7.2.1。

我应该如何解决这个错误?

$ python tensorboard_viz.py
/scratch/sjn-p3/anaconda/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
2018-10-24 19:49:39.925967: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-10-24 19:49:40.093637: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1411] Found device 0 with properties: 
name: GeForce GTX 1080 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.6705
pciBusID: 0000:05:00.0
totalMemory: 10.92GiB freeMemory: 10.03GiB …
Run Code Online (Sandbox Code Playgroud)

python cuda

3
推荐指数
1
解决办法
1万
查看次数

如何找到txt文件中使用的分隔符并将其转换为逗号分隔的csv?

我有一个带有制表符或空格分隔符的 txt 文件。我需要将其转换为 csv。您如何建议使用命令行这样做?

$ perl -F"//" -nlae 'for (@F) {$a{$_}++};for (keys %a){print $_ if ($a{$_}+1==5 && !($_=~/\w/))};undef %a' moth_gt.txt
Run Code Online (Sandbox Code Playgroud)

上面的命令什么都不输出。

该文件如下所示:

$ head -10 moth_gt.txt 
1.0000  494.5551  234.2510  711.6219  274.2668  481.7198  299.5598  311.0864  339.5756
2.0000  494.6552  233.6892  698.5310  237.2043  478.3979  300.0367  285.5068  300.0367
3.0000  496.0657  234.5680  660.4773  182.6485  477.8938  299.0346  279.7346  239.3273
4.0000  498.0948  236.4126  618.2942  142.6347  477.2553  302.2803  298.6309  175.0104
5.0000  499.2109  237.2335  603.7807  120.0112  473.9058  307.5669  323.1914  136.0130
6.0000  497.2581  236.8611  616.7132  115.5453  473.4415  309.7994  336.1240  123.7323 …
Run Code Online (Sandbox Code Playgroud)

command-line bash format-conversion csv

3
推荐指数
1
解决办法
2825
查看次数

qt.qpa.plugin:即使找到了,也无法在“”中加载 Qt 平台插件“xcb”。在 Ubuntu 20.04

我应该如何在 Ubuntu 20.04 中解决这个问题?

Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

 

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

 

Aborted (core dumped)
Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.xcb: could not connect to display :0
qt.qpa.plugin: Could not …
Run Code Online (Sandbox Code Playgroud)

python qt pyqt qmake pyqt5

3
推荐指数
1
解决办法
6730
查看次数

将文件夹中的所有png文件转换为视频

我有大约 450 个名为 1...450 的帧。然而,有一些丢失的帧,例如帧 10、30 等不存在。

我想以与 1...450.png 相同的顺序创建 AVI 视频。我该怎么做呢?

video convert ffmpeg png avi

2
推荐指数
1
解决办法
1万
查看次数

-bash: /usr/bin/grep: 参数列表太长

所以,当我有 500k json 文件时,我不确定如何做 grep?当我有 200k 时它正在工作,但现在似乎我有太多文件。grep 或任何可以完成任务的东西?

[jalal@ivcgpu1 tweets]$ grep -wirnE 'Wed Oct 19 2(1:[0-5][0-9]:[0-5][0-9]|2:([0-2][0-9]:[0-5][0-9]|30:00)) .* 2016' *
-bash: /usr/bin/grep: Argument list too long
[jalal@ivcgpu1 tweets]$ ls -1 | wc -l
554472
Run Code Online (Sandbox Code Playgroud)

grep

1
推荐指数
1
解决办法
2196
查看次数