Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 23
Comskip for Linux released
#16
Thanks for that - I think I'm going to have to wave the white flag for the moment, though, and come back to this another time. While moving various file types around helps, I'm now hitting problems with what seems to be some incompatibility between ffmpeg's included <time.h> and the <sys/stat.h> - so I get a squad of

Code:
/usr/include/i386-linux-gnu/bits/stat.h:73:21: error: field âst_atimâ has incomplete type

-type errors. Not your problem, I'm sure, but I need to get a cleaner build environment before I can play with this any more.

Thanks for the work here and the help, all the same - please don't take my failure personally!
Reply
#17
(2012-12-31, 19:07)Prof Yaffle Wrote: Thanks for that - I think I'm going to have to wave the white flag for the moment, though, and come back to this another time. While moving various file types around helps, I'm now hitting problems with what seems to be some incompatibility between ffmpeg's included <time.h> and the <sys/stat.h> - so I get a squad of

Code:
/usr/include/i386-linux-gnu/bits/stat.h:73:21: error: field âst_atimâ has incomplete type

-type errors. Not your problem, I'm sure, but I need to get a cleaner build environment before I can play with this any more.

Thanks for the work here and the help, all the same - please don't take my failure personally!

Yeah, you'd be better off to build in /home/xbmc/ffmpeg (with ./configure --prefix=/home/xbmc/ffmpeg-install) and then do make install. Then add -I /home/xbmc/ffmpeg-install/include to your compile flags and -L /home/xbmc/ffmpeg-install/lib to your link flags. That will clear up the issue with a wrong time.h being included.
Reply
#18
Quote:I expected a sea of "wow, great, thanks" here, but apparently not.

Thats why:

- nobody knows what it is (I think it's a tool for marking commercials/advertisments)
- nobody knows how to use
- nobody knows what's the output of this tool (cutting or marking/creating EDL)
- self compile is a nightmare for most users here

It's like "I have the 'Heisenberg temporarly fluktuator' ready for use in linux. Check this out" (or other Startrek Technobubble).

But also, great thanks.

_BJ1

And what is argtable2?
Reply
#19
I wouldn't say that - comskip is well known but Windows-only, and I think some people run it under WINE currently. This is a native Linux port, so it'd be a great addition to a post-processing script.

http://www.kaashoek.com/comskip/

For anyone who doesn't know, comskip parses a file using a series of different techniques (looking for logos/DOGs, blank screens, aspect ratios, etc.) and then creates cut lists ("Edit Decision Lists" - EDLs) in a couple of different formats. By storing an EDL alongside a video file, XBMC uses it to skip over parts of the file when it's playing back. As if by magic, your commercials are gone without actually having to edit the file (and thus run the risk of losing sync, for example).

EDIT I'll give you that it's seemingly a bugger to compile, though ;-)
Reply
#20
Okay, this is where I've got to. I'm pretty certain that I'm hitting compiler errors now, not configuration problems.

Get, build and install ffmpeg standalone:

Code:
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --prefix=/home/xbmc/ffmpeg-install
make -j4
make install

Get comskip:

Code:
wget http://www.xilka.com/xilka/source/comskip-0.91b.tar.xz
xz -d comskip-0.91b.tar.xz
tar -xvf comskip-0.91b.tar

Configure it into submission:

Code:
cd comskip-0.91b
./configure CXXFLAGS="-I/home/xbmc/ffmpeg-install/include" CPPFLAGS="-I/home/xbmc/ffmpeg-install/include" CFLAGS="-I/home/xbmc/ffmpeg-install/include" LDFLAGS="-L/home/xbmc/ffmpeg-install/lib" --prefix=/usr

(I know this is overkill, since I'm passing the same flags to all types of C compiler, CPP-specific and C-specific - but I don't *think* that should break anything...)

Build it - and this is where it goes wrong, when linking everything together:

