Recherche avancée

Médias (91)

Autres articles (88)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

Sur d’autres sites (7568)

  • 10 Key Google Analytics Limitations You Should Be Aware Of

    9 mai 2022, par Erin

    Google Analytics (GA) is the biggest player in the web analytics space. But is it as “universal” as its brand name suggests ?

    Over the years users have pointed out a number of major Google Analytics limitations. Many of these are even more visible in Google Analytics 4. 

    Introduced in 2020, Google Analytics 4 (GA4) has been sceptically received. As the sunset date of 1st, July 2023 for the current version, Google Universal Analytics (UA), approaches, the dismay grows stronger.

    To the point where people are pleading with others to intervene : 

    GA4 Elon Musk Tweet
    Source : Chris Tweten via Twitter

    Main limitations of Google Analytics

    Google Analytics 4 is advertised as a more privacy-centred, comprehensive and “intelligent” web analytics platform. 

    According to Google, the newest version touts : 

    • Machine learning at its core provides better segmentation and fast-track access to granular insights 
    • Privacy-by-design controls, addressing restrictions on cookies and new regulatory demands 
    • More complete understanding of customer journeys across channels and devices 

    Some of these claims hold true. Others crumble upon a deeper investigation. Newly advertised Google Analytics capabilities such as ‘custom events’, ‘predictive insights’ and ‘privacy consent mode’ only have marginal improvements. 

    Complex setup, poor UI and lack of support with migration also leave many other users frustrated with GA4. 

    Let’s unpack all the current (and legacy) limitations of Google Analytics you should account for. 

    1. No Historical Data Imports 

    Google rushed users to migrate from Universal Analytics to Google Analytics 4. But they overlooked one important precondition — backwards compatibility. 

    You have no way to import data from Google Universal Analytics to Google Analytics 4. 

    Historical records are essential for analysing growth trends and creating benchmarks for new marketing campaigns. Effectively, you are cut short from past insights — and forced to start strategising from scratch. 

    At present, Google offers two feeble solutions : 

    • Run data collection in parallel and have separate reporting for GA4 and UA until the latter is shut down. Then your UA records are gone. 
    • For Ecommerce data, manually duplicate events from UA at a new GA4 property while trying to figure out the new event names and parameters. 

    Google’s new data collection model is the reason for migration difficulties. 

    In Google Analytics 4, all analytics hits types — page hits, social hits, app/screen view, etc. — are recorded as events. Respectively, the “‘event’ parameter in GA4 is different from one in Google Universal Analytics as the company explains : 

    GA4 vs Universal Analytics event parameters
    Source : Google

    This change makes migration tedious — and Google offers little assistance with proper events and custom dimensions set up. 

    2. Data Collection Limits 

    If you’ve wrapped your head around new GA4 events, congrats ! You did a great job, but the hassle isn’t over. 

    You still need to pay attention to new Google Analytics limits on data collection for event parameters and user properties. 

    GA4 Event limits
    Source : Google

    These apply to :

    • Automatically collected events
    • Enhanced measurement events
    • Recommended events 
    • Custom events 

    When it comes to custom events, GA4 also has a limit of 25 custom parameters per event. Even though it seems a lot, it may not be enough for bigger websites. 

    You can get higher limits by upgrading to Google Analytics 360, but the costs are steep. 

    3. Limited GDPR Compliance 

    Google Analytics has a complex history with European GDPR compliance

    A 2020 ruling by the Court of Justice of the European Union (CJEU) invalidated the Privacy Shield framework Google leaned upon. This framework allowed the company to regulate EU-US data transfers of sensitive user data. 

    But after this loophole was closed, Google faced a heavy series of privacy-related fines :

    • French data protection authority, CNIL, ruled that  “the transfers to the US of personal data collected through Google Analytics are illegal” — and proceeded to fine Google for a record-setting €150 million at the beginning of 2022. 
    • Austrian regulators also deemed Google in breach of GDPR requirements and also branded the analytics as illegal. 

    Other EU-member states might soon proceed with similar rulings. These, in turn, can directly affect Google Analytics users, whose businesses could face brand damage and regulatory fines for non-compliance. In fact, companies cannot select where the collected analytics data will be stored — on European servers or abroad — nor can they obtain this information from Google.

    Getting a web analytics platform that allows you to keep data on your own servers or select specific Cloud locations is a great alternative. 

    Google also has been lax with its cookie consent policy and doesn’t properly inform consumers about data collection, storage or subsequent usage. Google Analytics 4 addresses this issue to an extent. 

    By default, GA4 relies on first-party cookies, instead of third-party ones — which is a step forward. But the user privacy controls are hard to configure without losing most of the GA4 functionality. Implementing user consent mode to different types of data collection also requires a heavy setup. 

    4. Strong Reliance on Sampled Data 

    To compensate for ditching third-party cookies, GA4 more heavily leans on sampled data and machine learning to fill the gaps in reporting. 

    In GA4 sampling automatically applies when you :

    • Perform advanced analysis such as cohort analysis, exploration, segment overlap or funnel analysis with not enough data 
    • Have over 10,000,000 data rows and generate any type of non-default report 

    Google also notes that data sampling can occur at lower thresholds when you are trying to get granular insights. If there’s not enough data or because Google thinks it’s too complex to retrieve. 

    In their words :

    Source : Google

    Data sampling adds “guesswork” to your reports, meaning you can’t be 100% sure of data accuracy. The divergence from actual data depends on the size and quality of sampled data. Again, this isn’t something you can control. 

    Unlike Google Analytics 4, Matomo applies no data sampling. Your reports are always accurate and fully representative of actual user behaviours. 

    5. No Proper Data Anonymization 

    Data anonymization allows you to collect basic analytics about users — visits, clicks, page views — but without personally identifiable information (or PII) such as geo-location, assigns tracking ID or other cookie-based data. 

    This reduced your ability to :

    • Remarket 
    • Identify repeating visitors
    • Do advanced conversion attribution 

    But you still get basic data from users who ignored or declined consent to data collection. 

    By default, Google Analytics 4 anonymizes all user IP addresses — an upgrade from UA. However, it still assigned a unique user ID to each user. These count as personal data under GDPR. 

    For comparison, Matomo provides more advanced privacy controls. You can anonymize :

    • Previously tracked raw data 
    • Visitor IP addresses
    • Geo-location information
    • User IDs 

    This can ensure compliance, especially if you operate in a sensitive industry — and delight privacy-mindful users ! 

    6. No Roll-Up Reporting

    Getting a bird’s-eye view of all your data is helpful when you need hotkey access to main sites — global traffic volume, user count or percentage of returning visitors.

    With Roll-Up Reporting, you can see global-performance metrics for multiple localised properties (.co.nz, .co.uk, .com, etc,) in one screen. Then zoom in on specific localised sites when you need to. 

    7. Report Processing Latency 

    The average data processing latency is 24-48 hours with Google Analytics. 

    Accounts with over 200,000 daily sessions get data refreshes only once a day. So you won’t be seeing the latest data on core metrics. This can be a bummer during one-day promo events like Black Friday or Cyber Monday when real-time information can prove to be game-changing ! 

    Matomo processes data with lower latency even for high-traffic websites. Currently, we have 6-24 hour latency for cloud deployments. On-premises web analytics can be refreshed even faster — within an hour or instantly, depending on the traffic volumes. 

    8. No Native Conversion Optimisation Features

    Google Analytics users have to use third-party tools to get deeper insights like how people are interacting with your webpage or call-to-action.

    You can use the free Google Optimize tool, but it comes with limits : 

    • No segmentation is available 
    • Only 10 simultaneous running experiments allowed 

    There isn’t a native integration between Google Optimize and Google Analytics 4. Instead, you have to manually link an Optimize Container to an analytics account. Also, you can’t select experiment dimensions in Google Analytics reports.

    What’s more, Google Optimize is a basic CRO tool, best suited for split testing (A/B testing) of copy, visuals, URLs and page layouts. If you want to get more advanced data, you need to pay for extra tools. 

    Matomo comes with a native set of built-in conversion optimization features : 

    • Heatmaps 
    • User session recording 
    • Sales funnel analysis 
    • A/B testing 
    • Form submission analytics 
    A/B test hypothesis testing on Matomo
    A/B test hypothesis testing on Matomo

    9. Deprecated Annotations

    Annotations come in handy when you need to provide extra context to other team members. For example, point out unusual traffic spikes or highlight a leak in the sales funnel. 

    This feature was available in Universal Analytics but is now gone in Google Analytics 4. But you can still quickly capture, comment and share knowledge with your team in Matomo. 

    You can add annotations to any graph that shows statistics over time including visitor reports, funnel analysis charts or running A/B tests. 

    10. No White Label Option 

    This might be a minor limitation of Google Analytics, but a tangible one for agency owners. 

    Offering an on-brand, embedded web analytics platform can elevate your customer experience. But white label analytics were never a thing with Google Analytics, unlike Matomo. 

    Wrap Up 

    Google set a high bar for web analytics. But Google Analytics inherent limitations around privacy, reporting and deployment options prompt more users to consider Google Analytics alternatives, like Matomo. 

    With Matomo, you can easily migrate your historical data records and store customer data locally or in a designated cloud location. We operate by a 100% unsampled data principle and provide an array of privacy controls for advanced compliance. 

    Start your 21-day free trial (no credit card required) to see how Matomo compares to Google Analytics ! 

  • Android-FFmpeg adding subtitle to mp4 video does not work

    7 septembre 2022, par ebdaa app

    I am trying to add srt file to a mp4 video using android mobile-ffmpeg , the code works with no error but the generated video does not contain the subtitle

    


    here is the code :

    


     String cmd = "-i " + videoPath + " -vf subtitles=\"" + subtitlePath + ":force_style='Alignment=10,Fontsize=18'\" " + OutputVideoPath;
 FFmpeg.executeAsync(cmd, new ExecuteCallback() {
    @Override
    public void apply(final long executionId, final int returnCode) {
         if (returnCode == RETURN_CODE_SUCCESS) {
         } else {
             
         }
    }
 });


    


    here are the logs

    


    I/mobile-ffmpeg: ffmpeg version v4.4-dev-416
     Copyright (c) 2000-2020 the FFmpeg developers
