ppt_presenter
ppt_presenter copied to clipboard
How long it takes to generate .mp4 file? I ran the code and it is taking too much time and not finished yet.
Are you running the example or your own ppt?
Even example is very slow. I am running it on Macbook pro 32 gig memory system.
$ python demo/ppt_presenter.py --pptx example/test.pptx --pdf example/test.pdf -o sample.mp4
prs is <pptx.presentation.Presentation object at 0x7ff9291aa320>
image path:------------------------ /var/folders/7c/4r126_9j7116r727j_kqbw9hxhl048/T/tmpk8udl43_/frame_0.jpg
inside ffmeg_call======================
===============/var/folders/7c/4r126_9j7116r727j_kqbw9hxhl048/T/tmpk8udl43_/frame_0.mp4==========
avconv version 12.3, Copyright (c) 2000-2018 the Libav developers
built on Jan 22 2019 21:47:08 with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Input #0, image2, from '/var/folders/7c/4r126_9j7116r727j_kqbw9hxhl048/T/tmpk8udl43_/frame_0.jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: mjpeg
yuvj420p, pc, bt470bg/unknown/unknown
2000x1500 [PAR 1:1 DAR 4:3]
25 tbn
[mp3 @ 0x7fca88819a00] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #1.0 : mono
Input #1, mp3, from '/var/folders/7c/4r126_9j7116r727j_kqbw9hxhl048/T/tmpk8udl43_/frame_0.mp3':
Duration: 00:00:07.00, start: 0.000000, bitrate: 32 kb/s
Stream #1:0: Audio: mp3
24000 Hz, 1 channels, s16p, 32 kb/s
Constant framerate requested for the output stream #0:0, but no information about the input framerate is available. Falling back to a default value of 25fps. Use the -r option if you want a different framerate.
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
Stream #1:0 -> #0:1 (mp3 (native) -> aac (libfdk_aac))
Press ctrl-c to stop encoding
[libx264 @ 0x7fca88824e00] using SAR=1/1
[libx264 @ 0x7fca88824e00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x7fca88824e00] profile High, level 5.0
[libx264 @ 0x7fca88824e00] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:-3:-3 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=2.00:0.70 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-4 threads=24 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.20
It stuck at the last line.
If I use ffmpeg
instead of avconv
then there was error that .mp4
path not found. This is for audio path.
Could you please push the final working code.