Code:
xbmc@revo:~/comskip-0.91b$ make
make  all-am
make[1]: Entering directory `/home/xbmc/comskip-0.91b'
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function ‘void {anonymous}::audio_packet_process({anonymous}::VideoState*, AVPacket*)’:
mpeg2dec.cpp:578:18: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mpeg2dec.cpp:579:75: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mv -f .deps/comskip-mpeg2dec.Tpo .deps/comskip-mpeg2dec.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-comskip.o -MD -MP -MF .deps/comskip-comskip.Tpo -c -o comskip-comskip.o `test -f 'comskip.cpp' || echo './'`comskip.cpp
mv -f .deps/comskip-comskip.Tpo .deps/comskip-comskip.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-BlackFrame.o -MD -MP -MF .deps/comskip-BlackFrame.Tpo -c -o comskip-BlackFrame.o `test -f 'BlackFrame.cpp' || echo './'`BlackFrame.cpp
mv -f .deps/comskip-BlackFrame.Tpo .deps/comskip-BlackFrame.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessCsv.o -MD -MP -MF .deps/comskip-ProcessCsv.Tpo -c -o comskip-ProcessCsv.o `test -f 'ProcessCsv.cpp' || echo './'`ProcessCsv.cpp
mv -f .deps/comskip-ProcessCsv.Tpo .deps/comskip-ProcessCsv.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessArInfo.o -MD -MP -MF .deps/comskip-ProcessArInfo.Tpo -c -o comskip-ProcessArInfo.o `test -f 'ProcessArInfo.cpp' || echo './'`ProcessArInfo.cpp
mv -f .deps/comskip-ProcessArInfo.Tpo .deps/comskip-ProcessArInfo.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-LoadSettings.o -MD -MP -MF .deps/comskip-LoadSettings.Tpo -c -o comskip-LoadSettings.o `test -f 'LoadSettings.cpp' || echo './'`LoadSettings.cpp
LoadSettings.cpp: In member function ‘FILE* CS::CommercialSkipper::loadSettings(int, char**)’:
LoadSettings.cpp:397:43: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:405:46: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:422:42: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:483:45: warning: format not a string literal and no format arguments [-Wformat-security]
mv -f .deps/comskip-LoadSettings.Tpo .deps/comskip-LoadSettings.Po
g++  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x  -L/home/xbmc/ffmpeg-install/lib -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o  -largtable2 -lavutil
comskip-mpeg2dec.o: In function `(anonymous namespace)::audio_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x682): undefined reference to `avcodec_decode_audio3'
comskip-mpeg2dec.o: In function `decodeOnePicture(_IO_FILE*, double, CS::CommercialSkipper*)':
mpeg2dec.cpp:(.text+0x11f6): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x122a): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x12dd): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x13f1): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1417): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1449): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1456): undefined reference to `av_free_packet'
comskip-mpeg2dec.o: In function `(anonymous namespace)::video_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x1521): undefined reference to `avcodec_decode_video2'
mpeg2dec.cpp:(.text+0x15ca): undefined reference to `avcodec_get_frame_class'
comskip-mpeg2dec.o: In function `(anonymous namespace)::stream_component_open((anonymous namespace)::VideoState*, int)':
mpeg2dec.cpp:(.text+0x2066): undefined reference to `avcodec_find_decoder'
mpeg2dec.cpp:(.text+0x2089): undefined reference to `avcodec_open2'
mpeg2dec.cpp:(.text+0x21aa): undefined reference to `avcodec_alloc_frame'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_open()':
mpeg2dec.cpp:(.text+0x2335): undefined reference to `avformat_alloc_context'
mpeg2dec.cpp:(.text+0x2361): undefined reference to `avformat_open_input'
mpeg2dec.cpp:(.text+0x23ca): undefined reference to `avformat_find_stream_info'
mpeg2dec.cpp:(.text+0x2430): undefined reference to `av_dump_format'
mpeg2dec.cpp:(.text+0x2479): undefined reference to `av_find_best_stream'
mpeg2dec.cpp:(.text+0x264f): undefined reference to `av_find_best_stream'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_close()':
mpeg2dec.cpp:(.text+0x26d2): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x2703): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x272b): undefined reference to `avformat_close_input'
comskip-mpeg2dec.o: In function `main':
mpeg2dec.cpp:(.text+0x274d): undefined reference to `avcodec_register_all'
mpeg2dec.cpp:(.text+0x2752): undefined reference to `av_register_all'
mpeg2dec.cpp:(.text+0x2abe): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2b6c): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2d10): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x2fa7): undefined reference to `av_free_packet'
collect2: ld returned 1 exit status
make[1]: *** [comskip] Error 1
make[1]: Leaving directory `/home/xbmc/comskip-0.91b'
make: *** [all] Error 2

