Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (55)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (5664)

  • How to Choose a GDPR Compliant Web Analytics Solution

    2 mars 2022, par Matthieu Aubry — Privacy

    Since the launch of GDPR, one big question has lingered around with uncertainty – is Google Analytics GDPR compliant ? The current GDPR enforcement trend happening across the EU is certainly shedding some light on this question.

    Starting with the Austrian Data Protection Authority’s ruling on Google Analytics and more recently, CNIL (the French Data Protection Authority) has followed suit by also ruling Google Analytics illegal to use. Organisations with EU-based web visitors are now scrambling to find a compliant solution.

    The French Data Protection Authority (CNIL) has already started delivering formal notices to websites using Google Analytics, so now is the time to act. According to CNIL, organisations have two options :

    1. Ceasing use of the Google Analytics functionality (under the current conditions) 
    2. Use a compliant web analytics tool that does not transfer data outside the EU

    Getting started 

    For organisations considering migrating to a compliant web analytics tool, I’ve outlined below the things you need to consider when weighing up compliant web analytics tools. Once you’ve made a choice, I’ve also included a step-by-step guide to migrating away from Google Analytics. This guide is useful regardless of which GDPR compliant analytics provider you choose.

    Before getting started, I recommend that you document your findings against the following considerations while reviewing GDPR compliant Google Analytics alternatives. This document can then be shared with your Data Protection Officer (DPO) to get their final recommendation.

    10 key considerations when selecting a GDPR compliant web analytics tools

    Many tools will claim to be GDPR compliant so it’s important that you do your due diligence and review tools against the following considerations. 

    1. Where does the tool store data ? 

    The rulings in France and Austria were based on the fact that Google Analytics stores data in the US, which does not have an adequate level of data protection. Your safest option is to find a tool that legally stores data in the EU.

    You should be able to find out where the data is stored in the organisation’s privacy policy. Generally, data storage information can be found under sections titled “Subprocessors” and “Third-party services”. Check out the Matomo Privacy Policy as an example. 

    If you’re unable to easily find this information or it’s unclear, reach out to the organisation for more information.

    2. Does the tool offer anonymous tracking ?

    Anonymous tracking comes with many benefits, including :

    • The ability to track visitors without a cookie consent screen. Due to the privacy-respecting aspect of cookieless tracking, you don’t need to worry about the extra steps involved with compliant cookie banners.
    • More accurate data. When visitors deny tracking cookies, you lose out on valuable data. With anonymous tracking there is no data lost as you don’t need consent to track.
    • Simplified GDPR compliance. With this enabled, there are fewer steps you need to take to get GDPR compliant and stay GDPR compliant.

    For those reasons, it may be important for you to select a tool that offers anonymous tracking functionalities. The level of anonymous tracking you require will depend on your situation but you should look out for tools that allow you to :

    • Disable fingerprinting 
    • Disable user profiles 
    • Anonymise data
    • Cookieless tracking

    If you want to read more about data anonymization, check out this guide on data anonymization in web analytics.

    3. Does the tool integrate with my existing tech stack ?

    You’ll want to ensure that a new web analytics tool will play well with other tools in your tech stack including things like your CMS (content management system), eCommerce shop, etc. You should list out all the existing tools that currently integrate with your Google Analytics and check that the same integrations can be re-created with the new tool, via integrations or APIs.

    If not, it could become costly trying to connect your existing tech stack to a new solution.

    4. Does the tool offer the same features and insights you are currently using in Google Analytics ? Or more, if necessary ? 

    Just because you are moving to a new web analytics platform, doesn’t mean you have to give up the insights, reports and features you’ve grown accustomed to with Google Analytics. Ensuring that a new platform provides the same features and reports that you value the most will result in a smoother transition away from Google Analytics.

    It’s unlikely that a new tool will have all of the same features as Google Analytics, so I’d recommend listing out and prioritising your business-critical features and reports. 

    If I had to guess, you probably set up Google Analytics years ago because it was the default option. Now is your chance to make the most of this switch from Google Analytics and find a tool that offers additional reports and features that better aligns with your business. If time permits, I’d highly recommend that you consider other features or reports that you might have been missing out on while using Google Analytics.

    Check out this comparison of Google Analytics vs Matomo to see side-by-side feature comparison.

    5. Does the tool accept Google Analytics data imports ? 

    The historical data in Google Analytics is a critical asset for many businesses. Fortunately, some tools accept Google Analytics data imports so you don’t lose all of the data you’ve generated over time.

    However, it’s important to note that any data you import from Google Analytics to a new tool needs to be compliant data. I’ll cover this more below.

    6. Does the tool provide conversion tracking exports ? 

    Do you invest in paid advertising ? If you do, then tracking the conversions from people clicking on these paid ads is critical in assessing your return on investment. Since sending IP addresses or other personal information to the US is illegal under GDPR, we can only assume that this will also apply to advertising pixel/conversion tracking (e.g., Facebook pixel, Google Ads conversion tracking, etc). 

    As an example, Matomo offers conversion tracking exports so you can get a better understanding of ad performance while meeting privacy laws and without requiring consent from users. See how it works with Matomo’s conversion tracking exports

    7. How will you train up your in-house team ? Or can you hire a contractor ?

    This is a common concern of many, and rightfully so. You’ll want to confirm what resources are readily available so you can hit the ground running with your new web analytics tool. If you’d prefer to train up your in-house team, check the provider’s site for training resources, videos, guides, etc.

    If you’d rather hire an external contractor, we recommend heading to LinkedIn, reaching out to your community or asking the provider if they have any recommendations for contractors.

    In addition, check that the provider offers technical support or a forum, in case you have specific questions and need help.   

    8. Does the tool offer self-hosting ? (optional)

    For organisations that want full control over their data and storage location, an on-premise web analytics tool will be the preferred option. From a GDPR perspective, this is also the easiest option for compliance.

    Keep in mind that this requires resources, regular maintenance, technical knowledge and/or technical consultants. If you’re unsure which option is best for your organisation, check out our on-premise vs cloud web analytics comparison breakdown.

    Find out more about self-hosting Matomo.

    9. Is the tool approved by the CNIL for tracking without consent ?

    This is an important step for websites with French users. This step will help narrow down your selection of tools. The CNIL offers a programme to identify web analytics solutions that can be used without tracking consent. The CNIL’s list of recommended web analytics tools can act as your starting point for solutions to review.

    While this step is specific to sites with French users, it can also be helpful for websites with visitors from any other EU country.

    Benefits of consent-free tracking

    There are many benefits of tracking without consent.

    For one, it simplifies GDPR compliance and reduces the chances of GDPR breaches and fines. Cookie consent screens have recently been the target for EU Data Protection Authorities because many websites are unknowingly serving cookie consent screens that do not meet GDPR requirements. 

    Yet another benefit, and quite possibly the most important is more accurate data. Even if a website displays a user-friendly, lawful consent screen, the majority of users will either ignore or reject cookie consent. Legally website owners can’t track anything unless the visitor gives consent. So not having a cookie consent screen ensures that every visit is tracked and your web analytics data is 100% accurate

    Lastly, many visitors have grown fatigued and frustrated with invasive cookie consent screens. Not having one on your site creates a user-friendly experience, which will likely result in longer user sessions and lower bounce rates.

    10. Does the tool offer a Data Processing Agreement (DPA) ? 

    Technically, any GDPR compliant web analytics tool should offer a DPA but for the sake of completeness, I’ve added this as a consideration. Double check that any tools you are looking at provide this legally binding document. This should be located in the Privacy Policy of the web analytics provider, if not reach out to request it.

    As an example, here’s Matomo’s Data Processing Agreement which can be found in our Privacy Policy under Subprocessors. 

    That wraps up the key considerations. When it comes to compliance, privacy and customer data, Matomo leads the way. We are looking forward to helping you achieve GDPR compliance easily. Start your free 21-day trial of Matomo now – no credit card required.

    A step-by-step guide to migrating from Google Analytics

    Once you’ve identified a tool that suits your needs and your Data Protection Officer (DPO) has approved, you’re ready to get started. Here’s a simple step-by-step guide with all the important steps for you to follow :

    1. Before getting started, you should sign or download the Data Processing Agreement (DPA) offered by your new web analytics provider.

    2. Register for the new tool and configure it for compliance. The provider should offer guides on how to configure for GDPR compliance. This will include things like giving your users an easy way to opt-out of all tracking, turning on cookieless tracking or asking users for consent and anonymizing data and IP addresses, for instance.

    3. Inform your organisation about the change. Whether your colleagues use the tool or not, it’s important that you share information about the new tool with your staff. Let them know what the tool will be used for, who will use the tool and how it complies with GDPR. 

    4. Let your DPO know that you’ve removed Google Analytics and have implemented the new tool.

    5. Update your records of processing activities to include the new tool.

    6. Update your privacy policy. You’ll need to include details about the web analytics provider, where the data is stored, what data is being collected, how long the data will be stored and why the data is being collected. The web analytics tool should readily have this information for you.

    As an example, if you decide to use Matomo as your web analytics tool, we provide a Privacy Policy template for you to use on your site and a guide on how to complete your privacy policy under GDPR with Matomo. Note that these are only applicable if you are using Matomo.

    In addition, if the tool has an opt-out feature, you will also need to put the opt-out into the privacy policy (e.g., when using cookieless tracking).

    7. Now, the exciting part. Add the tracking code to your site by following the steps provided by the web analytics tool. 

    If you’re not comfortable with this step, the provider should offer steps to do this and you can share this with your web developer.

    8. Once added, login to your tool and check to see if traffic is being tracked.

    9. If your tool does not offer Google Analytics data imports or you do not need the historical data in your new tool, go to step 11. 

    To plan for your Google Analytics data migration, you’ll first need to establish what historical data is compliant with GDPR.

    For example, you shouldn’t import any data stored beyond the retention period established in your Privacy Policy or any personally identifiable information (PII) like IP addresses that aren’t anonymised. Discuss this further with your DPO.

    10. Once you’ve established what data you can legally import, then you can begin the import. Follow the steps provided by your new web analytics solution provider.

    11. Remove Google Analytics tracking code from your site. This will stop the collection of your visitors data by Google as well as slightly increase the page load speed.

    If you still haven’t made a choice yet, try Matomo free for 21-days and see why over 1 million websites choose Matomo. 

  • 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


    


  • what is wrong about the I420 render from ffmpeg ?

    9 mai 2022, par DLKUN

    I use glfw render YUV from ffmpeg ;the Y is ok(only use data Y ,and frag texture2D Y is ok ,the color is Grayscale).but when I add U,V ;the display show pink and green ; I try to change frag shader or the imgtexture ,there have no use .

    


    #include <glad></glad>glad.h>&#xA;#include <glfw></glfw>glfw3.h>&#xA;&#xA;#include<string>&#xA;#include<fstream>&#xA;#include<sstream>&#xA;#include<iostream>&#xA;#include&#xA;&#xA;#include &#xA;&#xA;// settings&#xA;const unsigned int SCR_WIDTH = 544;&#xA;const unsigned int SCR_HEIGHT = 960;&#xA;const int len = 544 * 960 * 3/2;&#xA;BYTE YUVdata [len];//&#xA;BYTE Ydata [544 * 960];//&#xA;BYTE Udata [272 * 480];//&#xA;BYTE Vdata [272 * 480];//&#xA;unsigned int VBO = 0;&#xA;unsigned int VAO = 0;&#xA;unsigned int EBO = 0;&#xA;unsigned int texturePIC = 0;&#xA;int shaderProgram = 0;&#xA;&#xA;GLuint texIndexarray[3];&#xA;GLuint texUniformY = 99;&#xA;GLuint texUniformU = 99;&#xA;GLuint texUniformV = 99;&#xA;&#xA;void LoadPicture()&#xA;{&#xA;&#xA;&#xA;    glGenTextures(3, texIndexarray);&#xA;&#xA;    glBindTexture(GL_TEXTURE_2D, texIndexarray[0]);&#xA;    &#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xA;&#xA;    glBindTexture(GL_TEXTURE_2D, texIndexarray[1]);&#xA;    &#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xA;    glBindTexture(GL_TEXTURE_2D, texIndexarray[2]);&#xA;    &#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);&#xA;    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);&#xA;&#xA;&#xA;    glValidateProgram(shaderProgram);&#xA;&#xA;    texUniformY = glGetUniformLocation(shaderProgram, "dataY");//2&#xA;    texUniformU = glGetUniformLocation(shaderProgram, "dataU");//0&#xA;    texUniformV = glGetUniformLocation(shaderProgram, "dataV");//1&#xA;&#xA;    &#xA;    FILE* fp = fopen("./output544_960.yuv","rb&#x2B;");//I420&#xA;    int returns  =fread(YUVdata,1,len,fp);&#xA;    int w = 544;&#xA;    int h = 960;&#xA;    int ysize = w*h;&#xA;    int uvsize = w * h / 4;&#xA;&#xA;    void* uptr = &amp;YUVdata[ysize];&#xA;    void* vptr = &amp;YUVdata[ysize * 5 / 4];&#xA;&#xA;    memcpy(Ydata,YUVdata,ysize);&#xA;    memcpy(Udata, uptr,uvsize);&#xA;    memcpy(Vdata, vptr,uvsize);&#xA;    glActiveTexture(GL_TEXTURE0);&#xA;    glBindTexture(GL_TEXTURE_2D, texIndexarray[0]);&#xA;    &#xA;    glTexImage2D(GL_TEXTURE_2D, 0 , GL_RED, w, h ,0, GL_RED,GL_UNSIGNED_BYTE ,Ydata);&#xA;    glUniform1i(texUniformY, texIndexarray[0]);               &#xA;&#xA;&#xA;    glActiveTexture(GL_TEXTURE1);&#xA;    glBindTexture(GL_TEXTURE_2D, texIndexarray[1]);&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, w/2, h/2, 0, GL_RED, GL_UNSIGNED_BYTE,Udata );&#xA;&#xA;    glUniform1i(texUniformU, texIndexarray[1]);&#xA;&#xA;&#xA;    glActiveTexture(GL_TEXTURE2);&#xA;    glBindTexture(GL_TEXTURE_2D, texIndexarray[2]);&#xA;    glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, w/2, h/2, 0, GL_RED, GL_UNSIGNED_BYTE,Vdata);&#xA;    glUniform1i(texUniformV, texIndexarray[2]);&#xA;&#xA;}&#xA;&#xA;&#xA;void render()&#xA;{&#xA;    glBindVertexArray(VAO);&#xA;    glUseProgram(shaderProgram);&#xA;    glDrawElements(GL_TRIANGLES,6,GL_UNSIGNED_INT,0);&#xA;    //glDrawArrays(GL_TRIANGLE_FAN,0,4);&#xA;    glUseProgram(0);&#xA;    glBindVertexArray(0);&#xA;}&#xA;&#xA;void initmodule()&#xA;{&#xA;    &#xA;    float vertexs[] = {&#xA;        &#xA;        1.0f,  1.0f, 0.0f,  1.0f, 0.0f,   &#xA;        1.0f, -1.0f, 0.0f,  1.0f, 1.0f,   &#xA;        -1.0f, -1.0f, 0.0f,  0.0f, 1.0f,   &#xA;        -1.0f,  1.0f, 0.0f,  0.0f, 0.0f    &#xA;    &#xA;    &#xA;    };&#xA;    &#xA;    unsigned int indexs[] = {&#xA;        0,1,3,&#xA;        1,2,3,&#xA;    };&#xA;&#xA;    &#xA;    glGenVertexArrays(1,&amp;VAO);&#xA;    glBindVertexArray(VAO);&#xA;&#xA;    &#xA;&#xA;    glGenBuffers(1, &amp;VBO);&#xA;    glBindBuffer(GL_ARRAY_BUFFER, VBO);&#xA;    &#xA;    glBufferData(GL_ARRAY_BUFFER,sizeof(vertexs), vertexs, GL_STATIC_DRAW);&#xA;&#xA;    &#xA;    glGenBuffers(1,&amp;EBO);&#xA;    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER,EBO);&#xA;    glBufferData(GL_ELEMENT_ARRAY_BUFFER,sizeof(indexs),indexs,GL_STATIC_DRAW);&#xA;    &#xA;    LoadPicture();&#xA;&#xA;    glVertexAttribPointer(0,3,GL_FLOAT,GL_FALSE,5*sizeof(float),(void*)0);&#xA;    &#xA;    glEnableVertexAttribArray(0);&#xA;    &#xA;    glVertexAttribPointer(1,2, GL_FLOAT, GL_FALSE, 5 * sizeof(float), (void*)(3 * sizeof(float)));&#xA;    &#xA;    glEnableVertexAttribArray(1);&#xA;&#xA;    &#xA;    glBindBuffer(GL_ARRAY_BUFFER,0);&#xA;&#xA;    &#xA;    glBindVertexArray(0);&#xA;&#xA;&#xA;&#xA;}&#xA;&#xA;void initshader(const char* verpath,const char* fragpath)&#xA;{&#xA;    &#xA;    std::string VerCode("");&#xA;    std::string fregCode("");&#xA;    &#xA;    std::ifstream  vShaderFile;&#xA;    std::ifstream  fShaderFile;&#xA;&#xA;    vShaderFile.exceptions(std::ifstream::failbit | std::ifstream::badbit);&#xA;    fShaderFile.exceptions(std::ifstream::failbit | std::ifstream::badbit);&#xA;&#xA;    try&#xA;    {&#xA;        vShaderFile.open(verpath);&#xA;        fShaderFile.open(fragpath);&#xA;&#xA;        std::stringstream vsstream, fsstream;&#xA;        vsstream &lt;&lt; vShaderFile.rdbuf();&#xA;        fsstream &lt;&lt; fShaderFile.rdbuf();&#xA;        VerCode = vsstream.str();&#xA;        fregCode = fsstream.str();&#xA;    &#xA;    }&#xA;    catch (const std::exception&amp;)&#xA;    {&#xA;        std::cout &lt;&lt; "read file error" &lt;&lt; std::endl;&#xA;    }&#xA;&#xA;    const char* vshader = VerCode.c_str();&#xA;    const char* fshader = fregCode.c_str();&#xA;&#xA;    &#xA;    unsigned int vertexID = 0, fragID = 0;&#xA;    char infoLog[512];&#xA;    int  successflag = 0;&#xA;    vertexID = glCreateShader(GL_VERTEX_SHADER);&#xA;    glShaderSource(vertexID,1,&amp;vshader,NULL );&#xA;    glCompileShader(vertexID);&#xA;    &#xA;    glGetShaderiv(vertexID,GL_COMPILE_STATUS,&amp;successflag);&#xA;    if (!successflag)&#xA;    {&#xA;        glGetShaderInfoLog(vertexID,512,NULL,infoLog);&#xA;        std::string errstr(infoLog);&#xA;        std::cout &lt;&lt; "v shader err"&lt;/frag&#xA;    fragID = glCreateShader(GL_FRAGMENT_SHADER);&#xA;    glShaderSource(fragID, 1, &amp;fshader, NULL);&#xA;    glCompileShader(fragID);&#xA;    &#xA;    glGetShaderiv(fragID, GL_COMPILE_STATUS, &amp;successflag);&#xA;    if (!successflag)&#xA;    {&#xA;        glGetShaderInfoLog(fragID, 512, NULL, infoLog);&#xA;        std::string errstr(infoLog);&#xA;        std::cout &lt;&lt; "f shader err"&lt;/&#xA;    initmodule();&#xA;&#xA;&#xA;    &#xA;    while (!glfwWindowShouldClose(window))&#xA;    {&#xA;        &#xA;        processInput(window);&#xA;&#xA;        glClearColor(0.0f,0.0f,0.0f,1.0f);&#xA;        glClear(GL_COLOR_BUFFER_BIT);&#xA;        render();&#xA;    &#xA;        &#xA;        glfwSwapBuffers(window);&#xA;        &#xA;        glfwPollEvents();&#xA;    }&#xA;&#xA;    &#xA;    glfwTerminate();&#xA;    return 0;&#xA;}&#xA;</iostream></sstream></fstream></string>

    &#xA;

    I get the Y data ,and run the code is ok ;the color is gray ;but when I add the U ,the color is Light green;and when i add the V is pink and green ;

    &#xA;

        #version 330 core&#xA;layout(location = 0) out vec4 FragColor;&#xA;in vec2 TexCoord;&#xA;uniform sampler2D dataY;&#xA;uniform sampler2D dataU;&#xA;uniform sampler2D dataV;&#xA;vec3 yuv;&#xA;vec3 rgb;&#xA;void main()&#xA;{&#xA;&#xA;&#xA;   yuv.x = texture2D(dataY, TexCoord).r-0.0625;&#xA;   yuv.y = texture2D(dataU, TexCoord).r-0.5;&#xA;   yuv.z = texture2D(dataV, TexCoord).r-0.5;&#xA;&#xA;   rgb = mat3(1,              1,      1,     &#xA;            0,       -0.18732, 1.8556,    &#xA;            1.57481, -0.46813,      0) * yuv;   &#xA;    FragColor = vec4(rgb.x, rgb.y,rgb.z,1); &#xA;};&#xA;

    &#xA;