[rhurst@rampage ~]$ yum list ffmp*
Loaded plugins: langpacks, refresh-packagekit
Installed Packages
ffmpeg.x86_64 2.1.3-1.fc20 @rpmfusion-free-updates
ffmpeg-devel.x86_64 2.1.3-1.fc20 @rpmfusion-free-updates
ffmpeg-libs.x86_64 2.1.3-1.fc20 @rpmfusion-free-updates
With --enable-ffmpeg option, build fails:
Checked out 2.4.5 r27943M (GTK+ AMD64/x86_64 Linux glibc 2.18 GCC-4.8.2)
In file included from ffmpegdrv.c:37:0:
ffmpeglib.h:78:49: warning: ‘enum CodecID’ declared inside parameter list [enabled by default]
typedef AVCodec (avcodec_find_encoder_t)(enum CodecID);
^
ffmpeglib.h:78:49: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
ffmpegdrv.c: In function ‘ffmpegdrv_open_audio’:
ffmpegdrv.c:263:5: error: type of formal parameter 1 is incomplete
codec = (ffmpeglib.p_avcodec_find_encoder)(c->codec_id);
^
ffmpegdrv.c: In function ‘ffmpegdrv_open_video’:
ffmpegdrv.c:476:5: error: type of formal parameter 1 is incomplete
codec = (ffmpeglib.p_avcodec_find_encoder)(c->codec_id);
^
ffmpegdrv.c: In function ‘ffmpegdrv_save’:
ffmpegdrv.c:711:13: error: type of formal parameter 1 is incomplete
&& (ffmpeglib.p_avcodec_find_encoder)(audio_codec) != NULL) {
^
ffmpegdrv.c:716:13: error: type of formal parameter 1 is incomplete
&& (ffmpeglib.p_avcodec_find_encoder)(video_codec) != NULL) {
^
$ make distclean
SDL UI build works with ffmpeg disabled only:
$ ./configure --disable-arch --enable-sse --disable-ffmpeg --disable-midi --disable-rs232 --enable-sdlui --enable-fullscreen --with-sdlsound --enable-ethernet --with-uithreads CFLAGS="-O3 -ffast-math -g -pipe -Wall -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -march=native -mtune=native" || exit
GNOME UI build works with ffmpeg disabled only:
$ ./configure --disable-arch --enable-sse --disable-ffmpeg --disable-midi --disable-rs232 --enable-gnomeui --enable-fullscreen --without-oss --with-pulse --with-resid --enable-ethernet --with-uithreads CFLAGS="-O3 -ffast-math -g -pipe -Wall -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -march=native -mtune=native" || exit
$ make -j13
Without any POST warnings during configure, build also requires byacc, flex, pulseaudio-libs-devel, and vte-devel packages.
[rhurst@rampage ~]$ ll /usr/local/bin/
total 40296
-rwxr-xr-x 1 root root 315856 Feb 9 10:48 c1541
-rwxr-xr-x 1 root root 31048 Feb 9 10:48 cartconv
-rwxr-xr-x 1 root root 113576 Feb 9 10:48 petcat
-rwxr-xr-x 1 root root 2903928 Feb 9 10:46 sdl-x128
-rwxr-xr-x 1 root root 2437272 Feb 9 10:46 sdl-x64
-rwxr-xr-x 1 root root 1894632 Feb 9 10:46 sdl-x64dtv
-rwxr-xr-x 1 root root 2377272 Feb 9 10:46 sdl-x64sc
-rwxr-xr-x 1 root root 1832952 Feb 9 10:46 sdl-xcbm2
-rwxr-xr-x 1 root root 1880856 Feb 9 10:46 sdl-xpet
-rwxr-xr-x 1 root root 1879608 Feb 9 10:46 sdl-xplus4
-rwxr-xr-x 1 root root 1970584 Feb 9 10:46 sdl-xvic
-rwxr-xr-x 1 root root 1391000 Feb 9 10:48 vsid
-rwxr-xr-x 1 root root 2969912 Feb 9 10:48 x128
-rwxr-xr-x 1 root root 2512120 Feb 9 10:48 x64
-rwxr-xr-x 1 root root 1949960 Feb 9 10:48 x64dtv
-rwxr-xr-x 1 root root 2452120 Feb 9 10:48 x64sc
-rwxr-xr-x 1 root root 1873048 Feb 9 10:48 xcbm2
-rwxr-xr-x 1 root root 1991608 Feb 9 10:48 xcbm5x0
-rwxr-xr-x 1 root root 1918616 Feb 9 10:48 xpet
-rwxr-xr-x 1 root root 1922104 Feb 9 10:48 xplus4
-rwxr-xr-x 1 root root 2576376 Feb 9 10:48 xscpu64
-rwxr-xr-x 1 root root 2016696 Feb 9 10:48 xvic
please post the output of ffmpeg -version. mine is like this and it works fine:
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
$ ffmpeg -version
ffmpeg version 2.1.3
built on Jan 25 2014 15:11:42 with gcc 4.8.2 (GCC) 20131212 (Red Hat 4.8.2-7)
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-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
libavutil 52. 48.101 / 52. 48.101
libavcodec 55. 39.101 / 55. 39.101
libavformat 55. 19.104 / 55. 19.104
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libavresample 1. 1. 0 / 1. 1. 0
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
ok, so just another api breakage...
Of course! Don't you just love engineers? ;)
Thanks for taking notice.
This patch should fix the problem
It compiles, thanks, but does not show any video encoding options, only audio.
$ xvic
ffmpeg avformat lib has version 371368, VICE expects 371368: full match
getting symbol avcodec_open failed!
...
And later when I pick 'Save media file ...', I am presented only screenshot media formats, no video. The console echoes this:
FFMPEG Driver: avi
AC: MP2(86016)
AC: MP3(86017)
AC: FLAC(86028)
AC: PCM uncompressed(65536)
VC: MPEG4 (DivX)(13)
VC: MPEG1(1)
VC: FFV1 (lossless)(34)
VC: H264(28)
VC: Theora(31)
FFMPEG Driver: ogg
AC: FLAC(86028)
VC: Theora(31)
FFMPEG Driver: wav
FFMPEG Driver: mp3
FFMPEG Driver: mp2
Warning - Trying to read value from unknown resource
FFMPEGAudioBitrate'. Warning - Trying to read value from unknown resource
FFMPEGVideoBitrate'.Right, I should have tried it...
Here's a revised patch, still it segfaults with the following backtrace:
Got it working with a small hack, not sure about the rationale though. Leave it to the ffmpeg experts...
Looks very encouraging! I will make a couple of videos.
[rhurst@rampage vice]$ patch -d src/gfxoutputdrv < vice-2.4.6-libavcodec-55-v3.patch
patching file ffmpegdrv.c
patching file ffmpeglib.c
patching file ffmpeglib.h
[rhurst@rampage ~]$ xvic
ffmpeg avformat lib has version 371368, VICE expects 371368: full match
ffmpeg avcodec lib has version 372765, VICE expects 372765: full match
ffmpeg avutil lib has version 343065, VICE expects 343065: full match
ffmpeg swscale lib has version 020565, VICE expects 020565: full match
VICE Version 2.4.6, rev 27963M
OS compiled for: Linux glibc 2.18
GUI compiled for: GTK+
CPU compiled for: AMD64/x86_64
Compiler used: GCC-4.8.2
Current OS: (glibc 2.x)
Current CPU: Intel Pentium Pro/II/III/Celeron/Core/Core 2/Atom
Welcome to xvic, the free portable VIC20 Emulator.
FFMPEG Driver: avi
AC: MP2(86016)
AC: MP3(86017)
AC: FLAC(86028)
AC: PCM uncompressed(65536)
VC: MPEG4 (DivX)(13)
VC: MPEG1(1)
VC: FFV1 (lossless)(34)
VC: H264(28)
VC: Theora(31)
FFMPEG Driver: ogg
AC: FLAC(86028)
VC: Theora(31)
FFMPEG Driver: wav
FFMPEG Driver: mp3
FFMPEG Driver: mp2
Brilliant! Made a video, works phenomonal -- thank you for your diligence.
http://robert.hurst-ri.us/2014/03/05/only-3583-bytes/
Last edit: Robert Hurst 2014-03-06
This latest patch did not seem to make it into the latest 2.4.7, so a clean fetch comes back with the "getting symbol avcodec_open failed!" error as noted above.
... and the Save media returns the same warnins as noted above further suggesting the patch did not make it in:
Last edit: Robert Hurst 2014-09-06
weird, it compiles fine here (gtk and sdl), and my system is on libavutil 52 as well now:
$ ffmpeg -version
ffmpeg version 1.2.6
built on Jul 23 2014 17:39:14 with gcc 4.7.3 (Gentoo 4.7.3-r1 p1.4, pie-0.5.5)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --enable-shared --cc=x86_64-pc-linux-gnu-gcc --cxx=x86_64-pc-linux-gnu-g++ --ar=x86_64-pc-linux-gnu-ar --optflags='-O2 -pipe -mtune=native -march=native' --extra-cflags='-O2 -pipe -mtune=native -march=native' --extra-cxxflags='-O2 -pipe -mtune=native -march=native' --disable-static --enable-gpl --enable-postproc --enable-avfilter --enable-avresample --disable-stripping --enable-version3 --disable-indev=v4l2 --disable-indev=oss --disable-indev=jack --disable-outdev=oss --enable-bzlib --disable-runtime-cpudetect --disable-debug --disable-doc --disable-gnutls --enable-hardcoded-tables --enable-iconv --enable-network --disable-openssl --enable-ffplay --enable-vaapi --enable-vdpau --enable-zlib --enable-libvo-aacenc --disable-libvo-amrwbenc --enable-libmp3lame --disable-libfdk-aac --disable-libaacplus --disable-libfaac --enable-libtheora --disable-libtwolame --enable-libx264 --enable-libxvid --disable-libcdio --disable-libiec61883 --disable-libdc1394 --disable-libcaca --disable-openal --disable-libv4l2 --enable-libpulse --enable-x11grab --disable-libflite --disable-frei0r --disable-fontconfig --disable-libass --enable-libfreetype --disable-libsoxr --disable-pthreads --disable-libopencore-amrwb --disable-libopencore-amrnb --disable-libopenjpeg --disable-libbluray --disable-libcelt --disable-libgsm --disable-libmodplug --enable-libopus --disable-librtmp --disable-libschroedinger --disable-libspeex --enable-libvorbis --enable-libvpx --disable-amd3dnow --disable-amd3dnowext --disable-altivec --disable-avx --disable-mmxext --disable-ssse3 --disable-vis --disable-neon --cpu=host
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
The problem actually is with libavcodec 55, included in the ffmpeg 2.x package.
Trying to build vice 2.4 on Gentoo with ffmpeg 2.4.5 installed (libavcodec 55), I also got this error in ffmpeglib.h. Gentoo automatically applies this patch: http://sourceforge.net/p/vice-emu/patches/69/ to make vice build against newer ffmpegs. So searching for 'commodore vice "ffmpeg 2"', I found http://git.pld-linux.org/gitweb.cgi/packages/vice.git/commitdiff/87c2fd3955bfac45119b8d75113fe61d8dcb8b68. There is a file <vice-ffmpeg.patch>. When I apply it, I get "Reversed (or previously applied) patch detected!". But only applying the clean hunks made it compile through nonetheless. So I diffed the two. There were a few identical hunks and those that failed did so b/c Gentoo’s patch changes some of the lines that were contained as unchanged lines in the patch I found (Gentoo's patch is the newer one).
The only real difference after putting the two together was the offending line in ffmpeglib.h (for me it’s line 73):
-typedef AVCodec (avcodec_find_encoder_t) (enum CodecID);
+typedef AVCodec (avcodec_find_encoder_t) (enum AVCodecID);
By altering just that, it compiled through for me. I’m not sure though whether this is sane. I never looked at vice's code before. HTH
A fresh grab compiles now with no errors or warnings on src/gfxoutputdrv/*
but it does not function:
and a Save Media file outputs:
Not certain if this helps any, but ffmpeg-devel from RPMfusion appears to include old_codec_ids.h with a comment block:
/
* This header exists to prevent new codec IDs from being accidentally added to
* the deprecated list.
* Do not include it directly. It will be removed on next major bump
* Do not add new items to this list. Use the AVCodecID enum instead.
*/
Just a bump, using Fedora 21:
Click Save Media File:
Looks like all newer versions:
Last edit: Robert Hurst 2015-01-03
I get similar x64 output to Robert Hurst, with the following interesting exception at the beginning:
I'd love to make videos with VICE and am available to help with testing/troubleshooting.
I just tried applying the patches from vice-2.4.6-libavcodec-55-v3.patch above to the VICE 2.4.13 sources. (The files ffmpegdrv.c and ffmpeglib.c get patched automatically, but ffmpeglib.h needs to be patched manually.) This way the "Save media file" command from the Snapshot menu shows "FFMPEG" in the "Image Format" drop-down list, and allows me to select the video settings. Unfortunately, as soon as I hit the Save button, VICE crashes with a segfault.
I can confirm that --enable-external-ffmpeg --enable-lame are working for me, thank you!
ok, closing...