I/mobile-ffmpeg:   built with Android (6454773 based on r365631c2) clang version 9.0.8 (https://android.googlesource.com/toolchain/llvm-project 98c855489587874b2a325e7a516b99d838599c6f) (based on LLVM 9.0.8svn)
      configuration: --cross-prefix=arm-linux-androideabi- --sysroot=/files/android-sdk/ndk/21.3.6528147/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm/neon/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=armv7-a --cpu=armv7-a --cc=armv7a-linux-androideabi24-clang --cxx=armv7a-linux-androideabi24-clang++ --extra-libs='-L/home/taner/Projects/mobile-ffmpeg/prebuilt/android-arm/neon/cpu-features/lib -lndk_compat' --target-os=android --enable-neon --enable-asm --enable-inline-asm --build-suffix=_neon --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --enable-shared --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-openssl --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libwavpack --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libaom --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-zlib --enable-mediacodec
I/mobile-ffmpeg:   libavutil      56. 55.100 / 56. 55.100
      libavcodec     58. 96.100 / 58. 96.100
I/mobile-ffmpeg:   libavformat    58. 48.100 / 58. 48.100
      libavdevice    58. 11.101 / 58. 11.101
      libavfilter     7. 87.100 /  7. 87.100
      libswscale      5.  8.100 /  5.  8.100
I/mobile-ffmpeg:   libswresample   3.  8.100 /  3.  8.100
I/mobile-ffmpeg: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001.mp4':
      Metadata:
        major_brand     : 
I/mobile-ffmpeg: isom
        minor_version   : 
I/mobile-ffmpeg: 512
        compatible_brands: 
I/mobile-ffmpeg: isomiso2mp41
I/mobile-ffmpeg:     encoder         : 
    Lavf58.48.100
I/mobile-ffmpeg:   Duration: 
    00:00:29.60
    , start: 
I/mobile-ffmpeg: 0.000000
    , bitrate: 
    466 kb/s
I/mobile-ffmpeg:     Stream #0:0
    (und)
I/mobile-ffmpeg: : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:2 DAR 2:3], 336 kb/s
    , 
    5 fps, 
