Recherche avancée

Médias (1)

Mot : - Tags -/berlin

Autres articles (57)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Problèmes fréquents

    10 mars 2010, par

    PHP et safe_mode activé
    Une des principales sources de problèmes relève de la configuration de PHP et notamment de l’activation du safe_mode
    La solution consiterait à soit désactiver le safe_mode soit placer le script dans un répertoire accessible par apache pour le site

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (11143)

  • 10 Customer Segments Examples and Their Benefits

    9 mai 2024, par Erin

    Now that companies can segment buyers, the days of mass marketing are behind us. Customer segmentation offers various benefits for marketing, content creation, sales, analytics teams and more. Without customer segmentation, your personalised marketing efforts may fall flat. 

    According to the Twilio 2023 state of personalisation report, 69% of business leaders have increased their investment in personalisation. There’s a key reason for this — customer retention and loyalty directly benefit from personalisation. In fact, 62% of businesses have cited improved customer retention due to personalisation efforts. The numbers don’t lie. 

    Keep reading to learn how customer segments can help you fine-tune your personalised marketing campaigns. This article will give you a better understanding of customer segmentation and real-world customer segment examples. You’ll leave with the knowledge to empower your marketing strategies with effective customer segmentation. 

    What are customer segments ?

    Customer segments are distinct groups of people or organisations with similar characteristics, needs and behaviours. Like different species of plants in a garden, each customer segment has specific needs and care requirements. Customer segments are useful for tailoring personalised marketing campaigns for specific groups.

    Personalised marketing has been shown to have significant benefits — with 56% of consumers saying that a personalised experience would make them become repeat buyers

    Successful marketing teams typically focus on these types of customer segmentation :

    A chart with icons representing the different customer segmentation categories
    1. Geographic segmentation : groups buyers based on their physical location — country, city, region or climate — and language.
    2. Purchase history segmentation : categorises buyers based on their purchasing habits — how often they make purchases — and allows brands to distinguish between frequent, occasional and one-time buyers. 
    3. Product-based segmentation : groups buyers according to the products they prefer or end up purchasing. 
    4. Customer lifecycle segmentation : segments buyers based on where they are in the customer journey. Examples include new, repeat and lapsed buyers. This segmentation category is also useful for understanding the behaviour of loyal buyers and those at risk of churning. 
    5. Technographic segmentation : focuses on buyers’ technology preferences, including device type, browser type, and operating system. 
    6. Channel preference segmentation : helps us understand why buyers prefer to purchase via specific channels — whether online channels, physical stores or a combination of both. 
    7. Value-based segmentation : categorises buyers based on their average purchase value and sensitivity to pricing, for example. This type of segmentation can provide insights into the behaviours of price-conscious buyers and those willing to pay premium prices. 

    Customer segmentation vs. market segmentation

    Customer segmentation and market segmentation are related concepts, but they refer to different aspects of the segmentation process in marketing. 

    Market segmentation is the broader process of dividing the overall market into homogeneous groups. Market segmentation helps marketers identify different groups based on their characteristics or needs. These market segments make it easier for businesses to connect with new buyers by offering relevant products or new features. 

    On the other hand, customer segmentation is used to help you dig deep into the behaviour and preferences of your current customer base. Marketers use customer segmentation insights to create buyer personas. Buyer personas are essential for ensuring your personalised marketing efforts are relevant to the target audience. 

    10 customer segments examples

    Now that you better understand different customer segmentation categories, we’ll provide real-world examples of how customer segmentation can be applied. You’ll be able to draw a direct connection between the segmentation category or categories each example falls under.

    One thing to note is that you’ll want to consider privacy and compliance when you are considering collecting and analysing types of data such as gender, age, income level, profession or personal interests. Instead, you can focus on these privacy-friendly, ethical customer segmentation types :

    1. Geographic location (category : geographic segmentation)

    The North Face is an outdoor apparel and equipment company that relies on geographic segmentation to tailor its products toward buyers in specific regions and climates. 

    For instance, they’ll send targeted advertisements for insulated jackets and snow gear to buyers in colder climates. For folks in seasonal climates, The North Face may send personalised ads for snow gear in winter and ads for hiking or swimming gear in summer. 

    The North Face could also use geographic segmentation to determine buyers’ needs based on location. They can use this information to send targeted ads to specific customer segments during peak ski months to maximise profits.

    2. Preferred language (category : geographic segmentation)

    Your marketing approach will likely differ based on where your customers are and the language they speak. So, with that in mind, language may be another crucial variable you can introduce when identifying your target customers. 

    Language-based segmentation becomes even more important when one of your main business objectives is to expand into new markets and target international customers — especially now that global reach is made possible through digital channels. 

    Coca-Cola’s “Share a Coke” is a multi-national campaign with personalised cans and bottles featuring popular names from countries around the globe. It’s just one example of targeting customers based on language.

    3. Repeat users and loyal customers (category : customer lifecycle segmentation)

    Sephora, a large beauty supply company, is well-known for its Beauty Insider loyalty program. 

    It segments customers based on their purchase history and preferences and rewards their loyalty with gifts, discounts, exclusive offers and free samples. And since customers receive personalised product recommendations and other perks, it incentivises them to remain members of the Beauty Insider program — adding a boost to customer loyalty.

    By creating a memorable customer experience for this segment of their customer base, staying on top of beauty trends and listening to feedback, Sephora is able to keep buyers coming back.

    All customers on the left and their respective segments on the right

    4. New customers (category : customer lifecycle segmentation)

    Subscription services use customer lifecycle segmentation to offer special promotions and trials for new customers. 

    HBO Max is a great example of a real company that excels at this strategy : 

    They offer 40% savings on an annual ad-free plan, which targets new customers who may be apprehensive about the added monthly cost of a recurring subscription.

    This marketing strategy prioritises fostering long-term customer relationships with new buyers to avoid high churn rates. 

    5. Cart abandonment (category : purchase history segmentation)

    With a rate of 85% among US-based mobile users, cart abandonment is a huge issue for ecommerce businesses. One way to deal with this is to segment inactive customers and cart abandoners — those who showed interest by adding products to their cart but haven’t converted yet — and send targeted emails to remind them about their abandoned carts.

    E-commerce companies like Ipsy, for example, track users who have added items to their cart but haven’t followed through on the purchase. The company’s messaging often contains incentives — like free shipping or a limited-time discount — to encourage passive users to return to their carts. 

    Research has found that cart abandonment emails with a coupon code have a high 44.37% average open rate. 

    6. Website activity (category : technographic segmentation)

    It’s also possible to segment customers based on website activity. Now, keep in mind that this is a relatively broad approach ; it covers every interaction that may occur while the customer is browsing your website. As such, it leaves room for many different types of segmentation. 

    For instance, you can segment your audience based on the pages they visited, the elements they interacted with — like CTAs and forms — how long they stayed on each page and whether they added products to their cart. 

    Matomo’s Event Tracking can provide additional context to each website visit and tell you more about the specific interactions that occur, making it particularly useful for segmenting customers based on how they spend their time on your website. 

    Try Matomo for Free

    Get the web insights you need, while respecting user privacy.

    No credit card required

    Amazon segments its customers based on browsing behaviour — recently viewed products and categories, among other things — which, in turn, allows them to improve the customer’s experience and drive sales.

    7. Traffic source (category : channel segmentation) 

    You can also segment your audience based on traffic sources. For example, you can determine if your website visitors arrived through Google and other search engines, email newsletters, social media platforms or referrals. 

    In other words, you’ll create specific audience segments based on the original source. Matomo’s Acquisition feature can provide insights into five different types of traffic sources — search engines, social media, external websites, direct traffic and campaigns — to help you understand how users enter your website.

    You may find that most visitors arrive at your website through social media ads or predominantly discover your brand through search engines. Either way, by learning where they’re coming from, you’ll be able to determine which conversion paths you should prioritise and optimise further. 

    8. Device type (category : technographic segmentation)

    Device type is customer segmentation based on the devices that potential customers may use to access your website and view your content. 

    It’s worth noting that, on a global level, most people (96%) use mobile devices — primarily smartphones — for internet access. So, there’s a high chance that most of your website visitors are coming from mobile devices, too. 

    However, it’s best not to assume anything. Matomo can detect the operating system and the type of device — desktop, mobile device, tablet, console or TV, for example. 

    By introducing the device type variable into your customer segmentation efforts, you’ll be able to determine if there’s a preference for mobile or desktop devices. In return, you’ll have a better idea of how to optimise your website — and whether you should consider developing an app to meet the needs of mobile users.

    Try Matomo for Free

    Get the web insights you need, while respecting user privacy.

    No credit card required

    9. Browser type (category : technographic segmentation)

    Besides devices, another type of segmentation that belongs to the technographic category and can provide valuable insights is browser-related. In this case, you’re tracking the internet browser your customers use. 

    Many browser types are available — including Google Chrome, Microsoft Edge, Safari, Firefox and Brave — and each may display your website and other content differently. 

    So, keeping track of your customers’ preferred choices is important. Otherwise, you won’t be able to fully understand their online experience — or ensure that these browsers are displaying your content properly. 

    Browser type in Matomo

    10. Ecommerce activity (category : purchase history, value based, channel or product based segmentation) 

    Similar to website activity, looking at ecommerce activity can tell your sales teams more about which pages the customer has seen and how they have interacted with them. 

    With Matomo’s Ecommerce Tracking, you’ll be able to keep an eye on customers’ on-site behaviours, conversion rates, cart abandonment, purchased products and transaction data — including total revenue and average order value.

    Considering that the focus is on sales channels — such as your online store — this approach to customer segmentation can help you improve the sales experience and increase profitability. 

    Start implementing these customer segments examples

    With ever-evolving demographics and rapid technological advancements, customer segmentation is increasingly complex. The tips and real-world examples in this article break down and simplify customer segmentation so that you can adapt to your customer base. 

    Customer segmentation lays the groundwork for your personalised marketing campaigns to take off. By understanding your users better, you can effectively tailor each campaign to different segments. 

    If you’re ready to see how Matomo can elevate your personalised marketing campaigns, try it for free for 21 days. No credit card required.

  • Error of "Built target opencv_imgproc" while compiling opencv2

    23 mars 2017, par Hong

    Following https://github.com/menpo/conda-opencv3, while I compile opencv, there is following error (please read the error at the end of the post). The only change I made is to enable ffmpeg by modifying "-DWITH_FFMPEG=1" in BUILD.SH. Any suggestion ?

    $conda build conda/
    BUILD START: opencv3-3.1.0-py27_0
    updating index in: /home/cocadas/anaconda2/conda-bld/linux-64
    updating index in: /home/cocadas/anaconda2/conda-bld/noarch

    The following NEW packages will be INSTALLED:

    bzip2:      1.0.6-3            
    cmake:      3.6.3-0            
    curl:       7.52.1-0          
    eigen:      3.2.7-0       menpo
    expat:      2.1.0-0            
    mkl:        2017.0.1-0        
    ncurses:    5.9-10            
    numpy:      1.12.1-py27_0      
    openssl:    1.0.2k-1          
    pip:        9.0.1-py27_1      
    python:     2.7.13-0          
    readline:   6.2-2              
    setuptools: 27.2.0-py27_0      
    sqlite:     3.13.0-0          
    tk:         8.5.18-0          
    wheel:      0.29.0-py27_0      
    xz:         5.2.2-1            
    zlib:       1.2.8-3            
    Source cache directory is: /home/cocadas/anaconda2/conda-bld/src_cache
    Found source in cache: opencv-3.1.0.tar.gz
    Extracting download
    Applying patch: u'/home/cocadas/conda-opencv3/conda/no_rpath.patch'
    patching file CMakeLists.txt
    patch unexpectedly ends in middle of line
    Hunk #1 succeeded at 397 with fuzz 1 (offset 11 lines).
    Package: opencv3-3.1.0-py27_0
    source tree in: /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0

    source /home/cocadas/anaconda2/bin/activate /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl
    mkdir build
    cd build
    CMAKE_GENERATOR='Unix Makefiles'
    CMAKE_ARCH=-m64
    ++ uname -s
    SHORT_OS_STR=Linux
    '[' Linux == Linux ']'
    DYNAMIC_EXT=so
    TBB=
    OPENMP=-DWITH_OPENMP=1
    IS_OSX=0

    -- 3rdparty dependencies: zlib libjpeg libwebp libpng libtiff libjasper IlmImf
    --
    -- OpenCV modules:
    -- To be built: core flann hdf imgproc ml photo reg surface_matching video dnn fuzzy imgcodecs shape videoio highgui objdetect plot superres xobjdetect xphoto bgsegm bioinspired dpm face features2d line_descriptor saliency text calib3d ccalib datasets rgbd stereo structured_light tracking videostab xfeatures2d ximgproc aruco optflow sfm stitching python2
    -- Disabled: world contrib_world
    -- Disabled by dependency: -
    -- Unavailable: cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev java python3 ts viz cvv matlab
    --
    -- GUI:
    -- QT: NO
    -- GTK+ 3.x: YES (ver 3.18.9)
    -- GThread : YES (ver 2.48.2)
    -- GtkGlExt: NO
    -- OpenGL support: NO
    -- VTK support: NO
    --
    -- Media I/O:
    -- ZLib: build (ver 1.2.8)
    -- JPEG: build (ver 90)
    -- WEBP: build (ver 0.3.1)
    -- PNG: build (ver 1.6.19)
    -- TIFF: build (ver 42 - 4.0.2)
    -- JPEG 2000: build (ver 1.900.1)
    -- OpenEXR: build (ver 1.7.1)
    -- GDAL: NO
    --
    -- Video I/O:
    -- DC1394 1.x: NO
    -- DC1394 2.x: YES (ver 2.2.4)
    -- FFMPEG: YES
    -- codec: YES (ver 56.60.100)
    -- format: YES (ver 56.40.101)
    -- util: YES (ver 54.31.100)
    -- swscale: YES (ver 3.1.101)
    -- resample: NO
    -- gentoo-style: YES
    -- GStreamer: NO
    -- OpenNI: NO
    -- OpenNI PrimeSensor Modules: NO
    -- OpenNI2: NO
    -- PvAPI: NO
    -- GigEVisionSDK: NO
    -- UniCap: NO
    -- UniCap ucil: NO
    -- V4L/V4L2: Using libv4l1 (ver 1.10.0) / libv4l2 (ver 1.10.0)
    -- XIMEA: NO
    -- Xine: NO
    -- gPhoto2: NO
    --
    -- Parallel framework: OpenMP
    --
    -- Other third-party libraries:
    -- Use IPP: 9.0.1 [9.0.1]
    -- at: /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/3rdparty/ippicv/unpack/ippicv_lnx
    -- Use IPP Async: NO
    -- Use VA: NO
    -- Use Intel VA-API/OpenCL: NO
    -- Use Eigen: YES (ver 3.2.7)
    -- Use Cuda: NO
    -- Use OpenCL: NO
    -- Use custom HAL: NO
    --
    -- Python 2:

    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:554:22: error: ‘H5Tclose’ was not declared in this scope
    H5Tclose( dstype );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:555:22: error: ‘H5Sclose’ was not declared in this scope
    H5Sclose( dspace );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:557:22: error: ‘H5Dclose’ was not declared in this scope
    H5Dclose( dsdata );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp: At global scope:
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:466:50: warning: unused parameter ‘dslabel’ [-Wunused-parameter]
    void HDF5Impl::dsread( OutputArray Array, String dslabel,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp: In member function ‘virtual void cv::hdf::HDF5Impl::dswrite(cv::InputArray, cv::String, const int*, const int*) const’:
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:583:5: error: ‘hsize_t’ was not declared in this scope
    hsize_t dsdims[n_dims];
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:584:13: error: expected ‘;’ before ‘offset’
    hsize_t offset[n_dims];
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:588:7: error: ‘offset’ was not declared in this scope
    offset[d] = 0;
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:590:7: error: ‘dsdims’ was not declared in this scope
    dsdims[d] = matrix.size[d];
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:601:9: error: ‘dsdims’ was not declared in this scope
    dsdims[d] = dims_counts[d];
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:605:5: error: ‘hid_t’ was not declared in this scope
    hid_t dsdata = H5Dopen( m_h5_file_id, dslabel.c_str(), H5P_DEFAULT );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:608:11: error: expected ‘;’ before ‘dspace’
    hid_t dspace = H5Screate_simple( n_dims, dsdims, NULL );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:614:9: error: ‘offset’ was not declared in this scope
    offset[d] = dims_offset[d];
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:618:11: error: expected ‘;’ before ‘fspace’
    hid_t fspace = H5Dget_space( dsdata );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:619:26: error: ‘fspace’ was not declared in this scope
    H5Sselect_hyperslab( fspace, H5S_SELECT_SET,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:619:34: error: ‘H5S_SELECT_SET’ was not declared in this scope
    H5Sselect_hyperslab( fspace, H5S_SELECT_SET,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:620:26: error: ‘offset’ was not declared in this scope
    offset, NULL, dsdims, NULL );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:620:40: error: ‘dsdims’ was not declared in this scope
    offset, NULL, dsdims, NULL );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:620:53: error: ‘H5Sselect_hyperslab’ was not declared in this scope
    offset, NULL, dsdims, NULL );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:623:11: error: expected ‘;’ before ‘dstype’
    hid_t dstype = GetH5type( matrix.type() );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:628:15: error: expected ‘;’ before ‘adims’
    hsize_t adims[1] = { channs };
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:629:7: error: ‘dstype’ was not declared in this scope
    dstype = H5Tarray_create( dstype, 1, adims );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:629:44: error: ‘adims’ was not declared in this scope
    dstype = H5Tarray_create( dstype, 1, adims );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:629:50: error: ‘H5Tarray_create’ was not declared in this scope
    dstype = H5Tarray_create( dstype, 1, adims );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:633:15: error: ‘dsdata’ was not declared in this scope
    H5Dwrite( dsdata, dstype, dspace, fspace,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:633:23: error: ‘dstype’ was not declared in this scope
    H5Dwrite( dsdata, dstype, dspace, fspace,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:633:31: error: ‘dspace’ was not declared in this scope
    H5Dwrite( dsdata, dstype, dspace, fspace,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:634:15: error: ‘H5P_DEFAULT’ was not declared in this scope
    H5P_DEFAULT, matrix.data );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:634:40: error: ‘H5Dwrite’ was not declared in this scope
    H5P_DEFAULT, matrix.data );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:637:24: error: ‘H5Tclose’ was not declared in this scope
    H5Tclose( dstype );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:639:22: error: ‘H5Sclose’ was not declared in this scope
    H5Sclose( dspace );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:641:22: error: ‘H5Dclose’ was not declared in this scope
    H5Dclose( dsdata );
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:580:9: warning: unused variable ‘channs’ [-Wunused-variable]
    int channs = matrix.channels();
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp: In member function ‘virtual void cv::hdf::HDF5Impl::dsinsert(cv::InputArray, cv::String, const int*, const int*) const’:
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:670:5: error: ‘hsize_t’ was not declared in this scope
    hsize_t dsdims[n_dims];
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:671:13: error: expected ‘;’ before ‘offset’
    hsize_t offset[n_dims];
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:675:7: error: ‘offset’ was not declared in this scope
    offset[d] = 0;
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:676:7: error: ‘dsdims’ was not declared in this scope
    dsdims[d] = matrix.size[d];

    ......
    hsize_t foffset[1] = 0  ;
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1022:11 : error : expected ‘ ;’ before ‘dspace’
    hid_t dspace = H5Screate_simple( 1, dsddims, NULL ) ;
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1025:26 : error : ‘dspace’ was not declared in this scope
    H5Sselect_hyperslab( dspace, H5S_SELECT_SET,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1025:34 : error : ‘H5S_SELECT_SET’ was not declared in this scope
    H5Sselect_hyperslab( dspace, H5S_SELECT_SET,
    ^
    /home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/build/opencv_contrib/modules/hdf/src/hdf5.cpp:1026:26 : error : ‘foffset’ was not declared in this scope
    foffset, NULL, dsddims, NULL ) ;

    [ 57%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/svm.cpp.o
    [ 57%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/testset.cpp.o
    [ 57%] Building CXX object modules/ml/CMakeFiles/opencv_ml.dir/src/tree.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/approx.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/blend.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/canny.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/clahe.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/color.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/colormap.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/connectedcomponents.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/contours.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/convhull.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/corner.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/cornersubpix.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/demosaicing.cpp.o
    [ 57%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/deriv.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/distransform.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/drawing.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/emd.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/featureselect.cpp.o
    [ 59%] Linking CXX shared library ../../lib/libopencv_ml.so
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/filter.cpp.o
    [ 59%] Built target opencv_ml
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/floodfill.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/gabor.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/generalized_hough.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/geometry.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/grabcut.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/hershey_fonts.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/histogram.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/hough.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/imgwarp.cpp.o
    [ 59%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/intersection.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/linefit.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/lsd.cpp.o
    [ 60%] Linking CXX shared library ../../lib/libopencv_flann.so
    [ 60%] Built target opencv_flann
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/matchcontours.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/main.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/min_enclosing_triangle.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/moments.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/morph.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/phasecorr.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/pyramids.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/rotcalipers.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/samplers.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/segmentation.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/shapedescr.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/smooth.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/spatialgradient.cpp.o
    [ 60%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/subdivision2d.cpp.o
    [ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/sumpixels.cpp.o
    [ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/tables.cpp.o
    [ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/templmatch.cpp.o
    [ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/thresh.cpp.o
    [ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/undistort.cpp.o
    [ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/utils.cpp.o
    [ 62%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/opencl_kernels_imgproc.cpp.o
    [ 62%] Linking CXX shared library ../../lib/libopencv_imgproc.so
    [ 62%] Built target opencv_imgproc
    Makefile:160: recipe for target 'all' failed
    make: *** [all] Error 2
    Traceback (most recent call last):
    File "/home/cocadas/anaconda2/bin/conda-build", line 6, in
    sys.exit(conda_build.cli.main_build.main())
    File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 334, in main
    execute(sys.argv[1:])
    File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/cli/main_build.py", line 325, in execute
    noverify=args.no_verify)
    File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/api.py", line 97, in build
    need_source_download=need_source_download, config=config)
    File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/build.py", line 1502, in build_tree
    config=config)
    File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/build.py", line 1137, in build
    utils.check_call_env(cmd, env=env, cwd=src_dir)
    File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/utils.py", line 616, in check_call_env
    return _func_defaulting_env_to_os_environ(subprocess.check_call, *popenargs, **kwargs)
    File "/home/cocadas/anaconda2/lib/python2.7/site-packages/conda_build/utils.py", line 612, in _func_defaulting_env_to_os_environ
    return func(_args, **kwargs)
    File "/home/cocadas/anaconda2/lib/python2.7/subprocess.py", line 186, in check_call
    raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/bin/bash', '-x', '-e', '/home/cocadas/anaconda2/conda-bld/opencv3_1490285248642/work/opencv-3.1.0/conda_build.sh']' returned non-zero exit status 2
  • ffmpeg trouble with NetMaui and Android [closed]

    15 juin 2024, par Billy Vanegas

    I find myself in a following predicament. While I work with Visual Studio 2022, ffmpeg performs flawlessly on Windows platform. However, I'm encountering difficulties when attempting to replicate this functionality on Android. Despite exploring NuGet packages like FFMpegCore, which seem to be ffmpeg wrappers but lack ffmpeg itself, I'm still struggling to find a clear path forward. I've even tried integrating ffmpeg-kit for Android as per the instructions, only to face repeated failures and a sense of confusion. I must admit my puzzlement : why isn't there a straightforward method to seamlessly add ffmpeg to a .NET MAUI project that functions consistently across both iOS and Android platforms ?

    


    I want to convert MP3 files to WAV format using FFmpeg on the Android platform within a .NET MAUI project.

    


    I am using the FFmpegCore library and have downloaded the FFmpeg binaries from the official FFmpeg website. However, I encountered issues when attempting to pass the binary folder on the emulator, when I try to pass it, I get permission denied in working folder :
/data/user/0/com.companyname.projectname/files/ffmpeg on this part of code :

    


             await FFMpegArguments
               .FromFileInput(mp3Path)
               .OutputToFile(wavPath, true, options => options
                   .WithAudioCodec("pcm_s16le")
                   .WithAudioSamplingRate(44100)
                   .WithAudioBitrate(320000)
                   )
               .ProcessAsynchronously();


    


    This is the AndroidManifest.xml

    


    &lt;?xml version="1.0" encoding="utf-8"?>&#xA;<manifest>&#xA;    <application></application>&#xA;    &#xA;    &#xA;    &#xA;    &#xA;</manifest>&#xA;

    &#xA;

     private async Task ConvertMp3ToWav(string mp3Path, string wavPath)&#xA; {&#xA;     try&#xA;     {&#xA;         var directory = Path.GetDirectoryName(wavPath);&#xA;         if (!Directory.Exists(directory))&#xA;             Directory.CreateDirectory(directory!);&#xA;         if (!File.Exists(wavPath))&#xA;             Console.WriteLine($"File not found {wavPath}, creating empty file.");&#xA;             using var fs = new FileStream(wavPath, FileMode.CreateNew);&#xA;         if (!File.Exists(mp3Path))&#xA;             Console.WriteLine($"File not found {mp3Path}");&#xA;&#xA;         string? ffmpegBinaryPath = await ExtractFFmpegBinaries(Platform.AppContext);&#xA;         FFMpegCore.GlobalFFOptions.Configure(new FFOptions { BinaryFolder = Path.GetDirectoryName(ffmpegBinaryPath!)! });&#xA;&#xA;         await FFMpegArguments&#xA;               .FromFileInput(mp3Path)&#xA;               .OutputToFile(wavPath, true, options => options&#xA;                   .WithAudioCodec("pcm_s16le")&#xA;                   .WithAudioSamplingRate(44100)&#xA;                   .WithAudioBitrate(320000)&#xA;                   )&#xA;               .ProcessAsynchronously();&#xA;     }&#xA;     catch (Exception ex)&#xA;     {&#xA;         Console.WriteLine($"An error occurred during the conversion process: {ex.Message}");&#xA;         throw;&#xA;     }&#xA; }&#xA;

    &#xA;

        private async Task<string> ExtractFFmpegBinaries(Context context)&#xA;    {&#xA;        var architectureFolder = "x86"; // "armeabi-v7a";&#xA;        var ffmpegBinaryName = "ffmpeg"; &#xA;        var ffmpegBinaryPath = Path.Combine(context.FilesDir!.AbsolutePath, ffmpegBinaryName);&#xA;        var tempFFMpegFileName = Path.Combine(FileSystem.AppDataDirectory, ffmpegBinaryName);&#xA;&#xA;        if (!File.Exists(ffmpegBinaryPath))&#xA;        {&#xA;            try&#xA;            {&#xA;                var assetPath = $"Libs/{architectureFolder}/{ffmpegBinaryName}";&#xA;                using var assetStream = context.Assets!.Open(assetPath);&#xA;               &#xA;                await using var tempFFMpegFile = File.OpenWrite(tempFFMpegFileName);&#xA;                await assetStream.CopyToAsync(tempFFMpegFile);&#xA;&#xA;                //new MainActivity().RequestStoragePermission();&#xA;                Java.Lang.Runtime.GetRuntime()!.Exec($"chmod 755 {tempFFMpegFileName}");&#xA;            }&#xA;            catch (Exception ex)&#xA;            {&#xA;                Console.WriteLine($"An error occurred while extracting FFmpeg binaries: {ex.Message}");&#xA;                throw;&#xA;            }&#xA;        }&#xA;        else&#xA;        {&#xA;            Console.WriteLine($"FFmpeg binaries already extracted to: {ffmpegBinaryPath}");&#xA;        }&#xA;&#xA;        return tempFFMpegFileName!;&#xA;    }&#xA;</string>

    &#xA;