hamoid / video_export_processing

Processing library that interfaces with ffmpeg to export video files
http://funprogramming.org/VideoExport-for-Processing/
GNU General Public License v2.0
116 stars 19 forks source link

Video output Full HD (1920x1080) results in crash #30

Closed widovanheemstra closed 7 years ago

widovanheemstra commented 7 years ago

I tried to capture a video while having the screen size set to Full HD resolution. When I start the code it crashes and directs to the ffmpeg.txt log file.

I'm running processing 3.2.3 on Windows 7 Enterprise with a static ffmpeg file dowloaded. If I reduce the screen size to (1280x720) a video is created.

This is the contents of that file: ffmpeg version N-82785-g6b95da9 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.0 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib libavutil 55. 41.101 / 55. 41.101 libavcodec 57. 66.109 / 57. 66.109 libavformat 57. 58.101 / 57. 58.101 libavdevice 57. 2.100 / 57. 2.100 libavfilter 6. 68.100 / 6. 68.100 libswscale 4. 3.101 / 4. 3.101 libswresample 2. 4.100 / 2. 4.100 libpostproc 54. 2.100 / 54. 2.100 Input #0, rawvideo, from 'pipe:': Duration: N/A, start: 0.000000, bitrate: 1463961 kb/s Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1920x1059, 1463961 kb/s, 30 tbr, 30 tbn, 30 tbc [libx264 @ 00000000007ada60] height not divisible by 2 (1920x1059) Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

hamoid commented 7 years ago

Hi, thanks for the bug report. The error is shown at the end of the text you pasted: "height not divisible by 2 (1920x1059)".

Even though you thought your display was 1920x1080, it's actually 1920x1059. And some video formats don't accept odd heights. If you actually used 1920x1080 it should work, or even 1920x1058.

I have to think how to deal with odd heights. I guess I could use a flag to tell the program to skip the last row of pixels. For now I will add it to the FAQ.