Recherche avancée

Médias (3)

Mot : - Tags -/pdf

Sur d’autres sites (353)

  • 11 of the Most Effective Conversion Rate Optimisation Best Practices

    14 février, par Erin

    Driving more traffic to your website is hard work, but it’s still only half the battle. 

    You don’t just need to acquire new users ; you need to make sure as many convert as possible to make your digital marketing efforts worthwhile.

    That’s why improving your site’s conversion rate is so important. It will also help you get more value from your existing traffic source and keep you in line with your competitors. It’s also probably a lot easier than you think — especially if you adopt optimisation strategies that have been proven to be profitable time and time again. 

    In this article, we’ll show some of the most powerful, innovative and tried-and-tested conversion rate optimisation strategies you can implement immediately. 

    What is conversion rate optimisation ?

    First, let’s look at what conversion rate optimisation means. Conversion rate optimisation is the practice of improving elements of your website to increase the number of users who take a desired action and turn visitors into customers. 

    Common conversion goals include :

    • Making a purchase
    • Adding an item to a shopping cart
    • Signing up for a newsletter
    • Registering for a free trial
    • Downloading an ebook
    • Watching a video

    It doesn’t matter what your goal is. Using one of the following conversion rate optimisation best practices can send your conversions soaring. 

    11 conversion rate optimisation best practices 

    Are you ready to roll up your sleeves and get to work ? Then use one or more of the following best practices to improve your return on investment. 

    Set a clear goals and hypothesis

    When running an A/B or multivariate test, you need a clear idea of what you are testing and why. 

    A goal (a statement about what you want to achieve) and a hypothesis (a statement about what you expect to happen) clarify the problem you are trying to solve and give you a definitive way to judge the experiment’s results. 

    Confused ? Just use this template :

    We aim to [insert goal] by testing [insert test] on [insert page]. We expect that [insert test] will increase [insert metric] because [insert reason].

    Make sure your goals are directly related to the experiment. If you are testing your CTA button, the goal should be getting more users to click the button. It shouldn’t be a goal further down the conversion funnel, like making a purchase. 

    Start with A/B tests

    A/B testing is one of the easiest and most effective ways to run experiments to improve your current conversion rate. So, it’s no wonder that the A/B testing software market was expected to be worth $1.2 billion in 2023 and hit $3.6 billion by 2033. 

    Also known as split testing, A/B testing allows you to directly compare the conversion performance of two elements on your page, like the colour of your CTA button or your headline copy.

    A screenshot of an A/B test using Matomo

    You can go even further with multivariate testing, which lets you test two or more changes against a single control. 

    For example, the screenshot above shows the results of a multivariate test between a standard header, a wide header and a small header using Matomo’s A/B testing tool. As you can see, the wider header has a much higher conversion, and the increase was statistically significant. 

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Tweak your CTAs

    Calls to action (CTAs) are page elements that prompt users to respond immediately. They are usually buttons but can also be images or plain text links. 

    What your CTAs say, how they look, and where they are placed can greatly impact your site’s conversion rates. As such, this is one of the elements you’ll want to optimise first. 

    There are several tweaks you can test, including your CTA’s :

    • Colour 
    • Length 
    • Copy
    • Placement 

    You can even test the impact of removing CTA banners and using text-based CTAs on your conversion rates.

    You should test out personalising CTAs, too. Research shows that personalised CTAs perform 202% better than standard calls to action. 

    Revise your web copy

    You can use several strategies to improve your website’s copy and generate more conversions. 

    Optimising copy for search engines can increase traffic and generate more conversions, for example. But that shouldn’t make your copy any less impactful. Bear search engines in mind, by all means, but make sure you are speaking to the needs and desires of your potential customers. Your copy needs to convince users that your product can solve their problems. 

    Nowhere is this more important than your headlines. These will be the first thing users read, so make sure they sell your USP and highlight pain points.

    Don’t just guess at the kind of messaging that will move the needle, however. Constantly test new headlines and continue doing so even after you’ve started seeing success. The results may surprise you. TruckersReport, a site that helps people become truck drivers, boosted opt-ins by 21.7% by revising its landing page headline, among other changes. 

    Make sure there are no spelling mistakes in your copy, either. Misspelt words, poor grammar and bad formatting make your website look unprofessional and untrustworthy. Even if the rest of your copy is incredibly enticing, these rookie errors can be enough to turn customers off. 

    Simplify your site’s navigation

    A website’s navigation is an often overlooked factor in conversion rate optimisation, but simplifying it can make it much easier for users to take action. 

    If you’ve ever used a poorly designed e-commerce store, you know how confusing and overwhelming bad navigation can be. Research shows that a whopping 82% of stores don’t divide their navigation into manageable chunks. 

    The trick is to simplify your navigation as much as possible. As you can see in the screenshot below, our navigation only has five headers and a call to action. It’s easy to find exactly what you’re looking for, and you can’t miss the big green CTA button. 

    A screenshot of the navigation menu on Matomo

    Alternatively, you can test what happens when you completely remove your navigation. Brands usually do this on landing pages where the only action they want the user to take is to make a purchase. 

    It’s exactly the strategy we’ve used on our free trial landing page. 

    Leverage heatmaps

    Analytics tools — and heatmaps in particular — can help you understand user behaviour and optimise accordingly. 

    Heatmaps are a visual representation of user interaction on your page. Red and yellow represent high levels of user interaction, and blue and green represent low levels of interaction.

    Screenshot of Matomo heatmap feature

    As you can see in the screenshot above, our CTA button has some of the highest levels of engagement on the page, telling us that it’s well-positioned. Given the focus on the site’s navigation, we can also assume we are correct to have a CTA button in there — something we can confirm using our web analytics to see how many users click on it.

    Reduce load time

    Speed matters when it comes to conversions. Fact. 

    Research shows a huge difference in conversion rates between quick and slow sites. For example, a site that loads in one second converts three times better than a site that loads in five seconds. 

    That’s why using a web analytics tool is vital to understand page load times and act accordingly if you think slow speeds are hampering your conversions.

    A screenshot of page load times in Matomo

    Identifying your slowest pages is easy with Matomo. Just sort your pages by the Avg. Use the page load time metric on the page performance report to identify the pages you want to drive conversions. 

    Next, take steps to improve your page’s load time by :

    • Compressing images
    • Compressing code files or using a more lightweight theme
    • Removing unnecessary plugins
    • Using a content delivery network
    • Improving your hosting

    Try Matomo for Free

    Get the web insights you need, without compromising data accuracy.

    No credit card required

    Add more trust signals

    Trust is essential when you’re trying to convince customers to make a purchase. In fact, consumers rate trust as one of the top three buying factors, far above a brand’s reputation and whether they love the brand. 

    Adding trust signals to your landing pages, such as customer testimonials, customer reviews, case studies, and other forms of social proof, can transform your conversion rates. If consumers see real people and businesses buy from you, they’ll feel reassured to do the same.

    Trust signals on the Matomo website

    It’s a strategy we use ourselves. Just look at the screenshot from our homepage above. Immediately after our free trial CTA, we display the logos of well-known brands that use our product. 

    Security-focused trust signals are also powerful if you are an online store. Installing an SSL certificate, showing logos of trusted payment providers (like PayPal and Mastercard) can convince people they are spending money at a legitimate store.

    Improve your site’s mobile experience

    More and more people are accessing the internet via their smartphones. In 2022, for instance, there were five billion unique mobile Internet users, meaning more than 60% of the internet population used a smartphone to browse online. 

    Moreover, 76% of U.S. adults make purchases using their smartphones. 

    That means you need to ensure your site’s mobile experience is on-point to increase conversions. 

    Your site should use a mobile-first design, meaning it works perfectly on smartphones and then scales up for desktop users. 

    Trust the data

    Opinions are a fantastic form of inspiration for new A/B tests. But they should never be trusted over cold, hard data. If your test shows the opposite of what you and your team thought would happen, then trust the data and not yourself.

    With that in mind, ensure you collect qualitative and quantitative data during your experiments. Web analytics should always form the backbone of conversion tests, but don’t forget to also use heatmaps, screen recordings, and customer surveys. 

    Keep testing

    There’s no such word as “finished” in the world of A/B testing. Continual testing is key if you want to convert more website visitors. 

    Make sure you aren’t stopping tests prematurely, either. Make sure every A/B and multivariate test reaches a sample size that makes the test statistically significant. 

    Understand your users better with Matomo 

    Whether you run an e-commerce store, a SaaS company, or a service-based business, implementing these conversion rate optimisation best practices could be an easy way to lower your bounce rate and boost your conversion rates.

    But remember, best practices aren’t clear-cut rules. What works for one website may not work for yours. That’s why running your own tests and understanding your visitors’ behaviour is important. 

    Matomo’s web analytics platform is the perfect tool for doing just that. Not only does it come with the tools you need to optimise your conversion rate (like an A/B testing tool, heatmaps and session recordings), but you can also trust the data. Unlike Google Analytics 4 and other tools, Matomo doesn’t use data sampling meaning you have 100% accurate data from which to make better decisions. It’s GDPR compliant and can run cookieless, so no need for cookie consent banners (excluding in the UK and Germany).

    Discover how you can improve your website’s conversions with Matomo by starting a free 21-day trial, no credit card required.

  • RTMP server with OpenCV (python)

    12 février, par Overnout

    I'm trying to process an RTMP stream in Python, using OpenCV2 but I'm not able to get OpenCV to capture it (i.e. act as RTMP server).

    


    I can run FFmpeg/FFplay from the command line and receive the stream successfully.