---

From what I can see, all the object files are there, I just can't link them. That may be because we're using C functions (ffmpeg) in C++ code (comskip), but you've correctly declared the ffmpeg include files as extern "C", which was the most obvious likely cause.

Time to really give it a rest now - 2013 arrives here shortly :-)
Reply
#21
Absolutely great!

You should make binaries available as soon as you think it is ready for this.
Reply
#22
(2012-12-31, 22:16)Prof Yaffle Wrote: Okay, this is where I've got to. I'm pretty certain that I'm hitting compiler errors now, not configuration problems.

Get, build and install ffmpeg standalone:

Code:
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure --prefix=/home/xbmc/ffmpeg-install
make -j4
make install

Get comskip:

Code:
wget http://www.xilka.com/xilka/source/comskip-0.91b.tar.xz
xz -d comskip-0.91b.tar.xz
tar -xvf comskip-0.91b.tar

Configure it into submission:

Code:
cd comskip-0.91b
./configure CXXFLAGS="-I/home/xbmc/ffmpeg-install/include" CPPFLAGS="-I/home/xbmc/ffmpeg-install/include" CFLAGS="-I/home/xbmc/ffmpeg-install/include" LDFLAGS="-L/home/xbmc/ffmpeg-install/lib" --prefix=/usr

(I know this is overkill, since I'm passing the same flags to all types of C compiler, CPP-specific and C-specific - but I don't *think* that should break anything...)

Build it - and this is where it goes wrong, when linking everything together:

Code:
xbmc@revo:~/comskip-0.91b$ make
make  all-am
make[1]: Entering directory `/home/xbmc/comskip-0.91b'
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function ‘void {anonymous}::audio_packet_process({anonymous}::VideoState*, AVPacket*)’:
mpeg2dec.cpp:578:18: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mpeg2dec.cpp:579:75: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mv -f .deps/comskip-mpeg2dec.Tpo .deps/comskip-mpeg2dec.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-comskip.o -MD -MP -MF .deps/comskip-comskip.Tpo -c -o comskip-comskip.o `test -f 'comskip.cpp' || echo './'`comskip.cpp
mv -f .deps/comskip-comskip.Tpo .deps/comskip-comskip.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-BlackFrame.o -MD -MP -MF .deps/comskip-BlackFrame.Tpo -c -o comskip-BlackFrame.o `test -f 'BlackFrame.cpp' || echo './'`BlackFrame.cpp
mv -f .deps/comskip-BlackFrame.Tpo .deps/comskip-BlackFrame.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessCsv.o -MD -MP -MF .deps/comskip-ProcessCsv.Tpo -c -o comskip-ProcessCsv.o `test -f 'ProcessCsv.cpp' || echo './'`ProcessCsv.cpp
mv -f .deps/comskip-ProcessCsv.Tpo .deps/comskip-ProcessCsv.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessArInfo.o -MD -MP -MF .deps/comskip-ProcessArInfo.Tpo -c -o comskip-ProcessArInfo.o `test -f 'ProcessArInfo.cpp' || echo './'`ProcessArInfo.cpp
mv -f .deps/comskip-ProcessArInfo.Tpo .deps/comskip-ProcessArInfo.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-LoadSettings.o -MD -MP -MF .deps/comskip-LoadSettings.Tpo -c -o comskip-LoadSettings.o `test -f 'LoadSettings.cpp' || echo './'`LoadSettings.cpp
LoadSettings.cpp: In member function ‘FILE* CS::CommercialSkipper::loadSettings(int, char**)’:
LoadSettings.cpp:397:43: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:405:46: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:422:42: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:483:45: warning: format not a string literal and no format arguments [-Wformat-security]
mv -f .deps/comskip-LoadSettings.Tpo .deps/comskip-LoadSettings.Po
g++  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x  -L/home/xbmc/ffmpeg-install/lib -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o  -largtable2 -lavutil
comskip-mpeg2dec.o: In function `(anonymous namespace)::audio_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x682): undefined reference to `avcodec_decode_audio3'
comskip-mpeg2dec.o: In function `decodeOnePicture(_IO_FILE*, double, CS::CommercialSkipper*)':
mpeg2dec.cpp:(.text+0x11f6): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x122a): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x12dd): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x13f1): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1417): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1449): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1456): undefined reference to `av_free_packet'
comskip-mpeg2dec.o: In function `(anonymous namespace)::video_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x1521): undefined reference to `avcodec_decode_video2'
mpeg2dec.cpp:(.text+0x15ca): undefined reference to `avcodec_get_frame_class'
comskip-mpeg2dec.o: In function `(anonymous namespace)::stream_component_open((anonymous namespace)::VideoState*, int)':
mpeg2dec.cpp:(.text+0x2066): undefined reference to `avcodec_find_decoder'
mpeg2dec.cpp:(.text+0x2089): undefined reference to `avcodec_open2'
mpeg2dec.cpp:(.text+0x21aa): undefined reference to `avcodec_alloc_frame'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_open()':
mpeg2dec.cpp:(.text+0x2335): undefined reference to `avformat_alloc_context'
mpeg2dec.cpp:(.text+0x2361): undefined reference to `avformat_open_input'
mpeg2dec.cpp:(.text+0x23ca): undefined reference to `avformat_find_stream_info'
mpeg2dec.cpp:(.text+0x2430): undefined reference to `av_dump_format'
mpeg2dec.cpp:(.text+0x2479): undefined reference to `av_find_best_stream'
mpeg2dec.cpp:(.text+0x264f): undefined reference to `av_find_best_stream'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_close()':
mpeg2dec.cpp:(.text+0x26d2): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x2703): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x272b): undefined reference to `avformat_close_input'
comskip-mpeg2dec.o: In function `main':
mpeg2dec.cpp:(.text+0x274d): undefined reference to `avcodec_register_all'
mpeg2dec.cpp:(.text+0x2752): undefined reference to `av_register_all'
mpeg2dec.cpp:(.text+0x2abe): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2b6c): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2d10): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x2fa7): undefined reference to `av_free_packet'
collect2: ld returned 1 exit status
make[1]: *** [comskip] Error 1
make[1]: Leaving directory `/home/xbmc/comskip-0.91b'
make: *** [all] Error 2

---

From what I can see, all the object files are there, I just can't link them. That may be because we're using C functions (ffmpeg) in C++ code (comskip), but you've correctly declared the ffmpeg include files as extern "C", which was the most obvious likely cause.

Time to really give it a rest now - 2013 arrives here shortly :-)

actually you must set the env variables prior to ./configure. The way you have it they are considered options passed to configure, whereas what you really want is the environment variables to be set when configure runs.

CXXFLAGS="" ... ./configure --prefix=/usr
Reply
#23
Nope, I must be doing something wrong. Setting them as environment variables (and exporting them) beforehand, then ./configure --prefix=/usr - and I get exactly the same issues as above when linking the object files.

...

Well, suspiciously similar, depending on how I declare the variables. Setting them all on the command line seems to give me the best results, but still:

CXXFLAGS="-I/home/xbmc/ffmpeg-install/include" LDFLAGS="-L/home/xbmc/ffmpeg-install/include" CPPFLAGS="-I/home/xbmc/ffmpeg-install/include" CFLAGS="-I/home/xbmc/ffmpeg-install/include" ./configure --prefix=/usr

and then make:

Code:
make  all-am
make[1]: Entering directory `/home/xbmc/comskip-0.91b'
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function ‘void {anonymous}::audio_packet_process({anonymous}::VideoState*, AVPacket*)’:
mpeg2dec.cpp:578:18: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mpeg2dec.cpp:579:75: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mv -f .deps/comskip-mpeg2dec.Tpo .deps/comskip-mpeg2dec.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-comskip.o -MD -MP -MF .deps/comskip-comskip.Tpo -c -o comskip-comskip.o `test -f 'comskip.cpp' || echo './'`comskip.cpp
mv -f .deps/comskip-comskip.Tpo .deps/comskip-comskip.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-BlackFrame.o -MD -MP -MF .deps/comskip-BlackFrame.Tpo -c -o comskip-BlackFrame.o `test -f 'BlackFrame.cpp' || echo './'`BlackFrame.cpp
mv -f .deps/comskip-BlackFrame.Tpo .deps/comskip-BlackFrame.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessCsv.o -MD -MP -MF .deps/comskip-ProcessCsv.Tpo -c -o comskip-ProcessCsv.o `test -f 'ProcessCsv.cpp' || echo './'`ProcessCsv.cpp
mv -f .deps/comskip-ProcessCsv.Tpo .deps/comskip-ProcessCsv.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessArInfo.o -MD -MP -MF .deps/comskip-ProcessArInfo.Tpo -c -o comskip-ProcessArInfo.o `test -f 'ProcessArInfo.cpp' || echo './'`ProcessArInfo.cpp
mv -f .deps/comskip-ProcessArInfo.Tpo .deps/comskip-ProcessArInfo.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-LoadSettings.o -MD -MP -MF .deps/comskip-LoadSettings.Tpo -c -o comskip-LoadSettings.o `test -f 'LoadSettings.cpp' || echo './'`LoadSettings.cpp
LoadSettings.cpp: In member function ‘FILE* CS::CommercialSkipper::loadSettings(int, char**)’:
LoadSettings.cpp:397:43: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:405:46: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:422:42: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:483:45: warning: format not a string literal and no format arguments [-Wformat-security]
mv -f .deps/comskip-LoadSettings.Tpo .deps/comskip-LoadSettings.Po
g++  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x  -L/home/xbmc/ffmpeg-install/include -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o  -largtable2 -lavutil -lavformat -lavcodec
comskip-mpeg2dec.o: In function `(anonymous namespace)::video_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x15ca): undefined reference to `avcodec_get_frame_class'
mpeg2dec.cpp:(.text+0x15de): undefined reference to `av_opt_ptr'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_close()':
mpeg2dec.cpp:(.text+0x272b): undefined reference to `avformat_close_input'
collect2: ld returned 1 exit status
make[1]: *** [comskip] Error 1
make[1]: Leaving directory `/home/xbmc/comskip-0.91b'
make: *** [all] Error 2

Reply
#24
(2012-12-31, 23:15)Prof Yaffle Wrote: Nope, I must be doing something wrong. Setting them as environment variables (and exporting them) beforehand, then ./configure --prefix=/usr - and I get exactly the same issues as above when linking the object files.

...

Well, suspiciously similar, depending on how I declare the variables. Setting them all on the command line seems to give me the best results, but still:

CXXFLAGS="-I/home/xbmc/ffmpeg-install/include" LDFLAGS="-L/home/xbmc/ffmpeg-install/include" CPPFLAGS="-I/home/xbmc/ffmpeg-install/include" CFLAGS="-I/home/xbmc/ffmpeg-install/include" ./configure --prefix=/usr

and then make:

Code:
make  all-am
make[1]: Entering directory `/home/xbmc/comskip-0.91b'
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function ‘void {anonymous}::audio_packet_process({anonymous}::VideoState*, AVPacket*)’:
mpeg2dec.cpp:578:18: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mpeg2dec.cpp:579:75: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mv -f .deps/comskip-mpeg2dec.Tpo .deps/comskip-mpeg2dec.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-comskip.o -MD -MP -MF .deps/comskip-comskip.Tpo -c -o comskip-comskip.o `test -f 'comskip.cpp' || echo './'`comskip.cpp
mv -f .deps/comskip-comskip.Tpo .deps/comskip-comskip.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-BlackFrame.o -MD -MP -MF .deps/comskip-BlackFrame.Tpo -c -o comskip-BlackFrame.o `test -f 'BlackFrame.cpp' || echo './'`BlackFrame.cpp
mv -f .deps/comskip-BlackFrame.Tpo .deps/comskip-BlackFrame.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessCsv.o -MD -MP -MF .deps/comskip-ProcessCsv.Tpo -c -o comskip-ProcessCsv.o `test -f 'ProcessCsv.cpp' || echo './'`ProcessCsv.cpp
mv -f .deps/comskip-ProcessCsv.Tpo .deps/comskip-ProcessCsv.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessArInfo.o -MD -MP -MF .deps/comskip-ProcessArInfo.Tpo -c -o comskip-ProcessArInfo.o `test -f 'ProcessArInfo.cpp' || echo './'`ProcessArInfo.cpp
mv -f .deps/comskip-ProcessArInfo.Tpo .deps/comskip-ProcessArInfo.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-LoadSettings.o -MD -MP -MF .deps/comskip-LoadSettings.Tpo -c -o comskip-LoadSettings.o `test -f 'LoadSettings.cpp' || echo './'`LoadSettings.cpp
LoadSettings.cpp: In member function ‘FILE* CS::CommercialSkipper::loadSettings(int, char**)’:
LoadSettings.cpp:397:43: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:405:46: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:422:42: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:483:45: warning: format not a string literal and no format arguments [-Wformat-security]
mv -f .deps/comskip-LoadSettings.Tpo .deps/comskip-LoadSettings.Po
g++  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x  -L/home/xbmc/ffmpeg-install/include -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o  -largtable2 -lavutil -lavformat -lavcodec
comskip-mpeg2dec.o: In function `(anonymous namespace)::video_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x15ca): undefined reference to `avcodec_get_frame_class'
mpeg2dec.cpp:(.text+0x15de): undefined reference to `av_opt_ptr'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_close()':
mpeg2dec.cpp:(.text+0x272b): undefined reference to `avformat_close_input'
collect2: ld returned 1 exit status
make[1]: *** [comskip] Error 1
make[1]: Leaving directory `/home/xbmc/comskip-0.91b'
make: *** [all] Error 2

This is wrong:
-L/home/xbmc/ffmpeg-install/include-L/home/xbmc/ffmpeg-install/include

should be:
-L/home/xbmc/ffmpeg-install/include-L/home/xbmc/ffmpeg-install/lib
Reply
#25
That was a typo - real command line was:

Code:
CXXFLAGS="-I/home/xbmc/ffmpeg-install/include" LDFLAGS="-L/home/xbmc/ffmpeg-install/lib" CPPFLAGS="-I/home/xbmc/ffmpeg-install/include" CFLAGS="-I/home/xbmc/ffmpeg-install/include" ./configure --prefix=/usr

Same errors on linking, though.
Reply
#26
(2013-01-01, 03:03)Prof Yaffle Wrote: That was a typo - real command line was:

Code:
CXXFLAGS="-I/home/xbmc/ffmpeg-install/include" LDFLAGS="-L/home/xbmc/ffmpeg-install/lib" CPPFLAGS="-I/home/xbmc/ffmpeg-install/include" CFLAGS="-I/home/xbmc/ffmpeg-install/include" ./configure --prefix=/usr

Same errors on linking, though.

You can see the wrong path in the link attempt when it tries to link. So yes your path was wrong. Bottom line is that if it doesn't find the libs in the path specified with -L... it's going to link against the system libs and hence this error.

Reply
#27
If I use the command line I gave above, the final link stage command is this:

Code:
g++  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x  -L/home/xbmc/ffmpeg-install/lib -L/home/xbmc/ffmpeg-install/include -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o  -largtable2 -lavutil

You can see that this is trying the *correct* path from what I understand ("-L/home/xbmc/ffmpeg-install/lib") - the second link directive ("-L/home/xbmc/ffmpeg-install/include") is decorative, it's just there to make damned sure the linker can find the files wherever they're likely to be under ~/ffmpeg-install, even if I know they're not in "include". Taking this out makes no difference.