I/mobile-ffmpeg: 5 tbr, 
    10240 tbn, 
    5 tbc
I/mobile-ffmpeg:  (default)
I/mobile-ffmpeg:     Metadata:
          handler_name    : 
    VideoHandler
I/mobile-ffmpeg:     Stream #0:1
I/mobile-ffmpeg: (und)
    : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
     (default)
I/mobile-ffmpeg:     Metadata:
I/mobile-ffmpeg:       handler_name    : 
    SoundHandler
W/mobile-ffmpeg: Codec AVOption preset (Configuration preset) specified for output file #0 (/storage/emulated/0/Download/QuranYaser/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001_sub.mp4) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
I/mobile-ffmpeg: Stream mapping:
I/mobile-ffmpeg:   Stream #0:0 -> #0:0
I/mobile-ffmpeg:  (mpeg4 (native) -> mpeg4 (native))
I/mobile-ffmpeg:   Stream #0:1 -> #0:1
     (aac (native) -> aac (native))
I/mobile-ffmpeg: Press [q] to stop, [?] for help
    frame=    0 fps=0.0 q=0.0 size=       0kB time=-577014:32:22.77 bitrate=  -0.0kbits/s speed=N/A    
I/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] Shaper: FriBidi 1.0.9 (SIMPLE)
I/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] 
W/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] No usable fontconfig configuration file found, using fallback.
    [Parsed_subtitles_0 @ 0xf35ee820] 