What could cause OpenCV to fail opening the stream in listening mode ?

    


    Here is my code :

    


    import cv2

cap = cv2.VideoCapture("rtmp://0.0.0.0:8000/live", cv2.CAP_FFMPEG)

if not cap.isOpened():
    print("Cannot open video source")
    exit()


    


    And the output :

    


    [tcp @ 00000192c490d640] Connection to tcp://0.0.0.0:8000 failed: Error number -138 occurred
[rtmp @ 00000192c490d580] Cannot open connection tcp://0.0.0.0:8000 
Cannot open video source


    


    edit2 : Output with debug logging turned on :

    


    output of the python script with debug logging on:
[DEBUG:0@0.017] global videoio_registry.cpp:218 cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Builtin backends(9): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930); OBSENSOR(920)
[DEBUG:0@0.026] global videoio_registry.cpp:242 cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Available backends(9): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930); OBSENSOR(920)
[ INFO:0@0.031] global videoio_registry.cpp:244 cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(9, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940); UEYE(930); OBSENSOR(920)
[ WARN:0@0.037] global cap.cpp:132 cv::VideoCapture::open VIDEOIO(FFMPEG): trying capture filename='rtmp://192.168.254.101:8000/live' ...
[ INFO:0@0.040] global backend_plugin.cpp:383 cv::impl::getPluginCandidates Found 2 plugin(s) for FFMPEG
[ INFO:0@0.043] global plugin_loader.impl.hpp:67 cv::plugin::impl::DynamicLib::libraryLoad load C:\Users\me\src\opencv\.venv\Lib\site-packages\cv2\opencv_videoio_ffmpeg490_64.dll => OK
[ INFO:0@0.047] global backend_plugin.cpp:50 cv::impl::PluginBackend::initCaptureAPI Found entry: 'opencv_videoio_capture_plugin_init_v1'
[ INFO:0@0.049] global backend_plugin.cpp:169 cv::impl::PluginBackend::checkCompatibility Video I/O: initialized 'FFmpeg OpenCV Video I/O Capture plugin': built with OpenCV 4.9 (ABI/API = 1/1), current OpenCV version is '4.9.0' (ABI/API = 1/1)
[ INFO:0@0.055] global backend_plugin.cpp:69 cv::impl::PluginBackend::initCaptureAPI Video I/O: plugin is ready to use 'FFmpeg OpenCV Video I/O Capture plugin'
[ INFO:0@0.058] global backend_plugin.cpp:84 cv::impl::PluginBackend::initWriterAPI Found entry: 'opencv_videoio_writer_plugin_init_v1'
[ INFO:0@0.061] global backend_plugin.cpp:169 cv::impl::PluginBackend::checkCompatibility Video I/O: initialized 'FFmpeg OpenCV Video I/O Writer plugin': built with OpenCV 4.9 (ABI/API = 1/1), current OpenCV version is '4.9.0' (ABI/API = 1/1)
[ INFO:0@0.065] global backend_plugin.cpp:103 cv::impl::PluginBackend::initWriterAPI Video I/O: plugin is ready to use 'FFmpeg OpenCV Video I/O Writer plugin'
[tcp @ 00000266b2f0d0c0] Connection to tcp://192.168.254.101:8000 failed: Error number -138 occurred
[rtmp @ 00000266b2f0cfc0] Cannot open connection tcp://192.168.254.101:8000
[ WARN:0@5.630] global cap.cpp:155 cv::VideoCapture::open VIDEOIO(FFMPEG): can't create capture
[DEBUG:0@5.632] global cap.cpp:225 cv::VideoCapture::open VIDEOIO: choosen backend does not work or wrong. Please make sure that your computer support chosen backend and OpenCV built with right flags.
Cannot open video source
[ INFO:1@5.661] global plugin_loader.impl.hpp:74 cv::plugin::impl::DynamicLib::libraryRelease unload C:\Users\me\src\opencv\.venv\Lib\site-packages\cv2\opencv_videoio_ffmpeg490_64.dll


    


    Here is the output of cv2.getBuildInformation()

    


    General configuration for OpenCV 4.9.0 =====================================
  Version control:               4.9.0

  Platform:
    Timestamp:                   2023-12-31T11:21:12Z
    Host:                        Windows 10.0.17763 AMD64
    CMake:                       3.24.2
    CMake generator:             Visual Studio 14 2015
    CMake build tool:            MSBuild.exe
    MSVC:                        1900
    Configuration:               Debug Release

  CPU/HW features:
    Baseline:                    SSE SSE2 SSE3
      requested:                 SSE3
    Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2
      requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
      SSE4_1 (16 files):         + SSSE3 SSE4_1
      SSE4_2 (1 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
      FP16 (0 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
      AVX (8 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
      AVX2 (36 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2

  C/C++:
    Built as dynamic libs?:      NO
    C++ standard:                11
    C++ Compiler:                C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe  (ver 19.0.24247.2)
    C++ flags (Release):         /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP  /O2 /Ob2 /DNDEBUG 
    C++ flags (Debug):           /DWIN32 /D_WINDOWS /W4 /GR  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /MP  /Zi /Ob0 /Od /RTC1 
    C Compiler:                  C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
    C flags (Release):           /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP   /O2 /Ob2 /DNDEBUG 
    C flags (Debug):             /DWIN32 /D_WINDOWS /W3  /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi  /fp:precise     /MP /Zi /Ob0 /Od /RTC1 
    Linker flags (Release):      /machine:x64  /NODEFAULTLIB:atlthunk.lib /INCREMENTAL:NO  /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:msvcrtd.lib
    Linker flags (Debug):        /machine:x64  /NODEFAULTLIB:atlthunk.lib /debug /INCREMENTAL  /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcrt.lib
    ccache:                      NO
    Precompiled headers:         YES
    Extra dependencies:          wsock32 comctl32 gdi32 ole32 setupapi ws2_32
    3rdparty dependencies:       libprotobuf ade ittnotify libjpeg-turbo libwebp libpng libtiff libopenjp2 IlmImf zlib ippiw ippicv

  OpenCV modules:
    To be built:                 calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo python3 stitching video videoio
    Disabled:                    java world
    Disabled by dependency:      -
    Unavailable:                 python2 ts
    Applications:                -
    Documentation:               NO
    Non-free algorithms:         NO

  Windows RT support:            NO

  GUI:                           WIN32UI
    Win32 UI:                    YES
    VTK support:                 NO

  Media I/O: 
    ZLib:                        build (ver 1.3)
    JPEG:                        build-libjpeg-turbo (ver 2.1.3-62)
      SIMD Support Request:      YES
      SIMD Support:              NO
    WEBP:                        build (ver encoder: 0x020f)
    PNG:                         build (ver 1.6.37)
    TIFF:                        build (ver 42 - 4.2.0)
    JPEG 2000:                   build (ver 2.5.0)
    OpenEXR:                     build (ver 2.3.0)
    HDR:                         YES
    SUNRASTER:                   YES
    PXM:                         YES
    PFM:                         YES

  Video I/O:
    DC1394:                      NO
    FFMPEG:                      YES (prebuilt binaries)
      avcodec:                   YES (58.134.100)
      avformat:                  YES (58.76.100)
      avutil:                    YES (56.70.100)
      swscale:                   YES (5.9.100)
      avresample:                YES (4.0.0)
    GStreamer:                   NO
    DirectShow:                  YES
    Media Foundation:            YES
      DXVA:                      YES

  Parallel framework:            Concurrency

  Trace:                         YES (with Intel ITT)

  Other third-party libraries:
    Intel IPP:                   2021.11.0 [2021.11.0]
           at:                   D:/a/opencv-python/opencv-python/_skbuild/win-amd64-3.7/cmake-build/3rdparty/ippicv/ippicv_win/icv
    Intel IPP IW:                sources (2021.11.0)
              at:                D:/a/opencv-python/opencv-python/_skbuild/win-amd64-3.7/cmake-build/3rdparty/ippicv/ippicv_win/iw
    Lapack:                      NO
    Eigen:                       NO
    Custom HAL:                  NO
    Protobuf:                    build (3.19.1)
    Flatbuffers:                 builtin/3rdparty (23.5.9)

  OpenCL:                        YES (NVD3D11)
    Include path:                D:/a/opencv-python/opencv-python/opencv/3rdparty/include/opencl/1.2
    Link libraries:              Dynamic load

  Python 3:
    Interpreter:                 C:/hostedtoolcache/windows/Python/3.7.9/x64/python.exe (ver 3.7.9)
    Libraries:                   C:/hostedtoolcache/windows/Python/3.7.9/x64/libs/python37.lib (ver 3.7.9)
    numpy:                       C:/hostedtoolcache/windows/Python/3.7.9/x64/lib/site-packages/numpy/core/include (ver 1.17.0)
    install path:                python/cv2/python-3

  Python (for build):            C:\hostedtoolcache\windows\Python\3.7.9\x64\python.exe

  Java:                          
    ant:                         NO
    Java:                        YES (ver 1.8.0.392)
    JNI:                         C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.392-8/x64/include C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.392-8/x64/include/win32 C:/hostedtoolcache/windows/Java_Temurin-Hotspot_jdk/8.0.392-8/x64/include
    Java wrappers:               NO
    Java tests:                  NO

  Install to:                    D:/a/opencv-python/opencv-python/_skbuild/win-amd64-3.7/cmake-install
-----------------------------------------------------------------


    


    edit : Receiving the stream with ffplay from command line :

    


    >ffplay.exe -i "rtmp://0.0.0.0:8000/live"  -listen 1 -f flv
ffplay version 2024-02-04-git-7375a6ca7b-full_build-www.gyan.dev Copyright (c) 2003-2024 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 36.101 / 58. 36.101
  libavcodec     60. 38.100 / 60. 38.100
  libavformat    60. 20.100 / 60. 20.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 17.100 /  9. 17.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
[rtmp @ 0000018a564ed340] Unexpected stream , expecting livef=0/0
    Last message repeated 1 times
Input #0, flv, from 'rtmp://0.0.0.0:8000/live':KB sq=    0B f=0/0
  Metadata:
    fileSize        : 0
    audiochannels   : 2
    2.1             : false
    3.1             : false
    4.0             : false
    4.1             : false
    5.1             : false
    7.1             : false
    encoder         : obs-output module (libobs version 30.0.2)
  Duration: 00:00:00.00, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 163 kb/s
  Stream #0:1: Video: h264 (Constrained Baseline), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 2560 kb/s, 30 fps, 30 tbr, 1k tbn
   7.54 A-V: -0.024 fd=  18 aq=   24KB vq=  498KB sq=    0B f=0/0


    


  • Split video with ffmpeg segment option is missing frame

    9 février, par Dan

    I’m trying to get the ffmpeg “segment” option to split my video into segments at the Iframes. I'm using ffmpeg V6.1.1.

    


    First I added time stamps to each frame of my video so that when it plays, I can see exactly which frame is being displayed. I used this command :

    


    ffmpeg -i In.mp4 -vf "drawtext=fontfile='C :\Windows\Fonts\Arial.ttf' : text='%frame_num :~ %pts':fontsize=200 : r=25 : x=(w-tw)/2 : y=h-(2*lh) : fontcolor=white : box=1 : boxcolor=0x00000099" -y Out.mp4

    


    Then I used ffprobe to confirm that the video is 30 FPS and the Iframes are as follows :

    


    0.000000
4.933333
10.000000
11.533333
18.866667
24.966667

    


    Based on these Iframe times, I’d expect the following segments :

    


    





    


    


    


    


    


    


    



    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    


    Start Frame Start Time End Frame End Time
    0 0 147 4.900000
    148 4.933333 299 9.966667
    300 10.000000 345 11.500000
    346 11.533333 565 18.833334
    566 18.866667 748 24.933334
    749 24.966667 867 28.906667

    


    


    When I use ffmpeg to split the video into segments with the following command, I get six files as expected :

    


    ffmpeg -i Out.mp4 -f segment -c copy -reset_timestamps 1 -map 0 "Out %d.mp4"

    


    When I play the segments, they are all correct except the first segment file (Out 0.mp4). It seems to be missing the last frame. It contains frames 0 to 146 (4.866667 sec) but should also include frame 147 (4.9 sec). All the other segment files are as expected.

    


    I’ve tried this on several different mp4 videos and they all are missing the last frame on the first segments.

    


    Any idea why my first segment files is missing the last frame of the segment ?

    


    Could this be an ffmpeg bug ?

    


    Thanks for the help !
Dan

    


    Here is my console session with all output :

    


    C:\> ffprobe Out.mp4
ffprobe version 2023-12-21-git-1e42a48e37-full_build-www.gyan.dev Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 36.100 / 58. 36.100
  libavcodec     60. 36.100 / 60. 36.100
  libavformat    60. 20.100 / 60. 20.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 14.100 /  9. 14.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Short 4k video sample - 4K Ultra HD (3840x2160)
    date            : 2014:05:24 19:00:00
    encoder         : Lavf60.20.100
  Duration: 00:00:28.96, start: 0.000000, bitrate: 3181 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3045 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc60.36.100 libx264
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]

C:\ ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries frame=pts_time -of csv=print_section=0 Out.mp4
0.000000,
4.933333
10.000000
11.533333
18.866667
24.966667

C:\ ffmpeg -i Out.mp4 -f segment -c copy -reset_timestamps 1 -map 0 "Out %1d.mp4"
ffmpeg version 2023-12-21-git-1e42a48e37-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      58. 36.100 / 58. 36.100
  libavcodec     60. 36.100 / 60. 36.100
  libavformat    60. 20.100 / 60. 20.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 14.100 /  9. 14.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Short 4k video sample - 4K Ultra HD (3840x2160)
    date            : 2014:05:24 19:00:00
    encoder         : Lavf60.20.100
  Duration: 00:00:28.96, start: 0.000000, bitrate: 3181 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3045 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc60.36.100 libx264
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
[segment @ 00000195bbc52940] Opening 'Out 0.mp4' for writing
Output #0, segment, to 'Out %1d.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : Short 4k video sample - 4K Ultra HD (3840x2160)
    date            : 2014:05:24 19:00:00
    encoder         : Lavf60.20.100
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 3045 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
        encoder         : Lavc60.36.100 libx264
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
Press [q] to stop, [?] for help
[segment @ 00000195bbc52940] Opening 'Out 1.mp4' for writing
[segment @ 00000195bbc52940] Opening 'Out 2.mp4' for writing
[segment @ 00000195bbc52940] Opening 'Out 3.mp4' for writing
[segment @ 00000195bbc52940] Opening 'Out 4.mp4' for writing
[segment @ 00000195bbc52940] Opening 'Out 5.mp4' for writing
[out#0/segment @ 00000195bc3e8cc0] video:10757kB audio:456kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
size=N/A time=00:00:28.86 bitrate=N/A speed= 322x