I just removed the whole directory to get rid of old config files, object files, etc. - untarred the source - and tried the configure command above and then make. Same problem when linking:

Code:
xbmc@revo:~/comskip-0.91b$ make
make  all-am
make[1]: Entering directory `/home/xbmc/comskip-0.91b'
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.cpp' || echo './'`mpeg2dec.cpp
mpeg2dec.cpp: In function ‘void {anonymous}::audio_packet_process({anonymous}::VideoState*, AVPacket*)’:
mpeg2dec.cpp:578:18: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mpeg2dec.cpp:579:75: warning: ‘int avcodec_decode_audio3(AVCodecContext*, int16_t*, int*, AVPacket*)’ is deprecated (declared at /home/xbmc/ffmpeg-install/include/libavcodec/avcodec.h:3956) [-Wdeprecated-declarations]
mv -f .deps/comskip-mpeg2dec.Tpo .deps/comskip-mpeg2dec.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-comskip.o -MD -MP -MF .deps/comskip-comskip.Tpo -c -o comskip-comskip.o `test -f 'comskip.cpp' || echo './'`comskip.cpp
mv -f .deps/comskip-comskip.Tpo .deps/comskip-comskip.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-BlackFrame.o -MD -MP -MF .deps/comskip-BlackFrame.Tpo -c -o comskip-BlackFrame.o `test -f 'BlackFrame.cpp' || echo './'`BlackFrame.cpp
mv -f .deps/comskip-BlackFrame.Tpo .deps/comskip-BlackFrame.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessCsv.o -MD -MP -MF .deps/comskip-ProcessCsv.Tpo -c -o comskip-ProcessCsv.o `test -f 'ProcessCsv.cpp' || echo './'`ProcessCsv.cpp
mv -f .deps/comskip-ProcessCsv.Tpo .deps/comskip-ProcessCsv.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-ProcessArInfo.o -MD -MP -MF .deps/comskip-ProcessArInfo.Tpo -c -o comskip-ProcessArInfo.o `test -f 'ProcessArInfo.cpp' || echo './'`ProcessArInfo.cpp
mv -f .deps/comskip-ProcessArInfo.Tpo .deps/comskip-ProcessArInfo.Po
g++ -DHAVE_CONFIG_H -I.   -I/home/xbmc/ffmpeg-install/include  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x -MT comskip-LoadSettings.o -MD -MP -MF .deps/comskip-LoadSettings.Tpo -c -o comskip-LoadSettings.o `test -f 'LoadSettings.cpp' || echo './'`LoadSettings.cpp
LoadSettings.cpp: In member function ‘FILE* CS::CommercialSkipper::loadSettings(int, char**)’:
LoadSettings.cpp:397:43: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:405:46: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:422:42: warning: format not a string literal and no format arguments [-Wformat-security]
LoadSettings.cpp:483:45: warning: format not a string literal and no format arguments [-Wformat-security]
mv -f .deps/comskip-LoadSettings.Tpo .deps/comskip-LoadSettings.Po
g++  -I/home/xbmc/ffmpeg-install/include -std=gnu++0x  -L/home/xbmc/ffmpeg-install/lib -o comskip comskip-mpeg2dec.o comskip-comskip.o comskip-BlackFrame.o comskip-ProcessCsv.o comskip-ProcessArInfo.o comskip-LoadSettings.o  -largtable2 -lavutil
comskip-mpeg2dec.o: In function `(anonymous namespace)::audio_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x682): undefined reference to `avcodec_decode_audio3'
comskip-mpeg2dec.o: In function `decodeOnePicture(_IO_FILE*, double, CS::CommercialSkipper*)':
mpeg2dec.cpp:(.text+0x11f6): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x122a): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x12dd): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x13f1): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1417): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1449): undefined reference to `av_free_packet'
mpeg2dec.cpp:(.text+0x1456): undefined reference to `av_free_packet'
comskip-mpeg2dec.o: In function `(anonymous namespace)::video_packet_process((anonymous namespace)::VideoState*, AVPacket*)':
mpeg2dec.cpp:(.text+0x1521): undefined reference to `avcodec_decode_video2'
mpeg2dec.cpp:(.text+0x15ca): undefined reference to `avcodec_get_frame_class'
comskip-mpeg2dec.o: In function `(anonymous namespace)::stream_component_open((anonymous namespace)::VideoState*, int)':
mpeg2dec.cpp:(.text+0x2066): undefined reference to `avcodec_find_decoder'
mpeg2dec.cpp:(.text+0x2089): undefined reference to `avcodec_open2'
mpeg2dec.cpp:(.text+0x21aa): undefined reference to `avcodec_alloc_frame'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_open()':
mpeg2dec.cpp:(.text+0x2335): undefined reference to `avformat_alloc_context'
mpeg2dec.cpp:(.text+0x2361): undefined reference to `avformat_open_input'
mpeg2dec.cpp:(.text+0x23ca): undefined reference to `avformat_find_stream_info'
mpeg2dec.cpp:(.text+0x2430): undefined reference to `av_dump_format'
mpeg2dec.cpp:(.text+0x2479): undefined reference to `av_find_best_stream'
mpeg2dec.cpp:(.text+0x264f): undefined reference to `av_find_best_stream'
comskip-mpeg2dec.o: In function `(anonymous namespace)::file_close()':
mpeg2dec.cpp:(.text+0x26d2): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x2703): undefined reference to `avcodec_close'
mpeg2dec.cpp:(.text+0x272b): undefined reference to `avformat_close_input'
comskip-mpeg2dec.o: In function `main':
mpeg2dec.cpp:(.text+0x274d): undefined reference to `avcodec_register_all'
mpeg2dec.cpp:(.text+0x2752): undefined reference to `av_register_all'
mpeg2dec.cpp:(.text+0x2abe): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2b6c): undefined reference to `av_seek_frame'
mpeg2dec.cpp:(.text+0x2d10): undefined reference to `av_read_frame'
mpeg2dec.cpp:(.text+0x2fa7): undefined reference to `av_free_packet'
collect2: ld returned 1 exit status
make[1]: *** [comskip] Error 1
make[1]: Leaving directory `/home/xbmc/comskip-0.91b'
make: *** [all] Error 2