I/mobile-ffmpeg: [Parsed_subtitles_0 @ 0xf35ee820] Using font provider fontconfig
    [Parsed_subtitles_0 @ 0xf35ee820] 
W/mobile-ffmpeg: [graph 0 input from stream 0:0 @ 0xf35ee880] sws_param option is deprecated and ignored
I/mobile-ffmpeg: Output #0, mp4, to '/storage/emulated/0/Download/QuranYaser/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001_sub.mp4':
I/mobile-ffmpeg:   Metadata:
        major_brand     : 
    isom
I/mobile-ffmpeg:     minor_version   : 
    512
I/mobile-ffmpeg:     compatible_brands: 
I/mobile-ffmpeg: isomiso2mp41
        encoder         : 
I/mobile-ffmpeg: Lavf58.48.100
        Stream #0:0
I/mobile-ffmpeg: (und)
    : Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 640x480 [SAR 1:2 DAR 2:3], q=2-31, 200 kb/s
    , 
I/mobile-ffmpeg: 5 fps, 
I/mobile-ffmpeg: 10240 tbn, 
    5 tbc
I/mobile-ffmpeg:  (default)
        Metadata:
I/mobile-ffmpeg:       handler_name    : 
    VideoHandler
          encoder         : 
I/mobile-ffmpeg: Lavc58.96.100 mpeg4
        Side data:
I/mobile-ffmpeg:       
    cpb: 
    bitrate max/min/avg: 0/0/200000 buffer size: 0 
    vbv_delay: N/A
I/mobile-ffmpeg:     Stream #0:1
    (und)
I/mobile-ffmpeg: : Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s
     (default)
        Metadata:
I/mobile-ffmpeg:       handler_name    : 
    SoundHandler
I/mobile-ffmpeg:       encoder         : 
    Lavc58.96.100 aac
I/mobile-ffmpeg: frame=   11 fps=0.0 q=2.0 size=       0kB time=00:00:03.59 bitrate=   0.1kbits/s speed=7.16x    
I/mobile-ffmpeg: frame=   30 fps= 30 q=2.0 size=     256kB time=00:00:07.47 bitrate= 280.5kbits/s speed=7.44x    
I/mobile-ffmpeg: frame=   50 fps= 33 q=2.0 size=     512kB time=00:00:11.54 bitrate= 363.5kbits/s speed=7.67x    
I/mobile-ffmpeg: frame=   71 fps= 35 q=2.0 size=     768kB time=00:00:15.71 bitrate= 400.2kbits/s speed=7.83x    
I/mobile-ffmpeg: frame=   92 fps= 37 q=2.0 size=    1024kB time=00:00:19.78 bitrate= 424.0kbits/s speed=7.88x    
I/mobile-ffmpeg: frame=  110 fps= 36 q=2.0 size=    1280kB time=00:00:23.38 bitrate= 448.5kbits/s speed=7.75x    
I/mobile-ffmpeg: frame=  128 fps= 36 q=2.0 size=    1280kB time=00:00:27.12 bitrate= 386.6kbits/s speed=7.71x    
I/mobile-ffmpeg: frame=  148 fps= 38 q=8.4 Lsize=    1697kB time=00:00:29.40 bitrate= 472.9kbits/s speed=7.56x    
    video:1225kB audio:462kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 
I/mobile-ffmpeg: 0.559634%
I/mobile-ffmpeg: [aac @ 0xbe48c800] Qavg: 163.999


    


    here is a sample of srt file I am trying to merge :

    


    1
00:00:00,000 --> 00:00:03,326
 Text 1

2
00:00:03,326 --> 00:00:09,962
 Text 2

3
00:00:09,962 --> 00:00:16,160
 Text 3

