
Recherche avancée
Autres articles (52)
-
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
Les formats acceptés
28 janvier 2010, parLes commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
ffmpeg -codecs ffmpeg -formats
Les format videos acceptés en entrée
Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
Les formats vidéos de sortie possibles
Dans un premier temps on (...) -
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)
Sur d’autres sites (3511)
-
java.lang.UnsatisfiedLinkError : Couldn't load ffmpeg library findLibrary returned null
22 février 2017, par Muthukumar SubramaniamI am new to live streaming from android to youtube in android. I mentioned my Project Structrue and build the gradle file in android. FFmpeg library could not load in runtime.
Note : I am working in windows 10 and android studio 2.1.2
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
}
defaultConfig {
applicationId "com.ephron.mobilizerapp"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.4"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/']
}
}
sourceSets { main {
jni.srcDirs = ['src/main/jni', 'src/main/jni/libs']
jni.srcDirs = ['libs']
jni.srcDirs = []
} }
}
dependencies {
testCompile 'junit:junit:4.12'
compile files('libs/httpclient-4.5.2.jar')
compile files('libs/httpcore-4.4.4.jar')
compile files('libs/httpmime-4.2.1.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.code.gson:gson:2.2.2'
compile 'com.google.firebase:firebase-messaging:9.2.0'
compile 'testfairy:testfairy-android-sdk:1.+@aar'
compile 'com.android.support:multidex:1.0.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'cn.aigestudio.wheelpicker:WheelPicker:1.1.2'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.apis:google-api-services-youtube:v3-rev182-1.22.0'
compile 'com.google.api-client:google-api-client-android:1.22.0'
compile 'com.google.http-client:google-http-client-gson:1.19.0'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.android.gms:play-services-gcm:10.0.1'
compile files('libs/ffmpeg-android.jar')
}
apply plugin: 'com.google.gms.google-services'My Project Structure mentioned below Link
https://www.screencast.com/t/E0TFsMUi1
Application.mk file
APP_OPTIM := release
APP_ABI := all
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -fexceptionsAndroid.mk file
#
# Copyright (c) 2014 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
# set NDK_PROJECT_PATH := D:/MobilizerApp/app/src/main/jni
WORKING_DIR := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PATH := $(WORKING_DIR)/../third_party/lame/libmp3lame
LOCAL_MODULE := lame
LOCAL_C_INCLUDES := $(WORKING_DIR)/../third_party/lame/libmp3lame \
$(WORKING_DIR)/../third_party/lame/include
LOCAL_CFLAGS := -DSTDC_HEADERS -std=c99
LOCAL_ARM_MODE := arm
APP_OPTIM := release
LOCAL_SRC_FILES := VbrTag.c \
bitstream.c \
encoder.c \
fft.c \
gain_analysis.c \
id3tag.c \
lame.c \
mpglib_interface.c \
newmdct.c \
presets.c \
psymodel.c \
quantize.c \
quantize_pvt.c \
reservoir.c \
set_get.c \
tables.c \
takehiro.c \
util.c \
vbrquantize.c \
version.c
#include $(BUILD_STATIC_LIBRARY)
include $(BUILD_STATIC_LIBRARY)
#include $(CLEAR_VARS)
#LOCAL_MODULE := mp3lame_a
#LOCAL_STATIC_LIBRARIES := lame
#include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_PATH := $(WORKING_DIR)
LOCAL_MODULE := ffmpeg
LOCAL_CFLAGS := -DHAVE_AV_CONFIG_H -std=c99 -D__STDC_CONSTANT_MACROS -DSTDC_HEADERS -Wno-deprecated-declarations
LOCAL_SRC_FILES := ffmpeg-jni.c
LOCAL_C_INCLUDES := $(WORKING_DIR)/libavcodec $(WORKING_DIR)/libavcodec/arm $(WORKING_DIR)/libavformat $(WORKING_DIR)/libavutil $(WORKING_DIR)/libavutil/arm
LOCAL_STATIC_LIBRARIES := lame
LOCAL_LDLIBS := -llog -lm -lz $(WORKING_DIR)/../third_party/lib/libavformat.a $(WORKING_DIR)/../third_party/lib/libavcodec.a $(WORKING_DIR)/../third_party/lib/libavfilter.a $(WORKING_DIR)/../third_party/lib/libavresample.a $(WORKING_DIR)/../third_party/lib/libswscale.a $(WORKING_DIR)/../third_party/lib/libavutil.a $(WORKING_DIR)/../third_party/lib/libx264.a $(WORKING_DIR)/../third_party/lib/libpostproc.a $(WORKING_DIR)/../third_party/lib/libswresample.a $(WORKING_DIR)/../third_party/lib/libfdk-aac.a
APP_OPTIM := release
include $(BUILD_SHARED_LIBRARY)FFMPEG.Java
package com.ephronsystem.mobilizerapp;
public class Ffmpeg {
static {
System.loadLibrary("ffmpeg");
}
public static native boolean init(int width, int height, int audio_sample_rate, String rtmpUrl);
public static native void shutdown();
// Returns the size of the encoded frame.
public static native int encodeVideoFrame(byte[] yuv_image);
public static native int encodeAudioFrame(short[] audio_data, int length);
} -
A Guide to App Analytics Tools that Drive Growth
7 mars, par Daniel Crough — App AnalyticsMobile apps are big business, generating £438 billion in global revenue between in-app purchases (38%) and ad revenue (60%). And with 96% of apps relying on in-app monetisation, the competition is fierce.
To succeed, app developers and marketers need strong app analytics tools to understand their customers’ experiences and the effectiveness of their development efforts.
This article discusses app analytics, how it works, the importance and benefits of mobile app analytics tools, key metrics to track, and explores five of the best app analytics tools on the market.
What are app analytics tools ?
Mobile app analytics tools are software solutions that provide insights into how users interact with mobile applications. They track user behaviour, engagement and in-app events to reveal what’s working well and what needs improvement.
Insights gained from mobile app analytics help companies make more informed decisions about app development, marketing campaigns and monetisation strategies.
What do app analytics tools do ?
App analytics tools embed a piece of code, called a software development kit (SDK), into an app. These SDKs provide the essential infrastructure for the following functions :
- Data collection : The SDK collects data within your app and records user actions and events, like screen views, button clicks, and in-app purchases.
- Data filtering : SDKs often include mechanisms to filter data, ensuring that only relevant information is collected.
- Data transmission : Once collected and filtered, the SDK securely transmits the data to an analytics server. The SDK provider can host this server (like Firebase or Amplitude), or you can host it on-premise.
- Data processing and analysis : Servers capture, process and analyse large stores of data and turn it into useful information.
- Visualisation and reporting : Dashboards, charts and graphs present processed data in a user-friendly format.
Six ways mobile app analytics tools fuel marketing success and drive product growth
Mobile app analytics tools are vital in driving product development, enhancing user experiences, and achieving business objectives.
#1. Improving user understanding
The better a business understands its customers, the more likely it is to succeed. For mobile apps, that means understanding how and why people use them.
Mobile analytics tools provide detailed insights into user behaviours and preferences regarding apps. This knowledge helps marketing teams create more targeted messaging, detailed customer journey maps and improve user experiences.
It also helps product teams understand the user experience and make improvements based on those insights.
For example, ecommerce companies might discover that users in a particular area are more likely to buy certain products. This allows the company to tailor its offers and promotions to target the audience segments most likely to convert.
#2 Optimising monetisation strategies for increased revenue and user retention
In-app purchases and advertising make up 38% and 60% of mobile app revenue worldwide, respectively. App analytics tools provide insights companies need to optimise app monetisation by :
- Analysing purchase patterns to identify popular products and understand pricing sensitivities.
- Tracking in-app behaviour to identify opportunities for enhancing user engagement.
App analytics can track key metrics like visit duration, user flow, and engagement patterns. These metrics provide critical information about user experiences and can help identify areas for improvement.
How meaningful are the impacts ?
Duolingo, the popular language learning app, reported revenue growth of 45% and an increase in daily active users (DAU) of 65% in its Q4 2023 financial report. The company attributed this success to its in-house app analytics platform.
#3. Understanding user experiences
Mobile app analytics tools track the performance of user interactions within your app, such as :
- Screen views : Which screens users visit most frequently
- User flow : How users navigate through your app
- Session duration : How long users spend in your app
- Interaction events : Which buttons, features, and functions users engage with most
Knowing how users interact with your app can help refine your approach, optimise your efforts, and drive more conversions.
#4. Personalising user experiences
A recent McKinsey survey showed that 71% of users expect personalised app experiences. Product managers must stay on top of this since 76% of users get frustrated if they don’t receive the personalisation they expect.
Personalisation on mobile platforms requires data capture and analysis. Mobile analytics platforms can provide the data to personalise the user onboarding process, deliver targeted messages and recommend relevant content or offers.
Spotify is a prime example of personalisation done right. A recent case study by Pragmatic Institute attributed the company’s growth to over 500 million active daily users to its ability to capture, analyse and act on :
- Search behaviour
- Individual music preferences
- Playlist data
- Device usage
- Geographical location
The streaming service uses its mobile app analytics software to turn this data into personalised music recommendations for its users. Spotify also has an in-house analytics tool called Spotify Premium Analytics, which helps artists and creators better understand their audience.
#5. Enhancing app performance
App analytics tools can help identify performance issues that might be affecting user experience. By monitoring metrics like load time and app performance, developers can pinpoint areas that need improvement.
Performance optimisation is crucial for user retention. According to Google research, 53% of mobile site visits are abandoned if pages take longer than three seconds to load. While this statistic refers to websites, similar principles apply to apps—users expect fast, responsive experiences.
Analytics data can help developers prioritise performance improvements by showing which screens or features users interact with most frequently, allowing teams to focus their optimisation efforts where they’ll have the greatest impact.
#6. Identifying growth opportunities
App analytics tools can reveal untapped opportunities for growth by highlighting :
- Features users engage with most
- Underutilised app sections that might benefit from redesign
- Common user paths that could be optimised
- Moments where users tend to drop off
This intelligence helps product teams make data-informed decisions about future development priorities, feature enhancements, and potential new offerings.
For example, a streaming service might discover through analytics that users who create playlists have significantly higher retention rates. This insight could lead to development of enhanced playlist functionality to encourage more users to create them, ultimately boosting overall retention.
Key app metrics to track
Using mobile analytics tools, you can track dozens of key performance indicators (KPIs) that measure everything from customer engagement to app performance. This section focuses on the most important KPIs for app analytics, classified into three categories :
- App performance KPIs
- User engagement KPIs
- Business impact KPIs
While the exact metrics to track will vary based on your specific goals, these fundamental KPIs form the foundation of effective app analytics.
App performance KPIs
App performance metrics tell you whether an app is reliable and operating properly. They help product managers identify and address technical issues that may negatively impact user experiences.
Some key metrics to assess performance include :
- Screen load time : How quickly screens load within your app
- App stability : How often your app crashes or experiences errors
- Response time : How quickly your app responds to user interactions
- Network performance : How efficiently your app handles data transfers
User engagement KPIs
Engagement KPIs provide insights into how users interact with an app. These metrics help you understand user behaviour and make UX improvements.
Important engagement metrics include :
- Returning visitors : A measure of how often users return to an app
- Visit duration : How long users spend in your app per session
- User flow : Visualisation of the paths users take through your app, offering insights into navigation patterns
- Event tracking : Specific interactions users have with app elements
- Screen views : Which screens are viewed most frequently
Business impact KPIs
Business impact KPIs connect app analytics to business outcomes, helping demonstrate the app’s value to the organisation.
Key business impact metrics include :
- Conversion events : Completion of desired actions within your app
- Goal completions : Tracking when users complete specific objectives
- In-app purchases : Monitoring revenue from within the app
- Return on investment : Measuring the business value generated relative to development costs
Privacy and app analytics : A delicate balance
While app analytics tools can be a rich source of user data, they must be used responsibly. Tracking user in-app behaviour and collecting user data, especially without consent, can raise privacy concerns and erode user trust. It can also violate data privacy laws like the GDPR in Europe or the OCPA, FDBR and TDPSA in the US.
With that in mind, it’s wise to choose user-tracking tools that prioritise user privacy while still collecting enough data for reliable analysis.
Matomo is a privacy-focused web and app analytics solution that allows you to collect and analyse user data while respecting user privacy and following data protection rules like GDPR.
The five best app analytics tools to prove marketing value
In this section, we’ll review the five best app analytics tools based on their features, pricing and suitability for different use cases.
Matomo — Best for privacy-compliant app analytics
Matomo app analytics is a powerful, open-source platform that prioritises data privacy and compliance.
It offers a suite of features for tracking user engagement and conversions across websites, mobile apps and intranets.
Key features
- Complete data ownership : Full control over your analytics data with no third-party access
- User flow analysis : Track user journeys across different screens in your app
- Custom event tracking : Monitor specific user interactions with customisable events
- Ecommerce tracking : Measure purchases and product interactions
- Goal conversion monitoring : Track completion of important user actions
- Unified analytics : View web and app analytics in one platform for a complete digital picture
Benefits
- Eliminate compliance risks without sacrificing insights
- Get accurate data with no sampling or data manipulation
- Choose between self-hosting or cloud deployment
- Deploy one analytics solution across your digital properties (web and app) for a single source of truth
Pricing
Plan Price Cloud Starts at £19/month On-Premise Free Matomo is a smart choice for businesses that value data privacy and want complete control over their analytics data. It’s particularly well-suited for organisations in highly regulated industries, like banking.
While Matomo’s app analytics features focus on core analytics capabilities, its privacy-first approach offers unique advantages. For organisations already using Matomo for web analytics, extending to mobile creates a unified analytics ecosystem with consistent privacy standards across all digital touchpoints, giving organisations a complete picture of the customer journey.
Firebase — Best for Google services integration
Firebase is the mobile app version of Google Analytics. It’s the most popular app analytics tool on the market, with over 99% of Android apps and 77% of iOS apps using Firebase.
Firebase is popular because it works well with other Google services. It also has many features, like crash reporting, A/B testing and user segmentation.
Pricing
Plan Price Spark Free Blaze Pay-as-you-go based on usage Custom Bespoke pricing for high-volume enterprise users Adobe Analytics — Best for enterprise app analytics
Adobe Analytics is an enterprise-grade analytics solution that provides valuable insights into user behaviour and app performance.
It’s part of the Adobe Marketing Cloud and integrates easily with other Adobe products. Adobe Analytics is particularly well-suited for large organisations with complex analytics needs.
Pricing
Plan Price Select Pricing on quote Prime Pricing on quote Ultimate Pricing on quote While you must request a quote for pricing, Scandiweb puts Adobe Analytics at £2,000/mo–£2,500/mo for most companies, making it an expensive option.
Apple App Analytics — Best for iOS app analysis
Apple App Analytics is a free, built-in analytics tool for iOS app developers.
This analytics platform provides basic insights into user engagement, app performance and marketing campaigns. It has fewer features than other tools on this list, but it’s a good place for iOS developers who want to learn how their apps work.
Pricing
Apple Analytics is free.
Amplitude — Best for product analytics
Amplitude is a product analytics platform that helps businesses understand user behaviour and build better products.
It excels at tracking user journeys, identifying user segments and measuring the impact of product changes. Amplitude is a good choice for product managers and data analysts who want to make informed decisions about product development.
Pricing
Plan Price Starter Free Plus From £49/mo Growth Pricing on quote Choose Matomo’s app analytics to unlock growth
App analytics tools help marketers and product development teams understand user experiences, improve app performance and enhance products. Some of the best app analytics tools available for 2025 include Matomo, Firebase and Amplitude.
However, as you evaluate your options, consider taking a privacy-first approach to app data collection and analysis, especially if you’re in a highly regulated industry like banking or fintech. Matomo Analytics offers a powerful and ethical solution that allows you to gain valuable insights while respecting user privacy.
Ready to take control of your app analytics ? Start your 21-day free trial.
-
ffmpeg takes too long to start
17 octobre 2020, par SuspendedI have this command in python script, in a loop :


ffmpeg -i somefile.mp4 -ss 00:03:12 -t 00:00:35 piece.mp4 -loglevel error -stats



It cuts out pieces of input file (-i). Input filename, as well as start time (-ss) and length of the piece I cut out (-t) varies, so it reads number of mp4 files and cuts out number of pieces from each one. During execution of the script it might be called around 100 times. My problem is that each time before it starts, there is a delay of 6-15 seconds and it adds up to significant time. How can I get it to start immediately ?


Initially I thought it was process priority problem, but I noticed that even during the "pause", all processors work at 100%, so apparently some work is being done.


The script (process_videos.py) :


import subprocess
import sys
import math
import time

class TF:
 """TimeFormatter class (TF).
This class' reason for being is to convert time in short
form, e.g. 1:33, 0:32, or 23 into long form accepted by
mp4cut function in bash, e.g. 00:01:22, 00:00:32, etc"""

def toLong(self, shrt):
 """Converts time to its long form"""
 sx = '00:00:00'
 ladd = 8 - len(shrt)
 n = sx[:ladd] + shrt
 return n

def toShort(self, lng):
 """Converts time to short form"""
 if lng[0] == '0' or lng[0] == ':':
 return self.toShort(lng[1:])
 else:
 return lng

def toSeconds(self, any_time):
 """Converts time to seconds"""
 if len(any_time) < 3:
 return int(any_time)
 tt = any_time.split(':')
 if len(any_time) < 6: 
 return int(tt[0])*60 + int(tt[1])
 return int(tt[0])*3600 + int(tt[1])*60 + int(tt[2])

def toTime(self, secsInt):
 """"""
 tStr = ''
 hrs, mins, secs = 0, 0, 0
 if secsInt >= 3600:
 hrs = math.floor(secsInt / 3600)
 secsInt = secsInt % 3600
 if secsInt >= 60:
 mins = math.floor(secsInt / 60)
 secsInt = secsInt % 60
 secs = secsInt
 return str(hrs).zfill(2) + ':' + str(mins).zfill(2) + ':' + str(secs).zfill(2)

def minus(self, t_start, t_end):
 """"""
 t_e = self.toSeconds(t_end)
 t_s = self.toSeconds(t_start)
 t_r = t_e - t_s
 hrs, mins, secs = 0, 0, 0
 if t_r >= 3600:
 hrs = math.floor(t_r / 3600)
 t_r = t_r - (hrs * 3600)
 if t_r >= 60:
 mins = math.floor(t_r / 60)
 t_r = t_r - (mins * 60)
 secs = t_r
 hrsf = str(hrs).zfill(2)
 minsf = str(mins).zfill(2)
 secsf = str(secs).zfill(2)
 t_fnl = hrsf + ':' + minsf + ':' + secsf
 return t_fnl

def go_main():
 tf = TF()
 vid_n = 0
 arglen = len(sys.argv)
 if arglen == 2:
 with open(sys.argv[1], 'r') as f_in:
 lines = f_in.readlines()
 start = None
 end = None
 cnt = 0
 for line in lines:
 if line[:5] == 'BEGIN':
 start = cnt
 if line[:3] == 'END':
 end = cnt
 cnt += 1
 if start == None or end == None:
 print('Invalid file format. start = {}, end = {}'.format(start,end))
 return
 else:
 lines_r = lines[start+1:end]
 del lines
 print('videos to process: {}'.format(len(lines_r)))
 f_out_prefix = ""
 for vid in lines_r:
 vid_n += 1
 print('\nProcessing video {}/{}'.format(vid_n, len(lines_r)))
 f_out_prefix = 'v' + str(vid_n) + '-'
 dat = vid.split('!')[1:3]
 title = dat[0]
 dat_t = dat[1].split(',')
 v_pieces = len(dat_t)
 piece_n = 0
 video_pieces = []
 cmd1 = "echo -n \"\" > tmpfile"
 subprocess.run(cmd1, shell=True) 
 print(' new tmpfile created')
 for v_times in dat_t:
 piece_n += 1
 f_out = f_out_prefix + str(piece_n) + '.mp4'
 video_pieces.append(f_out)
 print(' piece filename {} added to video_pieces list'.format(f_out))
 v_times_spl = v_times.split('-')
 v_times_start = v_times_spl[0]
 v_times_end = v_times_spl[1]
 t_st = tf.toLong(v_times_start)
 t_dur = tf.toTime(tf.toSeconds(v_times_end) - tf.toSeconds(v_times_start))
 cmd3 = ["ffmpeg", "-i", title, "-ss", t_st, "-t", t_dur, f_out, "-loglevel", "error", "-stats"]
 print(' cutting out piece {}/{} - {}'.format(piece_n, len(dat_t), t_dur))
 subprocess.run(cmd3)
 for video_piece_name in video_pieces:
 cmd4 = "echo \"file " + video_piece_name + "\" >> tmpfile"
 subprocess.run(cmd4, shell=True)
 print(' filename {} added to tmpfile'.format(video_piece_name))
 vname = f_out_prefix[:-1] + ".mp4"
 print(' name of joined file: {}'.format(vname))
 cmd5 = "ffmpeg -f concat -safe 0 -i tmpfile -c copy joined.mp4 -loglevel error -stats"
 to_be_joined = " ".join(video_pieces)
 print(' joining...')
 join_cmd = subprocess.Popen(cmd5, shell=True)
 join_cmd.wait()
 print(' joined!')
 cmd6 = "mv joined.mp4 " + vname
 rename_cmd = subprocess.Popen(cmd6, shell=True)
 rename_cmd.wait()
 print(' File joined.mp4 renamed to {}'.format(vname))
 cmd7 = "rm " + to_be_joined
 rm_cmd = subprocess.Popen(cmd7, shell=True)
 rm_cmd.wait()
 print('rm command completed - pieces removed')
 cmd8 = "rm tmpfile"
 subprocess.run(cmd8, shell=True)
 print('tmpfile removed')
 print('All done')
 else:
 print('Incorrect number of arguments')

############################
if __name__ == '__main__':
 go_main()



process_videos.py is called from bash terminal like this :


$ python process_videos.py video_data 



video_data file has the following format :


BEGIN
!first_video.mp4!3-23,55-1:34,2:01-3:15,3:34-3:44!
!second_video.mp4!2-7,12-44,1:03-1:33!
END



My system details :


System: Host: snowflake Kernel: 5.4.0-52-generic x86_64 bits: 64 Desktop: Gnome 3.28.4
 Distro: Ubuntu 18.04.5 LTS
Machine: Device: desktop System: Gigabyte product: N/A serial: N/A
Mobo: Gigabyte model: Z77-D3H v: x.x serial: N/A BIOS: American Megatrends v: F14 date: 05/31/2012
CPU: Quad core Intel Core i5-3570 (-MCP-) cache: 6144 KB 
 clock speeds: max: 3800 MHz 1: 1601 MHz 2: 1601 MHz 3: 1601 MHz 4: 1602 MHz
Drives: HDD Total Size: 1060.2GB (55.2% used)
 ID-1: /dev/sda model: ST31000524AS size: 1000.2GB
 ID-2: /dev/sdb model: Corsair_Force_GT size: 60.0GB
Partition: ID-1: / size: 366G used: 282G (82%) fs: ext4 dev: /dev/sda1
 ID-2: swap-1 size: 0.70GB used: 0.00GB (0%) fs: swap dev: /dev/sda5
Info: Processes: 313 Uptime: 16:37 Memory: 3421.4/15906.9MB Client: Shell (bash) inxi: 2.3.56




UPDATE :


Following Charles' advice, I used performance sampling :


# perf record -a -g sleep 180



...and here's the report :


Samples: 74K of event 'cycles', Event count (approx.): 1043554519767
 Children Self Command Shared Object
- 50.56% 45.86% ffmpeg libavcodec.so.57.107.100 
 - 3.10% 0x4489480000002825 
 0.64% 0x7ffaf24b92f0 
 - 2.12% 0x5f7369007265646f 
 av_default_item_name 
 1.39% 0 
- 44.48% 40.59% ffmpeg libx264.so.152 
 5.78% x264_add8x8_idct_avx2.skip_prologue 
 3.13% x264_add8x8_idct_avx2.skip_prologue 
 2.91% x264_add8x8_idct_avx2.skip_prologue 
 2.31% x264_add8x8_idct_avx.skip_prologue 
 2.03% 0 
 1.78% 0x1 
 1.26% x264_add8x8_idct_avx2.skip_prologue 
 1.09% x264_add8x8_idct_avx.skip_prologue 
 1.06% x264_me_search_ref 
 0.97% x264_add8x8_idct_avx.skip_prologue 
 0.60% x264_me_search_ref 
- 38.01% 0.00% ffmpeg [unknown] 
 4.10% 0 
 - 3.49% 0x4489480000002825 
 0.70% 0x7ffaf24b92f0 
 0.56% 0x7f273ae822f0 
 0.50% 0x7f0c4768b2f0 
 - 2.29% 0x5f7369007265646f 
 av_default_item_name 
 1.99% 0x1 
 10.13% 10.12% ffmpeg [kernel.kallsyms] 
- 3.14% 0.73% ffmpeg libavutil.so.55.78.100 
 2.34% av_default_item_name 
- 1.73% 0.21% ffmpeg libpthread-2.27.so 
 - 0.70% pthread_cond_wait@@GLIBC_2.3.2 
 - 0.62% entry_SYSCALL_64_after_hwframe 
 - 0.62% do_syscall_64 
 - 0.57% __x64_sys_futex 
 0.52% do_futex 
 0.93% 0.89% ffmpeg libc-2.27.so 
- 0.64% 0.64% swapper [kernel.kallsyms] 
 0.63% secondary_startup_64 
 0.21% 0.18% ffmpeg libavfilter.so.6.107.100 
 0.20% 0.11% ffmpeg libavformat.so.57.83.100 
 0.12% 0.11% ffmpeg ffmpeg 
 0.11% 0.00% gnome-terminal- [unknown] 
 0.09% 0.07% ffmpeg libm-2.27.so 
 0.08% 0.07% ffmpeg ld-2.27.so 
 0.04% 0.04% gnome-terminal- libglib-2.0.so.0.5600.4