Manually trying the final g++ command doesn't help, no matter how much I play with options (e.g. adding the other ffmpeg libraries).

I wonder if it's an issue with how I've compiled ffmpeg - a quick squint on Google suggests that other people have had similar problems when linking dependent programs, but (sadly) for a whole variety of different reasons.

No worries, maybe someone else can take a look, the world won't end!

HNY to all, anyway.
Reply
#28
OK, I just fixed you up. I've updated the first post. Building with a static ffmpeg is now much easier and reliable.
Reply
#29
(2013-01-01, 14:15)cbxbiker61 Wrote: OK, I just fixed you up. I've updated the first post. Building with a static ffmpeg is now much easier and reliable.

I just tried the extra steps added to post 1 and it installed successfully, now to test Smile

Thanks.
Reply
#30
I'm looking forward in using comskip for Linux!
On MediaPortal I was used to use it for al recorded programs, unfortunatly Comskip (for Windows) doesn't support MKV-videofiles.

Currently I'm using XBMCBuntu (TVheadend backend, which records in MKV format) and XMBC 11.0 (Eden), so it would be great to
use Comskip for Linux for MKV-videofiles.

The installation procedure you describe for ffmpeg older than 0.9 works for me.
Currently running comskip on some recordings (mkv-files) at this moment.
Very curious how playback in XBMC will be...

Comskip was the only feature I still was missing, so... happy happy joy joy! Wink


Thanks in advance and compliments sofar!


Marc
Acer Aspire Idea 500 with 2 Yuan MPC718 MiniPCI hybrid DVB-T Tuners running
XBMCbuntu 11.0 "Eden", TVheadend 3.2 and Comskip 0.91e.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 23

Logout Mark Read Team Forum Stats Members Help
Comskip for Linux released6