Skip to content
This repository has been archived by the owner on Oct 12, 2018. It is now read-only.

Ffmpeg ruby problem #23

Closed
pi-mad opened this issue May 31, 2017 · 0 comments
Closed

Ffmpeg ruby problem #23

pi-mad opened this issue May 31, 2017 · 0 comments

Comments

@pi-mad
Copy link

pi-mad commented May 31, 2017

Hi when I do bundle install it brings this error up 'An error occurred while installing
ffmpeg-ruby (0.1.3), and Bundler cannot
continue.
Make sure that gem install ffmpeg-ruby -v '0.1.3' succeeds before bundling.' but when I put gem install ffmpeg-ruby -v '0.1.3' I get this '
mpeg_avcodec.c: In function ‘codec_type_map’:
ffmpeg_avcodec.c:25:31: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
rb_hash_aset(result, INT2NUM(CODEC_TYPE_VIDEO), rb_str_new2("Video"));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:25:23: note: in expansion of macro ‘INT2NUM’
rb_hash_aset(result, INT2NUM(CODEC_TYPE_VIDEO), rb_str_new2("Video"));
^
ffmpeg_avcodec.c:25:31: note: each undeclared identifier is reported only once for each function it appears in
rb_hash_aset(result, INT2NUM(CODEC_TYPE_VIDEO), rb_str_new2("Video"));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:25:23: note: in expansion of macro ‘INT2NUM’
rb_hash_aset(result, INT2NUM(CODEC_TYPE_VIDEO), rb_str_new2("Video"));
^
ffmpeg_avcodec.c:26:31: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
rb_hash_aset(result, INT2NUM(CODEC_TYPE_AUDIO), rb_str_new2("Audio"));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:26:23: note: in expansion of macro ‘INT2NUM’
rb_hash_aset(result, INT2NUM(CODEC_TYPE_AUDIO), rb_str_new2("Audio"));
^
ffmpeg_avcodec.c:27:31: error: ‘CODEC_TYPE_DATA’ undeclared (first use in this function)
rb_hash_aset(result, INT2NUM(CODEC_TYPE_DATA), rb_str_new2("Data"));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:27:23: note: in expansion of macro ‘INT2NUM’
rb_hash_aset(result, INT2NUM(CODEC_TYPE_DATA), rb_str_new2("Data"));
^
ffmpeg_avcodec.c:28:31: error: ‘CODEC_TYPE_SUBTITLE’ undeclared (first use in this function) rb_hash_aset(result, INT2NUM(CODEC_TYPE_SUBTITLE), rb_str_new2("Subtitle"));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:28:23: note: in expansion of macro ‘INT2NUM’
rb_hash_aset(result, INT2NUM(CODEC_TYPE_SUBTITLE), rb_str_new2("Subtitle"));
^
ffmpeg_avcodec.c:29:31: error: ‘CODEC_TYPE_ATTACHMENT’ undeclared (first use in this function)
rb_hash_aset(result, INT2NUM(CODEC_TYPE_ATTACHMENT), rb_str_new2("Attachment"));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:29:23: note: in expansion of macro ‘INT2NUM’
rb_hash_aset(result, INT2NUM(CODEC_TYPE_ATTACHMENT), rb_str_new2("Attachment"));
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_codec_id’:
ffmpeg_avcodec.c:38:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
VALUE result = INT2NUM(ptr->codec_id);
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_fourcc_tag’:
ffmpeg_avcodec.c:49:6: warning: implicit declaration of function ‘isprint’ [-Wimplicit-function-declaration]
if( isprint(enc->codec_tag&0xFF) && isprint((enc->codec_tag>>8)&0xFF)
^
ffmpeg_avcodec.c:59:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
VALUE result = rb_str_new2(buf1);
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_width’:
ffmpeg_avcodec.c:67:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
VALUE result = INT2NUM(ptr->width);
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_height’:
ffmpeg_avcodec.c:75:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
VALUE result = INT2NUM(ptr->height);
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_channels’:
ffmpeg_avcodec.c:83:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
VALUE result = INT2NUM(ptr->channels);
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_sample_rate’:
ffmpeg_avcodec.c:91:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
VALUE result = INT2NUM(ptr->sample_rate);
^
ffmpeg_avcodec.c: In function ‘AVCodec_long_name’:
ffmpeg_avcodec.c:100:5: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
tm = ptr->long_name;
^
ffmpeg_avcodec.c: In function ‘AVCodec_codec_type’:
ffmpeg_avcodec.c:113:8: warning: unused variable ‘tm’ [-Wunused-variable]
char* tm;
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_codec_long_name’:
ffmpeg_avcodec.c:126:5: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
tm = ptr->codec->long_name;
^
ffmpeg_avcodec.c: In function ‘AVCodecContext_codec_name’:
ffmpeg_avcodec.c:137:5: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
tm = ptr->codec->name;
^
ffmpeg_avcodec.c: In function ‘supported_video_codecs’:
ffmpeg_avcodec.c:162:25: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
if (pNextCodec->type==CODEC_TYPE_VIDEO) {
^
ffmpeg_avcodec.c: In function ‘supported_audio_codecs’:
ffmpeg_avcodec.c:179:25: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
if (pNextCodec->type==CODEC_TYPE_AUDIO) {
^
In file included from /usr/local/include/ruby-1.9.1/ruby.h:32:0,
from ffmpeg_avcodec.c:1:
ffmpeg_avcodec.c: In function ‘Init_ffmpeg_ruby_avcodec’:
ffmpeg_avcodec.c:249:55: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
rb_define_const(module, "CODEC_TYPE_VIDEO", INT2NUM(CODEC_TYPE_VIDEO));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:249:47: note: in expansion of macro ‘INT2NUM’
rb_define_const(module, "CODEC_TYPE_VIDEO", INT2NUM(CODEC_TYPE_VIDEO));
^
ffmpeg_avcodec.c:250:55: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
rb_define_const(module, "CODEC_TYPE_AUDIO", INT2NUM(CODEC_TYPE_AUDIO));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:250:47: note: in expansion of macro ‘INT2NUM’
rb_define_const(module, "CODEC_TYPE_AUDIO", INT2NUM(CODEC_TYPE_AUDIO));
^
ffmpeg_avcodec.c:251:54: error: ‘CODEC_TYPE_DATA’ undeclared (first use in this function)
rb_define_const(module, "CODEC_TYPE_DATA", INT2NUM(CODEC_TYPE_DATA));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:251:46: note: in expansion of macro ‘INT2NUM’
rb_define_const(module, "CODEC_TYPE_DATA", INT2NUM(CODEC_TYPE_DATA));
^
ffmpeg_avcodec.c:252:58: error: ‘CODEC_TYPE_SUBTITLE’ undeclared (first use in this function)
rb_define_const(module, "CODEC_TYPE_SUBTITLE", INT2NUM(CODEC_TYPE_SUBTITLE));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:252:50: note: in expansion of macro ‘INT2NUM’
rb_define_const(module, "CODEC_TYPE_SUBTITLE", INT2NUM(CODEC_TYPE_SUBTITLE));
^
ffmpeg_avcodec.c:253:60: error: ‘CODEC_TYPE_ATTACHMENT’ undeclared (first use in this function)
rb_define_const(module, "CODEC_TYPE_ATTACHMENT", INT2NUM(CODEC_TYPE_ATTACHMENT));
^
/usr/local/include/ruby-1.9.1/ruby/ruby.h:225:45: note: in definition of macro ‘INT2FIX’
#define INT2FIX(i) ((VALUE)(((SIGNED_VALUE)(i))<<1 | FIXNUM_FLAG))
^ffmpeg_avcodec.c:253:52: note: in expansion of macro ‘INT2NUM’
rb_define_const(module, "CODEC_TYPE_ATTACHMENT", INT2NUM(CODEC_TYPE_ATTACHMENT));
^
Makefile:206: recipe for target 'ffmpeg_avcodec.o' failed
make: *** [ffmpeg_avcodec.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/ffmpeg-ruby-0.1.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/extensions/x86_64-linux/1.9.1-static/ffmpeg-ruby-0.1.3/gem_make.out

And so on and after doing that go back to bundle install and it's the second problem,

Need your help asap

Regards
Matt

@pi-mad pi-mad closed this as completed Jan 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant