[HowTo] Autoedit – Fully automated DVR with commercial detection

Okay, so I started all over again, installing OSMC using the install GUI, and then updating tp the latest version (May release) using the OSMC update interface. So now my version number is 4.9.29-5-osmc running on raspi 3.

I carefully followed all instructions, checking my history to ensure that I had indeed copy and pasted all commands correctly, and I encountered my first error when trying to make h.256

osmc@osmc:~/sources/ffmpeg/x265/build/linux$ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
-- cmake version 3.0.2
-- Detected ARM target processor
-- Could NOT find NUMA (missing:  NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY) 
-- hg found at /usr/bin/hg
-- x265 version 2.4+68-011e09a0d4b2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/osmc/sources/ffmpeg/x265/build/linux
osmc@osmc:~/sources/ffmpeg/x265/build/linux$ make
[  1%] Building CXX object common/CMakeFiles/common.dir/arm/asm-primitives.cpp.o
*** Error in `/usr/bin/c++': double free or corruption (top): 0x01f7a7f0 ***
Aborted
common/CMakeFiles/common.dir/build.make:54: recipe for target 'common/CMakeFiles/common.dir/arm/asm-primitives.cpp.o' failed
make[2]: *** [common/CMakeFiles/common.dir/arm/asm-primitives.cpp.o] Error 134
CMakeFiles/Makefile2:258: recipe for target 'common/CMakeFiles/common.dir/all' failed
make[1]: *** [common/CMakeFiles/common.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

This seems to be a common bug on raspi 3 builds using gcc 4.9.2, so I modified the Makefiles by replacing every instance of “-mcpu=native” with “-mcpu=cortex-a53”
and “-march=native” with “-march=armv8-a”. That seemed to fixed the make problem and all else went well with building and installing ffmpeg (i.e. successful build with no errors). To be sure that everything was indeed installed, I ran a quick ls /opt/vc/lib and ffmpeg -encoders | grep omx.

osmc@osmc:~/sources/Comskip$ ls /opt/vc/lib/
libbcm_host.so    libdebug_sym_static.a  libGLESv2_static.a     libmmal_vc_client.so  libvcos.so
libbrcmEGL.so     libdtovl.so            libkhrn_client.a       libopenmaxil.so       libvcsm.so
libbrcmGLESv2.so  libEGL.so              libkhrn_static.a       libOpenVG.so          libWFC.so
libbrcmOpenVG.so  libEGL_static.a        libmmal_components.so  libvcfiled_check.a    pkgconfig
libbrcmWFC.so     libelftoolchain.so     libmmal_core.so        libvchiq_arm.so       plugins
libcontainers.so  libGLESv1_CM.so        libmmal.so             libvchostif.a
libdebug_sym.so   libGLESv2.so 

osmc@osmc:~/sources/Comskip$ ffmpeg -encoders | grep omx
ffmpeg version N-86499-g1edbf5e Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.9.2 (Debian 4.9.2-10)
  configuration: --pkg-config-flags=--static --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-mmal --enable-decoder=mpeg2_mmal --enable-decoder=mpeg4_mmal --enable-decoder=h264_mmal --enable-decoder=vc1_mmal --enable-omx-rpi --enable-encoder=h264_omx
  libavutil      55. 66.100 / 55. 66.100
  libavcodec     57. 99.100 / 57. 99.100
  libavformat    57. 73.100 / 57. 73.100
  libavdevice    57.  7.100 / 57.  7.100
  libavfilter     6. 92.100 /  6. 92.100
  libswscale      4.  7.101 /  4.  7.101
  libswresample   2.  8.100 /  2.  8.100
  libpostproc    54.  6.100 / 54.  6.100
 V..... h264_omx             OpenMAX IL H.264 video encoder (codec h264)

I then proceeded to follow the comskip instructions. And once again I had the same error as before

osmc@osmc:~/sources/Comskip$ make -j4
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT comskip-comskip.o -MD -MP -MF .deps/comskip-comskip.Tpo -c -o comskip-comskip.o `test -f 'comskip.c' || echo './'`comskip.c
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT comskip-mpeg2dec.o -MD -MP -MF .deps/comskip-mpeg2dec.Tpo -c -o comskip-mpeg2dec.o `test -f 'mpeg2dec.c' || echo './'`mpeg2dec.c
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT comskip-platform.o -MD -MP -MF .deps/comskip-platform.Tpo -c -o comskip-platform.o `test -f 'platform.c' || echo './'`platform.c
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT comskip-video_out_dx.o -MD -MP -MF .deps/comskip-video_out_dx.Tpo -c -o comskip-video_out_dx.o `test -f 'video_out_dx.c' || echo './'`video_out_dx.c
mv -f .deps/comskip-video_out_dx.Tpo .deps/comskip-video_out_dx.Po
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT ccextratorwin/comskip-608.o -MD -MP -MF ccextratorwin/.deps/comskip-608.Tpo -c -o ccextratorwin/comskip-608.o `test -f 'ccextratorwin/608.c' || echo './'`ccextratorwin/608.c
mv -f .deps/comskip-platform.Tpo .deps/comskip-platform.Po
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT ccextratorwin/comskip-ccextractor.o -MD -MP -MF ccextratorwin/.deps/comskip-ccextractor.Tpo -c -o ccextratorwin/comskip-ccextractor.o `test -f 'ccextratorwin/ccextractor.c' || echo './'`ccextratorwin/ccextractor.c
mpeg2dec.c: In function ‘retreive_frame_volume’:
mpeg2dec.c:379:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     int s_per_frame = (to_pts - from_pts) * (double)(is->audio_st->codec->sample_rate+1);
     ^
mpeg2dec.c:388:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         buffer = & audio_buffer[(int)((from_pts - base_apts) * ((double)is->audio_st->codec->sample_rate+0.5) )];
         ^
mpeg2dec.c:401:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         audio_samples -= (int)((from_pts - base_apts) * (is->audio_st->codec->sample_rate+0.5)); // incomplete frame before complete frame
         ^
mpeg2dec.c:434:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         top_apts = base_apts + audio_samples / (double)(is->audio_st->codec->sample_rate);
         ^
mpeg2dec.c: In function ‘sound_to_frames’:
mpeg2dec.c:476:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (old_sample_rate == is->audio_st->codec->sample_rate &&
     ^
mpeg2dec.c:478:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         || (top_apts - base_apts) * (is->audio_st->codec->sample_rate+0.5) > AUDIOBUFFER
         ^
mpeg2dec.c:480:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         || !ISSAME(((double)audio_samples /(double)(is->audio_st->codec->sample_rate+0.5))+ base_apts, top_apts)
         ^
mpeg2dec.c:496:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (old_sample_rate != 0 && old_sample_rate != is->audio_st->codec->sample_rate) {
     ^
mpeg2dec.c:497:10: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
          Debug(5, "Audio samplerate switched from %d to %d\n", old_sample_rate, is->audio_st->codec->sample_rate );
          ^
mpeg2dec.c:499:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     old_sample_rate = is->audio_st->codec->sample_rate;
     ^
mpeg2dec.c:502:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (fabs(base_apts - (is->audio_clock - ((double)audio_samples /(double)(is->audio_st->codec->sample_rate))))> 0.0001)
     ^
mpeg2dec.c:503:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         base_apts = (is->audio_clock - ((double)audio_samples /(double)(is->audio_st->codec->sample_rate)));
         ^
mpeg2dec.c:504:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         if (ALIGN_AC3_PACKETS && is->audio_st->codec->codec_id == AV_CODEC_ID_AC3) {
         ^
mpeg2dec.c:529:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             for (l=0;l < is->audio_st->codec->channels;l++ )
             ^
mpeg2dec.c:537:21: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                     for (l=0;l < is->audio_st->codec->channels;l++ ) volume += *((fb[l])++) * 64000;
                     ^
mpeg2dec.c:539:21: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                     for (l=0;l < is->audio_st->codec->channels;l++ ) volume += *((fb[0])++) * 64000;
                     ^
mpeg2dec.c:540:17: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                 *audio_buffer_ptr++ = volume / is->audio_st->codec->channels;
                 ^
mpeg2dec.c:541:17: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                 avg_volume += abs(volume / is->audio_st->codec->channels);
                 ^
mpeg2dec.c:546:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             for (l=0;l < is->audio_st->codec->channels;l++ )
             ^
mpeg2dec.c:554:21: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                     for (l=0;l < is->audio_st->codec->channels;l++ ) volume += *((sb[l])++);
                     ^
mpeg2dec.c:556:21: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                     for (l=0;l < is->audio_st->codec->channels;l++ ) volume += *((sb[0])++);
                     ^
mpeg2dec.c:557:17: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                 *audio_buffer_ptr++ = volume / is->audio_st->codec->channels;
                 ^
mpeg2dec.c:558:17: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                 avg_volume += abs(volume / is->audio_st->codec->channels);
                 ^
mpeg2dec.c:564:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     top_apts = base_apts + audio_samples / (double)(is->audio_st->codec->sample_rate);
     ^
mpeg2dec.c: In function ‘audio_packet_process’:
mpeg2dec.c:602:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if ( !ALIGN_AC3_PACKETS && is->audio_st->codec->codec_id == AV_CODEC_ID_AC3
     ^
mpeg2dec.c:615:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (ALIGN_AC3_PACKETS && is->audio_st->codec->codec_id == AV_CODEC_ID_AC3) {
     ^
mpeg2dec.c:666:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             if (ALIGN_AC3_PACKETS && is->audio_st->codec->codec_id == AV_CODEC_ID_AC3) {
             ^
mpeg2dec.c:710:9: warning: ‘avcodec_decode_audio4’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4914) [-Wdeprecated-declarations]
         len1 = avcodec_decode_audio4(is->audio_st->codec, is->frame, &got_frame, pkt_temp);
         ^
mpeg2dec.c:710:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
mpeg2dec.c:712:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         if (prev_codec_id != -1 && (unsigned int)prev_codec_id != is->audio_st->codec->codec_id)
         ^
mpeg2dec.c:716:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         prev_codec_id = is->audio_st->codec->codec_id;
         ^
mpeg2dec.c:721:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             if (is->audio_st->codec->codec_id == AV_CODEC_ID_AC3) ac3_packet_index = 0;
             ^
mpeg2dec.c:754:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (ALIGN_AC3_PACKETS && is->audio_st->codec->codec_id == AV_CODEC_ID_AC3) {
     ^
mpeg2dec.c: In function ‘DoSeekRequest’:
mpeg2dec.c:1037:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             avcodec_flush_buffers(is->audio_st->codec);
             ^
mpeg2dec.c:1041:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             avcodec_flush_buffers(is->video_st->codec);
             ^
mpeg2dec.c: In function ‘video_packet_process’:
mpeg2dec.c:1202:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (!hardware_decode) is->video_st->codec->flags |= CODEC_FLAG_GRAY;
     ^
mpeg2dec.c:1204:5: warning: ‘avcodec_decode_video2’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4963) [-Wdeprecated-declarations]
     len1 = avcodec_decode_video2(is->video_st->codec, is->pFrame, &frameFinished,
     ^
mpeg2dec.c:1204:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
mpeg2dec.c:1231:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
         frame_delay = av_q2d(is->video_st->codec->time_base) * is->video_st->codec->ticks_per_frame ;
         ^
mpeg2dec.c:1231:9: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
mpeg2dec.c:1343:17: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                 if (!ISSAME(3*frame_delay/ is->video_st->codec->ticks_per_frame, calculated_delay))
                 ^
mpeg2dec.c:1344:21: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
                     if (!ISSAME(1*frame_delay/ is->video_st->codec->ticks_per_frame, calculated_delay))
                     ^
mpeg2dec.c:1359:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             && !ISSAME(3*frame_delay/ is->video_st->codec->ticks_per_frame, calculated_delay)
             ^
mpeg2dec.c:1360:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             && !ISSAME(1*frame_delay/ is->video_st->codec->ticks_per_frame, calculated_delay)
             ^
mpeg2dec.c: In function ‘stream_component_open’:
mpeg2dec.c:1605:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     codecCtx = pFormatCtx->streams[stream_index]->codec;
     ^
mpeg2dec.c:1755:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             is->video_st->codec->ticks_per_frame = 1;
             ^
mpeg2dec.c: In function ‘file_open’:
mpeg2dec.c:1939:13: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
             is->fps = 1/av_q2d(is->video_st->codec->time_base);
             ^
mpeg2dec.c: In function ‘file_close’:
mpeg2dec.c:2011:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (is->videoStream != -1) avcodec_close(is->pFormatCtx->streams[is->videoStream]->codec);
     ^
mpeg2dec.c:2015:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (is->audioStream != -1) avcodec_close(is->pFormatCtx->streams[is->audioStream]->codec);
     ^
mpeg2dec.c:2017:5: warning: ‘codec’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:893) [-Wdeprecated-declarations]
     if (is->subtitleStream != -1)  avcodec_close(is->pFormatCtx->streams[is->subtitleStream]->codec);
     ^
mv -f ccextratorwin/.deps/comskip-608.Tpo ccextratorwin/.deps/comskip-608.Po
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT ccextratorwin/comskip-encoding.o -MD -MP -MF ccextratorwin/.deps/comskip-encoding.Tpo -c -o ccextratorwin/comskip-encoding.o `test -f 'ccextratorwin/encoding.c' || echo './'`ccextratorwin/encoding.c
mv -f ccextratorwin/.deps/comskip-ccextractor.Tpo ccextratorwin/.deps/comskip-ccextractor.Po
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT ccextratorwin/comskip-general_loop.o -MD -MP -MF ccextratorwin/.deps/comskip-general_loop.Tpo -c -o ccextratorwin/comskip-general_loop.o `test -f 'ccextratorwin/general_loop.c' || echo './'`ccextratorwin/general_loop.c
mv -f ccextratorwin/.deps/comskip-encoding.Tpo ccextratorwin/.deps/comskip-encoding.Po
gcc -DPACKAGE_NAME=\"Comskip\" -DPACKAGE_TARNAME=\"comskip\" -DPACKAGE_VERSION=\"0.81.098\" -DPACKAGE_STRING=\"Comskip\ 0.81.098\" -DPACKAGE_BUGREPORT=\"https://github.com/erikkaashoek/Comskip/issues\" -DPACKAGE_URL=\"\" -DPACKAGE=\"comskip\" -DVERSION=\"0.81.098\" -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -I.  -Wall  -I/usr/local/include  -DPROCESS_CC -DDONATOR  -g -O2  -MT ccextratorwin/comskip-myth.o -MD -MP -MF ccextratorwin/.deps/comskip-myth.Tpo -c -o ccextratorwin/comskip-myth.o `test -f 'ccextratorwin/myth.c' || echo './'`ccextratorwin/myth.c
In file included from ccextratorwin/general_loop.c:2:0:
ccextratorwin/general_loop.c: In function ‘ts_getmoredata’:
ccextratorwin/general_loop.c:295:21: warning: the address of ‘tsheader’ will always evaluate as ‘true’ [-Waddress]
     buffered_read_4(tsheader);
                     ^
ccextratorwin/ccextractor.h:149:9: note: in definition of macro ‘buffered_read_4’
     if (buffer) { buffer[0]=filebuffer[filebuffer_pos]; \
         ^
ccextratorwin/ccextractor.h:143:15: warning: the comparison will always evaluate as ‘true’ for the address of ‘adlength’ will never be NULL [-Waddress]
     if (buffer!=NULL) memcpy (buffer,filebuffer+filebuffer_pos,bytes); \
               ^
ccextratorwin/general_loop.c:352:7: note: in expansion of macro ‘buffered_read’
       buffered_read (&adlength, 1);
       ^
In file included from ccextratorwin/myth.c:4:0:
ccextratorwin/myth.c: In function ‘get_be16’:
ccextratorwin/myth.c:290:25: warning: the address of ‘a’ will always evaluate as ‘true’ [-Waddress]
     buffered_read_byte (&a);
                         ^
ccextratorwin/ccextractor.h:158:9: note: in definition of macro ‘buffered_read_byte’
     if (buffer) { *buffer=filebuffer[filebuffer_pos]; \
         ^
ccextratorwin/myth.c:291:25: warning: the address of ‘b’ will always evaluate as ‘true’ [-Waddress]
     buffered_read_byte (&b);
                         ^
ccextratorwin/ccextractor.h:158:9: note: in definition of macro ‘buffered_read_byte’
     if (buffer) { *buffer=filebuffer[filebuffer_pos]; \
         ^
ccextratorwin/myth.c: In function ‘get_byte’:
ccextratorwin/myth.c:298:21: warning: the address of ‘b’ will always evaluate as ‘true’ [-Waddress]
  buffered_read_byte(&b);
                     ^
ccextratorwin/ccextractor.h:158:9: note: in definition of macro ‘buffered_read_byte’
     if (buffer) { *buffer=filebuffer[filebuffer_pos]; \
         ^
ccextratorwin/myth.c: In function ‘find_next_start_code’:
ccextratorwin/myth.c:340:29: warning: the address of ‘cx’ will always evaluate as ‘true’ [-Waddress]
         buffered_read_byte (&cx);
                             ^
ccextratorwin/ccextractor.h:158:9: note: in definition of macro ‘buffered_read_byte’
     if (buffer) { *buffer=filebuffer[filebuffer_pos]; \
         ^
ccextratorwin/myth.c: In function ‘mpegps_read_pes_header’:
ccextratorwin/myth.c:38:33: warning: overflow in implicit constant conversion [-Woverflow]
 #define AV_NOPTS_VALUE          (int64_t)(0x8000000000000000)
                                 ^
ccextratorwin/myth.c:433:11: note: in expansion of macro ‘AV_NOPTS_VALUE’
     pts = AV_NOPTS_VALUE;
           ^
ccextratorwin/myth.c:38:33: warning: overflow in implicit constant conversion [-Woverflow]
 #define AV_NOPTS_VALUE          (int64_t)(0x8000000000000000)
                                 ^
ccextratorwin/myth.c:434:11: note: in expansion of macro ‘AV_NOPTS_VALUE’
     dts = AV_NOPTS_VALUE;
           ^
ccextratorwin/myth.c: In function ‘ProcessVBIDataPacket’:
ccextratorwin/myth.c:559:20: warning: overflow in implicit constant conversion [-Woverflow]
         linemask = 0xffffffffffffffff;
                    ^
ccextratorwin/myth.c: In function ‘mpegps_read_packet’:
ccextratorwin/myth.c:724:1: warning: label ‘found’ defined but not used [-Wunused-label]
 found:
 ^
mv -f ccextratorwin/.deps/comskip-myth.Tpo ccextratorwin/.deps/comskip-myth.Po
mv -f .deps/comskip-mpeg2dec.Tpo .deps/comskip-mpeg2dec.Po
mv -f ccextratorwin/.deps/comskip-general_loop.Tpo ccextratorwin/.deps/comskip-general_loop.Po
mv -f .deps/comskip-comskip.Tpo .deps/comskip-comskip.Po
gcc -g -O2    -o comskip comskip-comskip.o comskip-mpeg2dec.o comskip-platform.o comskip-video_out_dx.o ccextratorwin/comskip-608.o ccextratorwin/comskip-ccextractor.o ccextratorwin/comskip-encoding.o ccextratorwin/comskip-general_loop.o ccextratorwin/comskip-myth.o -largtable2  -L/usr/local/lib -L/home/osmc/ffmpeg_build/lib -L/usr/local/lib -L/home/osmc/ffmpeg_build/lib -L/usr/local/lib -lavformat -ldl -lass -lm -lharfbuzz -lfontconfig -lexpat -lfreetype -lexpat -lenca -lm -lfribidi -lfreetype -lz -lpng12 -lvdpau -lX11 -lva -lva-x11 -lX11 -lva -lva-drm -lva -lxcb -lXau -lXdmcp -lxcb-shm -lxcb -lXau -lXdmcp -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lXau -lXdmcp -lxcb-shape -lxcb -lXau -lXdmcp -lasound -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lx265 -lstdc++ -lm -lrt -ldl -lx264 -lpthread -lm -ldl -lvpx -lm -lpthread -lvpx -lm -lpthread -lvpx -lm -lpthread -lvpx -lm -lpthread -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lopus -lm -lopus -lm -lmp3lame -lfreetype -lz -lpng12 -lfdk-aac -lm -lass -lm -lharfbuzz -lfontconfig -lexpat -lfreetype -lexpat -lenca -lm -lfribidi -lfreetype -lz -lpng12 -lm -lz -pthread -lavcodec -ldl -lass -lm -lharfbuzz -lfontconfig -lexpat -lfreetype -lexpat -lenca -lm -lfribidi -lfreetype -lz -lpng12 -lvdpau -lX11 -lva -lva-x11 -lX11 -lva -lva-drm -lva -lxcb -lXau -lXdmcp -lxcb-shm -lxcb -lXau -lXdmcp -lxcb-xfixes -lxcb-render -lxcb-shape -lxcb -lXau -lXdmcp -lxcb-shape -lxcb -lXau -lXdmcp -lasound -lmmal_core -lmmal_util -lmmal_vc_client -lbcm_host -lx265 -lstdc++ -lm -lrt -ldl -lx264 -lpthread -lm -ldl -lvpx -lm -lpthread -lvpx -lm -lpthread -lvpx -lm -lpthread -lvpx -lm -lpthread -lvorbisenc -lvorbis -logg -ltheoraenc -ltheoradec -logg -lopus -lm -lopus -lm -lmp3lame -lfreetype -lz -lpng12 -lfdk-aac -lm -lass -lm -lharfbuzz -lfontconfig -lexpat -lfreetype -lexpat -lenca -lm -lfribidi -lfreetype -lz -lpng12 -lm -lz -pthread -lswresample -lm -lavutil -lm   -lpthread -lm 
/usr/bin/ld: cannot find -lmmal_core
/usr/bin/ld: cannot find -lmmal_util
/usr/bin/ld: cannot find -lmmal_vc_client
/usr/bin/ld: cannot find -lbcm_host
/usr/bin/ld: cannot find -lx265
collect2: error: ld returned 1 exit status
Makefile:423: recipe for target 'comskip' failed
make: *** [comskip] Error 1

In one final attempt of dismay I restarted the whole process all over again, but this time when building the h.256 encoder, I replaced every instance of “-mcpu=native” with “-mcpu=arm1176jzf-s” and “-march=native” with “-march=armv6”. This sets the build to a more general raspi ARM build as opposed to my first attempt which was tailored exactly for the raspi3 architecture. That seemed to fixed the make problem once again and all else went well with building and installing ffmpeg (i.e. successful build with no errors). But to my great dismay, tis more general method still led to the same make error with comskip.

Although I am still a novice with ‘make’, I am fairly competent with linux (my day job is a scientist working exclusively with Cent OS), but I cannot seem to figure out this build process. I am beginning to wonder if anyone else has succesfully followed these instructions on a raspi 3?

Any help or direction is much appreciated.

1 Like