4
00:00:16,160 --> 00:00:22,223
 Text 4


    


    any idea why the generated video does not contain the subtitle ?

    


    Update

    


    Based on below comment , I changed my code to use the latest ffmpeg-kit version , here is the new code

    


    String cmd = "-i " + videoPath + " -vf subtitles=\"" + subtitlePAth + ":force_style='Alignment=10,Fontsize=18\" " + 
   outputVideoPath;

   FFmpegKit.executeAsync(cmd, new FFmpegSessionCompleteCallback() {

        @Override
        public void apply(FFmpegSession session) {

        }
    }, new LogCallback() {

        @Override
        public void apply(com.arthenica.ffmpegkit.Log log) {


        }
    }, new StatisticsCallback() {

        @Override
        public void apply(Statistics statistics) {              

        }
    });`


    


    and here is the updated log

    


      ffmpeg version v4.5-dev-3393-g30322ebe3c Copyright (c) 2000-2021 the FFmpeg developers
    built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
    configuration: --cross-prefix=arm-linux-androideabi- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/storage/light/projects/ffmpeg-kit/prebuilt/android-arm-neon/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=armv7-a --cpu=armv7-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --build-suffix=_neon --ar=arm-linux-androideabi-ar --cc=armv7a-linux-androideabi24-clang --cxx=armv7a-linux-androideabi24-clang++ --ranlib=arm-linux-androideabi-ranlib --strip=arm-linux-androideabi-strip --nm=arm-linux-androideabi-nm --extra-libs='-L/storage/light/projects/ffmpeg-kit/prebuilt/android-arm-neon/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-compile --enable-pic --enable-jni --enable-optimizations --enable-swscale --disable-static --enable-shared --enable-pthreads --enable-v4l2-m2m --disable-outdev=fbdev --disable-indev=fbdev --enable-small --disable-xmm-clobber-test --disable-debug --enable-lto --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-videotoolbox --disable-audiotoolbox --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-gmp --enable-gnutls --enable-libmp3lame --enable-libass --enable-iconv --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libxml2 --enable-libopencore-amrnb --enable-libshine --enable-libspeex --enable-libdav1d --enable-libkvazaar --enable-libilbc --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libtwolame --disable-sdl2 --enable-libvo-amrwbenc --enable-libzimg --disable-openssl --enable-zlib --enable-mediacodec
    libavutil      57. 13.100 / 57. 13.100
    libavcodec     59. 15.102 / 59. 15.102
    libavformat    59. 10.100 / 59. 10.100
    libavdevice    59.  1.100 / 59.  1.100
    libavfilter     8. 21.100 /  8. 21.100
    libswscale      6.  1.102 /  6.  1.102
    libswresample   4.  0.100 /  4.  0.100
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Download/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2mp41
      encoder         : Lavf59.10.100
    Duration: 00:00:29.60, start: 0.000000, bitrate: 467 kb/s
    Stream #0:0[0x1](und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, bt470bg/bt709/bt709), 640x480 [SAR 1:2 DAR 2:3], 336 kb/s, 5 fps, 5 tbr, 10240 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
    Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  [mpeg4 @ 0xbacc1080] The "sub_text_format" option is deprecated: Deprecated, does nothing
  [aac @ 0xbacc1400] The "sub_text_format" option is deprecated: Deprecated, does nothing
  Stream mapping:
    Stream #0:0 -> #0:0 (mpeg4 (native) -> mpeg4 (native))
    Stream #0:1 -> #0:1 (aac (native) -> aac (native))
  Press [q] to stop, [?] for help
  [Parsed_subtitles_0 @ 0xf35141e0] libass API version: 0x1502000[Parsed_subtitles_0 @ 0xf35141e0] 
  [Parsed_subtitles_0 @ 0xf35141e0] libass source: commit: 0.15.2-0-gc967a5a3d9ec0d36af1148b3fdf2f307a21dd122[Parsed_subtitles_0 @ 0xf35141e0] 
  [Parsed_subtitles_0 @ 0xf35141e0] Shaper: FriBidi 1.0.11 (SIMPLE) HarfBuzz-ng 3.2.0 (COMPLEX)[Parsed_subtitles_0 @ 0xf35141e0] 
  [Parsed_subtitles_0 @ 0xf35141e0] No usable fontconfig configuration file found, using fallback.[Parsed_subtitles_0 @ 0xf35141e0] 
  [Parsed_subtitles_0 @ 0xf35141e0] Using font provider fontconfig[Parsed_subtitles_0 @ 0xf35141e0] 
  [Parsed_subtitles_0 @ 0xf35141e0] fontselect: failed to find any fallback with glyph 0x0 for font: (Arial, 400, 0)[Parsed_subtitles_0 @ 0xf35141e0] 
  Output #0, mp4, to '/storage/emulated/0/Download/7b85de4d-6af2-4eea-be9d-0d13c7f7819f/001001_sub5.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2mp41
      encoder         : Lavf59.10.100
    Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p(tv, bt470bg/bt709/bt709, progressive), 640x480 [SAR 1:2 DAR 2:3], q=2-31, 200 kb/s, 5 fps, 10240 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc59.15.102 mpeg4
      Side data:
        cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc59.15.102 aac
  frame=    1 fps=0.0 q=5.7 size=       0kB time=00:00:01.55 bitrate=   0.2kbits/s speed= 2.4x    
  frame=   10 fps=8.7 q=2.0 size=       0kB time=00:00:03.50 bitrate=   0.1kbits/s speed=3.04x    
  frame=   20 fps= 12 q=2.0 size=       0kB time=00:00:05.36 bitrate=   0.1kbits/s speed=3.24x    
  frame=   32 fps= 15 q=2.0 size=     256kB time=00:00:07.87 bitrate= 266.5kbits/s speed=3.65x    
  frame=   45 fps= 17 q=2.0 size=     256kB time=00:00:10.49 bitrate= 199.8kbits/s speed=3.95x    
  frame=   58 fps= 18 q=2.0 size=     512kB time=00:00:12.97 bitrate= 323.2kbits/s speed=4.11x    
  frame=   69 fps= 19 q=2.0 size=     768kB time=00:00:15.23 bitrate= 413.1kbits/s speed=4.16x    
  frame=   81 fps= 19 q=2.0 size=     768kB time=00:00:17.60 bitrate= 357.5kbits/s speed=4.23x    
  frame=   92 fps= 20 q=2.0 size=    1024kB time=00:00:19.85 bitrate= 422.6kbits/s speed=4.26x    
  frame=  102 fps= 20 q=2.0 size=    1024kB time=00:00:21.89 bitrate= 383.1kbits/s speed=4.24x    
  frame=  115 fps= 20 q=2.0 size=    1280kB time=00:00:24.40 bitrate= 429.7kbits/s speed=4.31x    
  frame=  126 fps= 20 q=2.0 size=    1280kB time=00:00:26.67 bitrate= 393.0kbits/s speed=4.32x    
  frame=  139 fps= 21 q=2.0 size=    1536kB time=00:00:29.28 bitrate= 429.8kbits/s speed=4.39x    
  frame=  148 fps= 22 q=8.4 Lsize=    1701kB time=00:00:29.40 bitrate= 473.9kbits/s speed=4.34x    
  video:1225kB audio:466kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.561835%
  [aac @ 0xbacc2200] Qavg: 482.514


    


  • opencv does not find ffmpeg functions during compilation (make)

    17 avril 2022, par titicplusplus

    I am currently trying to compile OpenCV with CUDA.
So I downloaded opencv 4.5.5 and opencv_contrib and followed this tutorial : https://gist.github.com/raulqf/f42c718a658cddc16f9df07ecc627be7

    


    cd opencv-4.5.5/
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=ON \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D WITH_CUDA=ON \
-D BUILD_opencv_cudacodec=OFF \
-D WITH_CUDNN=OFF \
-D OPENCV_DNN_CUDA=OFF \
-D CUDA_ARCH_BIN=7.5 \
-D WITH_V4L=ON \
-D WITH_QT=ON \
-D WITH_OPENGL=ON \
-D WITH_GSTREAMER=ON \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D OPENCV_PC_FILE_NAME=opencv.pc \
-D OPENCV_ENABLE_NONFREE=ON \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D INSTALL_C_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-4.5.5/modules ../


    


    The cmake command generated these lines :

    


    -- General configuration for OpenCV 4.5.5 =====================================
--   Version control:               unknown
-- 
--   Extra modules:
--     Location (extra):            /mnt/704E048C4E044D72/build/opencv/opencv_contrib-4.5.5/modules
--     Version control (extra):     unknown
-- 
--   Platform:
--     Timestamp:                   2022-04-17T16:01:44Z
--     Host:                        Linux 5.4.0-107-lowlatency x86_64
--     CMake:                       3.16.3
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/make
--     Configuration:               RELEASE
-- 
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (18 files):         + SSSE3 SSE4_1
--       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (5 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (33 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                /usr/bin/c++  (ver 8.4.0)
--     C++ flags (Release):         -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/cc
--     C flags (Release):           -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed  
--     Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed  
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          m pthread cudart_static dl rt nppc nppial nppicc nppicom nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/lib/x86_64-linux-gnu
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 alphamat aruco barcode bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev cvv datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python2 python3 quality rapid reg rgbd saliency sfm shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    cudacodec world
--     Disabled by dependency:      -
--     Unavailable:                 java julia matlab ovis viz
--     Applications:                tests perf_tests apps
--     Documentation:               NO
--     Non-free algorithms:         YES
-- 
--   GUI:                           QT5
--     QT:                          YES (ver 5.12.8 )
--       QT OpenGL support:         YES (Qt5::OpenGL 5.12.8)
--     GTK+:                        YES (ver 3.24.20)
--       GThread :                  YES (ver 2.64.6)
--       GtkGlExt:                  NO
--     OpenGL support:              YES (/usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so)
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.11)
--     JPEG:                        /usr/lib/x86_64-linux-gnu/libjpeg.so (ver 80)
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.6.37)
--     TIFF:                        /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 / 4.1.0)
--     JPEG 2000:                   build (ver 2.4.0)
--     OpenEXR:                     /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 2_3)
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
-- 
--   Video I/O:
--     DC1394:                      YES (2.2.5)
--     FFMPEG:                      YES
--       avcodec:                   YES (58.54.100)
--       avformat:                  YES (58.29.100)
--       avutil:                    YES (56.31.100)
--       swscale:                   YES (5.5.100)
--       avresample:                YES (4.0.0)
--     GStreamer:                   YES (1.16.2)
--     v4l/v4l2:                    YES (linux/videodev2.h)
-- 
--   Parallel framework:            TBB (ver 2020.1 interface 11101)
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Intel IPP:                   2020.0.0 Gold [2020.0.0]
--            at:                   /mnt/704E048C4E044D72/build/opencv/opencv-4.5.5/build/3rdparty/ippicv/ippicv_lnx/icv
--     Intel IPP IW:                sources (2020.0.0)
--               at:                /mnt/704E048C4E044D72/build/opencv/opencv-4.5.5/build/3rdparty/ippicv/ippicv_lnx/iw
--     VA:                          NO
--     Lapack:                      NO
--     Eigen:                       YES (ver 3.3.7)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
-- 
--   NVIDIA CUDA:                   YES (ver 10.1, CUFFT CUBLAS FAST_MATH)
--     NVIDIA GPU arch:             75
--     NVIDIA PTX archs:
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /mnt/704E048C4E044D72/build/opencv/opencv-4.5.5/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python 2:
--     Interpreter:                 /usr/bin/python2.7 (ver 2.7.18)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.18)
--     numpy:                       /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.16.5)
--     install path:                lib/python2.7/dist-packages/cv2/python-2.7
-- 
--   Python 3:
--     Interpreter:                 /usr/bin/python3 (ver 3.8.10)
--     Libraries:                   /usr/lib/x86_64-linux-gnu/libpython3.8.so (ver 3.8.10)
--     numpy:                       /home/famillevincent/.local/lib/python3.8/site-packages/numpy/core/include (ver 1.22.3)
--     install path:                lib/python3.8/site-packages/cv2/python-3.8
-- 
--   Python (for build):            /usr/bin/python2.7
-- 
--   Java:                          
--     ant:                         NO
--     JNI:                         /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Install to:                    /usr/local
-- -----------------------------------------------------------------
-- 
-- Configuring done
-- Generating done


    


    CMake have detected ffmpeg libraries, but when I run make -j8. I have this error :

    


    [ 39%] Building CXX object apps/interactive-calibration/CMakeFiles/opencv_interactive-calibration.dir/calibPipeline.cpp.o
Scanning dependencies of target opencv_cudafilters
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwframe_transfer_data »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « avcodec_get_hw_config »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwdevice_get_hwframe_constraints »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « avcodec_send_packet »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwframe_get_buffer »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwdevice_ctx_create_derived »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwdevice_ctx_create »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_bsf_alloc »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_bsf_receive_packet »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_bsf_free »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « avcodec_send_frame »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « avcodec_parameters_copy »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_packet_free »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwdevice_find_type_by_name »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_bsf_init »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwframe_ctx_alloc »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « avcodec_receive_packet »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_codec_iterate »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwframe_ctx_init »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwdevice_get_type_name »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwframe_constraints_free »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « avcodec_receive_frame »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_bsf_get_by_name »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « avcodec_get_hw_frames_parameters »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_bsf_send_packet »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_hwframe_ctx_create_derived »
/usr/bin/ld : ../../lib/libopencv_videoio.so.4.5.5 : référence indéfinie vers « av_packet_alloc »
collect2: error: ld returned 1 exit status
make[2]: *** [apps/visualisation/CMakeFiles/opencv_visualisation.dir/build.make:92 : bin/opencv_visualisation] Erreur 1
make[1]: *** [CMakeFiles/Makefile2:11412 : apps/visualisation/CMakeFiles/opencv_visualisation.dir/all] Erreur 2
make[1]: *** Attente des tâches non terminées....
[ 39%] Building CXX object apps/interactive-calibration/CMakeFiles/opencv_interactive-calibration.dir/frameProcessor.cpp.o


    


    So what can I do to compile opencv with cuda and ffmpeg ?
    
Thank you in advance for your answers.

    


    I use Ubuntu 20.04 with g++8