0

我需要使用 python 将 LibreOffice impress 演示文稿导出为视频格式。

我已经设法使用 pyuno 将演示文稿导出为flash文件格式,我需要将其转换为 mp4(或任何其他著名的视频)格式。我曾尝试使用“ffmpeg”但不起作用。

failed to read the duration of file /home/ankur/Desktop/test_dev_1010_v111.swf.
Here are the file infos returned by ffmpeg:

ffmpeg version 4.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[mjpeg @ 0x52f5240] Found EOI before any SOF, ignoring
[swf @ 0x52f3b40] [IMGUTILS @ 0x7ffdb41d6e70] Picture size 0x0 is invalid
[swf @ 0x52f3b40] invalid frame size 0x0
Input #0, swf, from '/home/ankur/Desktop/test_dev_1010_v111.swf':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 1058x794 [SAR 96:96 DAR 529:397], 12 tbr, 12 tbn
At least one output file must be specified

请指导我正确的方向。

4

1 回答 1

0

根据您的发行版,您应该从软件包或源代码安装 swf 解析器/阅读器。Gnu Gnash似乎就是其中之一。Debian 有用于拉伸的软件包,但它们不再存在于 buster 中。他们还为 python 绑定提供了python-gtk-gnash。如何转换很久以前就解释过了。

于 2019-12-11T07:56:53.597 回答