
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (47)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)
Sur d’autres sites (6370)
-
The screen recorder utility has failed to store the actual screen recording iOS
31 mai 2023, par manojI am getting the below issue when I run my code to record the screen on failure.


An unknown server-side error occurred while processing the command. Original error : The screen recorder utility has failed to store the actual screen recording at '/var/folders/js/h2_7h9bj1fj8cn19tqcm8hnw0000gn/T/202341-30610-87cfav.bsg2u/appium_3f7703.mp4'


Note : This issue is occurring during the tearDown.


the code is showing stop recording is failing and this issue is occurring for only one test class


public static File screenRecording(String prefix) throws IOException {
 File classpathRoot = new File(System.getProperty("user.dir"));
 String screenRec = ((CanRecordScreen) driver).stopRecordingScreen();
 byte[] screenRecord = Base64.decodeBase64(screenRec);
 String destinationPath = classpathRoot.getAbsolutePath() + "/screenRecordings/" + driver.getPlatformName()
 + " Video " + prefix + " " + new Date() + ".mp4";
 Path filePath = Paths.get(destinationPath);
 Files.write(filePath, screenRecord);
 File recordedFile = FileUtils.getFile(String.valueOf(filePath));
 return recordedFile;
 }



The same thing when I run it successfully is passing in other test


This is the thread that I was reffering


Appium stack


[ INFO ] 2023-05-26 13:38:51.636 [TestHelpers.PropertiesHelper.getRestartDeviceProperty(PropertiesHelper.java:181)] - Loading the 'RestartDevice' Property from the 'appiumTests.properties' file
[ INFO ] 2023-05-26 13:38:51.641 [TestFixtures.BaseTestFixture.globalSetup(BaseTestFixture.java:81)] - Building Appium Server...
[ INFO ] 2023-05-26 13:38:51.733 [TestFixtures.BaseTestFixture.globalSetup(BaseTestFixture.java:88)] - Appium server is built.
[ INFO ] 2023-05-26 13:38:51.733 [TestFixtures.BaseTestFixture.globalSetup(BaseTestFixture.java:89)] - Starting appium server...
[Appium] Welcome to Appium v1.22.2
[Appium] Non-default server args:
[Appium] port: 3022
[Appium] logFile: /Users/subh/IdeaProjects/tile_mobile_automation/logs/appium.log
[Appium] loglevel: info
[Appium] relaxedSecurityEnabled: true
[Appium] Appium REST http interface listener started on 0.0.0.0:3022
[HTTP] --> GET /wd/hub/status
[HTTP] {}
[HTTP] <-- GET /wd/hub/status 200 5 ms - 68
[HTTP] 
[ INFO ] 2023-05-26 13:38:53.069 [TestFixtures.BaseTestFixture.globalSetup(BaseTestFixture.java:91)] - Appium server started.

[ffmpeg] Output #0, mp4, to '/var/folders/js/h2_7h9bj1fj8cn19tqcm8hnw0000gn/T/2023426-9341-y22m7g.0jfd/appium_eca508.mp4':
[ffmpeg] Metadata:
[ffmpeg] encoder : Lavf59.27.100
[ffmpeg] Stream #0:0: Video: h264 (avc1 / 0x31637661), yuvj420p(pc, bt470bg/unknown/unknown, progressive), 720x1280 [SAR 520:633 DAR 195:422], q=2-31, 25 fps, 12800 tbn
[ffmpeg] Metadata:
[ffmpeg] encoder : Lavc59.37.100 libx264
[ffmpeg] 
[ffmpeg] Side data:
[ffmpeg] cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
[ffmpeg] 
[XCUITest] Starting screen capture on the device 'xxxxxxxx-xxxxxxxxxxxxxxxx' with command: 'ffmpeg -f mjpeg -i http://127.0.0.1:9100 -vf scale=720:1280 -vcodec h264 -y /var/folders/js/h2_7h9bj1fj8cn19tqcm8hnw0000gn/T/2023426-9341-y22m7g.0jfd/appium_eca508.mp4'. Will timeout in 1800000ms
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/start_recording_screen 200 621 ms - 12
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/device/terminate_app
[HTTP] {"bundleId":"com.apple.Preferences"}
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/device/terminate_app 200 6 ms - 15
[HTTP] 
[ INFO ] 2023-05-26 13:39:15.082 [TestFixtures.BaseTestFixture.setUp(BaseTestFixture.java:200)] - App Version is 2.115.0(7936)
<-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element 200 208 ms - 137
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/CC010000-0000-0000-1709-000000000000/click
[HTTP] {"id":"CC010000-0000-0000-1709-000000000000"}
[W3C (9a4d93a9)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Replacing sessionId 643ECEF8-D0E3-47D0-AE3D-3FC884C69235 with 9a4d93a9-b723-4e2e-abad-db859e5efeed
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/CC010000-0000-0000-1709-000000000000/click 200 805 ms - 65
[HTTP] 
[HTTP] --> GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context
[HTTP] {}
[HTTP] <-- GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context 200 1 ms - 22
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element
[HTTP] {"using":"id","value":"OK"}
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element 200 309 ms - 137
[HTTP] 
[HTTP] --> GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/39020000-0000-0000-1709-000000000000/displayed
[HTTP] {}
[W3C (9a4d93a9)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Replacing sessionId 643ECEF8-D0E3-47D0-AE3D-3FC884C69235 with 9a4d93a9-b723-4e2e-abad-db859e5efeed
[HTTP] <-- GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/39020000-0000-0000-1709-000000000000/displayed 200 134 ms - 65
[HTTP] 
[HTTP] --> GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context
[HTTP] {}
[HTTP] <-- GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context 200 1 ms - 22
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element
[HTTP] {"using":"id","value":"OK"}
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element 200 253 ms - 137
[HTTP] 
[HTTP] --> GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/39020000-0000-0000-1709-000000000000/text
[HTTP] {}
[W3C (9a4d93a9)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Replacing sessionId 643ECEF8-D0E3-47D0-AE3D-3FC884C69235 with 9a4d93a9-b723-4e2e-abad-db859e5efeed
[HTTP] <-- GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/39020000-0000-0000-1709-000000000000/text 200 117 ms - 65
[HTTP] 
[HTTP] --> GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context
[HTTP] {}
[HTTP] <-- GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context 200 1 ms - 22
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element
[HTTP] {"using":"id","value":"OK"}
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element 200 247 ms - 137
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/39020000-0000-0000-1709-000000000000/click
[HTTP] {"id":"39020000-0000-0000-1709-000000000000"}
[W3C (9a4d93a9)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Replacing sessionId 643ECEF8-D0E3-47D0-AE3D-3FC884C69235 with 9a4d93a9-b723-4e2e-abad-db859e5efeed
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/39020000-0000-0000-1709-000000000000/click 200 778 ms - 65
[HTTP] 
[HTTP] --> GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context
[HTTP] {}
[HTTP] <-- GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/context 200 1 ms - 22
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element
[HTTP] {"using":"id","value":"btn_add_tile"}
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element 200 285 ms - 137
[HTTP] 
[HTTP] --> GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/06010000-0000-0000-1709-000000000000/displayed
[HTTP] {}
[W3C (9a4d93a9)] Driver proxy active, passing request on via HTTP proxy
[WD Proxy] Replacing sessionId 643ECEF8-D0E3-47D0-AE3D-3FC884C69235 with 9a4d93a9-b723-4e2e-abad-db859e5efeed
[HTTP] <-- GET /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/element/06010000-0000-0000-1709-000000000000/displayed 200 133 ms - 65
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/app/reset
[HTTP] {}
[DevCon Factory] Releasing connections for xxxxxxxx-xxxxxxxxxxxxxxxx device on 9100 port number
[DevCon Factory] No cached connections have been found
[DevCon Factory] Releasing connections for xxxxxxxx-xxxxxxxxxxxxxxxx device on any port number
[DevCon Factory] Found cached connections to release: ["00008110-0004150236E8401E:8100"]
[DevCon Factory] Releasing the listener for 'xxxxxxxx-xxxxxxxxxxxxxxxx:8100'
[BaseDriver] The following capabilities are not standard capabilities and should have an extension prefix:
[BaseDriver] appPushTimeout
[BaseDriver] app
[BaseDriver] automationName
[BaseDriver] deviceName
[BaseDriver] fullReset
[BaseDriver] newCommandTimeout
[BaseDriver] noReset
[BaseDriver] platformVersion
[BaseDriver] processArguments
[BaseDriver] showXcodeLog
[BaseDriver] udid
[BaseDriver] xcodeOrgId
[BaseDriver] xcodeSigningId
[BaseDriver] Session created with session id: 7950b9ef-eac2-4169-a035-2d183deacf68
[XCUITest] Determining device to run tests on: udid: 'xxxxxxxx-xxxxxxxxxxxxxxxx', real device: true
[XCUITest] Normalized platformVersion capability value '16.4.1' to '16.4'
[BaseDriver] Using local app '/Users/subh/IdeaProjects/tile_mobile_automation/apps/tile_appstore_adhoc.ipa'
[BaseDriver] Will reuse previously cached application at '/var/folders/js/h2_7h9bj1fj8cn19tqcm8hnw0000gn/T/2023426-9341-af6qqi.jfr2v/tile.app'
[WebDriverAgent] Using WDA path: '/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent'
[WebDriverAgent] Using WDA agent: '/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj'
[XCUITest] Setting up real device
[XCUITest] App installation succeeded after 14402ms
[DevCon Factory] Requesting connection for device xxxxxxxx-xxxxxxxxxxxxxxxx on local port 8100, device port 8100
[DevCon Factory] Successfully requested the connection for xxxxxxxx-xxxxxxxxxxxxxxxx:8100
[WebDriverAgent] Will reuse previously cached WDA instance at 'http://127.0.0.1:8100/' with 'com.facebook.WebDriverAgentRunner'. Set the wdaLocalPort capability to a value different from 8100 if this is an undesired behavior.
[WebDriverAgent] Using provided WebdriverAgent at 'http://127.0.0.1:8100/'
[WD Proxy] Determined the downstream protocol as 'W3C'
[XCUITest] Skipping setting of the initial display orientation. Set the "orientation" capability to either "LANDSCAPE" or "PORTRAIT", if this is an undesired behavior.
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/app/reset 200 18735 ms - 14
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/device/terminate_app
[HTTP] {"bundleId":"com.apple.Preferences"}
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/device/terminate_app 200 1046 ms - 14
INFO: Loading the 'SaveVideoOnSuccess' Property from the 'appiumTests.properties' file
[HTTP] 
[HTTP] --> POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/stop_recording_screen
[HTTP] {}
[DevCon Factory] Releasing connections for xxxxxxxx-xxxxxxxxxxxxxxxx device on 9100 port number
[DevCon Factory] No cached connections have been found
[XCUITest] The screen recorder utility has failed to store the actual screen recording at '/var/folders/js/h2_7h9bj1fj8cn19tqcm8hnw0000gn/T/2023426-9341-y22m7g.0jfd/appium_eca508.mp4'
[DevCon Factory] Releasing connections for xxxxxxxx-xxxxxxxxxxxxxxxx device on 9100 port number
[DevCon Factory] No cached connections have been found
[HTTP] <-- POST /wd/hub/session/9a4d93a9-b723-4e2e-abad-db859e5efeed/appium/stop_recording_screen 500 14 ms - 841
[HTTP] 

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: The screen recorder utility has failed to store the actual screen recording at '/var/folders/js/h2_7h9bj1fj8cn19tqcm8hnw0000gn/T/2023426-9341-y22m7g.0jfd/appium_eca508.mp4'
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'localhost', ip: 'fe80:0:0:0:8c8:c2c0:abb2:3b1a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '11.2', java.version: '11.0.11'
Driver info: io.appium.java_client.ios.IOSDriver
Capabilities {app: /Users/subh/IdeaProjects/ti..., appPushTimeout: 50000, automationName: XCUITest, browserName: , databaseEnabled: false, deviceName: Tile DEV QA?s iPhone, fullReset: true, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 30, noReset: false, platform: MAC, platformName: ios, platformVersion: 16.4.1, processArguments: {arguments: -com.apple.CoreData.Concurr...}, showXcodeLog: true, takesScreenshot: true, udid: xxxxxxxx-xxxxxxxxxxxxxxxx, webStorageEnabled: false, xcodeOrgId: XK64B7G5HB, xcodeSigningId: iPhone Developer}
Session ID: 9a4d93a9-b723-4e2e-abad-db859e5efeed

 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
 at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
 at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
 at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
 at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
 at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
 at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
 at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
 at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:45)
 at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
 at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
 at io.appium.java_client.screenrecording.CanRecordScreen.stopRecordingScreen(CanRecordScreen.java:72)
 at TestFixtures.BaseTestFixture.tearDown(BaseTestFixture.java:253)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:566)
 at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:135)
 at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:65)
 at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:381)
 at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:319)
 at org.testng.internal.invokers.TestInvoker.runConfigMethods(TestInvoker.java:803)
 at org.testng.internal.invokers.TestInvoker.runAfterConfigurations(TestInvoker.java:772)
 at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:748)
 at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:220)
 at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
 at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:945)
 at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:193)
 at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
 at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
 at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
 at org.testng.TestRunner.privateRun(TestRunner.java:808)
 at org.testng.TestRunner.run(TestRunner.java:603)
 at org.testng.SuiteRunner.runTest(SuiteRunner.java:429)
 at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:423)
 at org.testng.SuiteRunner.privateRun(SuiteRunner.java:383)
 at org.testng.SuiteRunner.run(SuiteRunner.java:326)
 at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
 at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
 at org.testng.TestNG.runSuitesSequentially(TestNG.java:1249)
 at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
 at org.testng.TestNG.runSuites(TestNG.java:1092)
 at org.testng.TestNG.run(TestNG.java:1060)
 at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
 at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)





-
Apostrophe issue with FFmpeg
1er mars 2024, par Rohan MolinilloI'm working on a company's project which is vue.js.
There are also code parts in php.
It uses FFmpeg to create a video from multiple videos.
On each video, there is a text type subtitle.
Each text is retrieved from a .txt file
But I have a problem with apostrophes.


If in the subtitle is stored like this ( I'm here ) in the txt file, on the video there will be written ( Im ).
The apostrophe is removed and the rest of the text too ( here ) will not be displayed.


I'm new to php and ffmpeg, I've been on this problem for almost 3 weeks.


I share the php code with you.


<?php

declare(strict_types=1);

array_shift($argv); // remove script name in $argv[0]

$parameters = array_reduce($argv, function ($carry, $arg) {
 $tokens = explode('=', $arg);
 $carry[$tokens[0]] = $tokens[1];
 return $carry;
}, []);

$projectPath = $parameters['projectPath'];
$musicPath = $parameters['musicPath'];

$fontPath = getcwd() . "/public/fonts/cobol/Cobol-Bold.ttf";
$logoPath = getcwd() . "/public/images/saintex.jpg";
$carnetLogoPath = getcwd() . "/public/images/CarnetTitre.jpg";

// Adding descriptions for each clip and fade in and fade out filters
$clipsToDescribe = glob("$projectPath/*.webm");
$clipFrameRate = (int) shell_exec("cd $projectPath && ffprobe -v error -select_streams v -of default=noprint_wrappers=1:nokey=1 -show_entries stream=r_frame_rate $clipsToDescribe[0]");
$clipFrameRate = $clipFrameRate > 60 ? 30 : $clipFrameRate;

foreach ($clipsToDescribe as $key => $clipToDescribe) {
 $clipIndex = $key + 1;
 $clipFrames = (int) shell_exec("cd $projectPath && ffprobe -v error -select_streams v:0 -count_packets -show_entries stream=nb_read_packets -of csv=p=0 $clipToDescribe");
 $clipDuration = (float) ($clipFrames / $clipFrameRate) - 0.5;
 file_put_contents("$projectPath/clip{$clipIndex}_desc.txt", addslashes($parameters["clip{$clipIndex}_desc"]));
 shell_exec("cd $projectPath && ffmpeg -i $clipToDescribe -vf 'drawtext=fontfile=$fontPath: textfile=clip{$clipIndex}_desc.txt: fontcolor=white: fontsize=46: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=(h-text_h-50): fix_bounds=true, fade=t=in:st=0:d=0.3,fade=t=out:st=$clipDuration:d=0.3' -b:v 3000K -b:a 192K clip{$clipIndex}.webm");
}
array_map('unlink', glob("$projectPath/*desc.txt"));

shell_exec("cd $projectPath && ffmpeg -t 2 -f lavfi -i color=c=black:s=1280x720 -r 30 blank.webm");
shell_exec("cd $projectPath && ffmpeg -i blank.webm -i $carnetLogoPath -filter_complex '[0:v][1:v] overlay=(main_w/2)-(overlay_w/2):(main_h/2)-(overlay_h/2)' -pix_fmt yuv420p -c:a copy logo.webm");



$workshop = $parameters["workshop_type"];
$title = $parameters["title"];
shell_exec("cd $projectPath && ffmpeg -f lavfi -i color=size=1280x720:duration=3:rate=30:color=black -vf 'drawtext=text=$workshop:fontfile=$fontPath:fontcolor=white:fontsize=46:x=(w-text_w)/2:y=(h-text_h)/2, drawtext=text=$title:fontfile=$fontPath:fontcolor=white:fontsize=46:x=(w-text_w)/2:y=((h-text_h)/2)+lh+5' opening.webm");
unlink("$projectPath/blank.webm");

$videosFile = "file 'logo.webm'\n";
$videosFile .= "file 'opening.webm'\n";{
 file_put_contents("$projectPath/project_desc.txt", $parameters["project_desc"]);
 shell_exec("cd $projectPath && ffmpeg -f lavfi -i color=size=1280x720:duration=3:rate=30:color=black -vf 'drawtext=fontfile=$fontPath:fontsize=46:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:textfile=project_desc.txt' project_desc.webm");
 unlink("$projectPath/project_desc.txt");
 $videosFile .= "file 'project_desc.webm'\n";
} 
if(array_key_exists("participants", $parameters)) {
 file_put_contents("$projectPath/participants.txt", "Participants :\n" . $parameters["participants"]);
 shell_exec("cd $projectPath && ffmpeg -f lavfi -i color=size=1280x720:duration=2:rate=30:color=black -vf 'drawtext=fontfile=$fontPath:fontsize=46:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2:textfile=participants.txt' participants.webm");
 unlink("$projectPath/participants.txt");
}

$videos = glob("$projectPath/clip*.webm");
foreach($videos as $video) {
 if($video != "originalVideos") {
 $videosFile .= "file ". "'{$video}'\n";
 }
} 
if(array_key_exists("participants", $parameters)) {
 $videosFile .= "file '$projectPath/participants.webm'";
}
array_map('unlink', glob("$projectPath/*webm.txt"));
file_put_contents("$projectPath/videosFile.txt", $videosFile);
if($musicPath == "/_musics/") {
 echo(shell_exec("cd $projectPath && ffmpeg -f concat -safe 0 -i videosFile.txt -b:v 10000K -crf 20 -b:a 192K output.webm"));
} else {
 echo(shell_exec("cd $projectPath && ffmpeg -f concat -safe 0 -i videosFile.txt -b:v 10000K -crf 20 -b:a 192K assembled.webm && ffmpeg -i assembled.webm -i ../..$musicPath -filter_complex ' [1:0] apad ' -shortest -y -b:v 3000K -b:a 192K output.webm"));
}



I tried many things but each time there were errors.
I think I didn't implement the code properly.


I share you the error


[09:21:02] RECEIVED EVENT: videoRequest
{ Error: Command failed: php ./public/src/generate.php projectPath='/home/rohan/Documents/dodoc2/_projects/its-a-test' musicPath='/_musics/classic.mp3' clip1_name='' clip2_name='' clip3_name='' clip4_name='' clip5_name='' clip1_desc='It's a first test' clip2_desc='It's a second test' clip3_desc='It's a third test' clip4_desc='It's a fourth' clip5_desc='It's a last test' project_desc='' workshop_type='Atelier Robotique' title='It's a test' participants='Molinillo Rohan
'
PHP Warning: Undefined array key 1 in /home/rohan/carnet-numerique/public/src/generate.php on line 9
PHP Warning: Undefined array key 1 in /home/rohan/carnet-numerique/public/src/generate.php on line 9
PHP Warning: Undefined array key 1 in /home/rohan/carnet-numerique/public/src/generate.php on line 9
PHP Warning: Undefined array key 1 in /home/rohan/carnet-numerique/public/src/generate.php on line 9
PHP Warning: Undefined array key 1 in /home/rohan/carnet-numerique/public/src/generate.php on line 9
PHP Warning: Undefined array key 1 in /home/rohan/carnet-numerique/public/src/generate.php on line 9
ffmpeg version 5.1.1-1ubuntu2.1 Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 12 (Ubuntu 12.2.0-3ubuntu1)
 configuration: --prefix=/usr --extra-version=1ubuntu2.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libglslang --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librist --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-sndio --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-shared
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
Input #0, matroska,webm, from '/home/rohan/Documents/dodoc2/_projects/its-a-test/video-20230404-091933-682.webm':
 Metadata:
 encoder : QTmuxingAppLibWebM-0.0.1
 Duration: N/A, start: -0.001000, bitrate: N/A
 Stream #0:0(eng): Video: vp8, yuv420p(progressive), 1280x720, SAR 1:1 DAR 16:9, 1k tbr, 1k tbn (default)
 Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
Stream mapping:
 Stream #0:0 -> #0:0 (vp8 (native) -> vp9 (libvpx-vp9))
 Stream #0:1 -> #0:1 (opus (native) -> opus (libopus))
Press [q] to stop, [?] for help
[libvpx-vp9 @ 0x55952c183000] v1.12.0
Output #0, webm, to 'clip1.webm':
 Metadata:
 encoder : Lavf59.27.100
 Stream #0:0(eng): Video: vp9, yuv420p(tv, bt470bg/unknown/unknown, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 3000 kb/s, 1k fps, 1k tbn (default)
 Metadata:
 encoder : Lavc59.37.100 libvpx-vp9
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1(eng): Audio: opus, 48000 Hz, stereo, flt, 192 kb/s (default)
 Metadata:
 encoder : Lavc59.37.100 libopus
frame= 229 fps= 11 q=12.0 Lsize= 2786kB time=00:00:07.52 bitrate=3034.7kbits/s speed=0.377x 
video:2601kB audio:181kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.175036%
PHP Warning: Undefined array key "clip2_desc" in /home/rohan/carnet-numerique/public/src/generate.php on line 29
PHP Fatal error: Uncaught TypeError: addslashes(): Argument #1 ($string) must be of type string, null given in /home/rohan/carnet-numerique/public/src/generate.php:29
Stack trace:
#0 /home/rohan/carnet-numerique/public/src/generate.php(29): addslashes()
#1 {main}
 thrown in /home/rohan/carnet-numerique/public/src/generate.php on line 29

 at ChildProcess.exithandler (child_process.js:275:12)
 at emitTwo (events.js:126:13)
 at ChildProcess.emit (events.js:214:7)
 at maybeClose (internal/child_process.js:925:16)
 at Socket.stream.socket.on (internal/child_process.js:346:11)
 at emitOne (events.js:116:13)
 at Socket.emit (events.js:211:7)
 at Pipe._handle.close [as _onclose] (net.js:554:12)
 killed: false,
 code: 255,
 signal: null,
 cmd: 'php ./public/src/generate.php projectPath=\'/home/rohan/Documents/dodoc2/_projects/its-a-test\' musicPath=\'/_musics/classic.mp3\' clip1_name=\'\' clip2_name=\'\' clip3_name=\'\' clip4_name=\'\' clip5_name=\'\' clip1_desc=\'It\'s a first test\' clip2_desc=\'It\'s a second test\' clip3_desc=\'It\'s a third test\' clip4_desc=\'It\'s a fourth\' clip5_desc=\'It\'s a last test\' project_desc=\'\' workshop_type=\'Atelier Robotique\' title=\'It\'s a test\' participants=\'Molinillo Rohan\n\'' }



-
libx264 encoder error in ffmpeg android build
26 décembre 2013, par kerim yucelRight now, I have a ffmeg build script which recognizes libx264 and compiles succesfully. I have also compiled x264 and obtained libx264.a library. Both ffmpeg and libx264 are built from source. I can build ffmpeg without libx264 succesfully as well. Below you may find my script which tries to build ffmpeg with libx264.
#!/bin/bash
NDK=~/Android_NDK_r7b
PLATFORM=$NDK/platforms/android-8/arch-arm/
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
alitan=~/x264/ndk7_build
function build_one
{
./configure --target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
--extra-libs="-lgcc " \
--arch=arm \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--extra-cflags=" -I$alitan/include" \
--disable-shared \
--enable-static \
--extra-ldflags=" -L$alitan/lib " \
--enable-version3 \
--enable-gpl \
--disable-doc \
--disable-everything \
--enable-libx264 \
--enable-encoder=libx264 \
$ADDITIONAL_CONFIGURE_FLAG
make clean
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
}
#arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./DONE/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_oneAbove script doesn't give me libx264.a in ffmpeg output builds.Several other scenarios are as follows.
If I enable x264 encoder, I get undefined reference errors to some variables in x264.c (in libavcodec).
If I enable shared in ffmpeg configure, I get an error which says it can't cd to my prefix directory (no permission issues by the way).I am using latest releases of ffmpeg and x264 (cloned the git today) and ndk 7. Ubuntu runs on VM, installed on Windows 7. For further details about my adventure of ffmpeg/x264 porting to Android, you may refer here.
What should I do to use libx264 with ffmpeg ? I kept on trying this script with different configurations, removed all ffmpeg x264 folders and reinstalled them, but to no avail.
Thanks a lot in advance.
EDIT
Below is my x264 build script. It builds fine, gives me the static library and the headers.export ARM_ROOT=/home/mehmet/Android_NDK_r7b
export ARM_INC=$ARM_ROOT/platforms/android-8/arch-arm/usr/include/
export ARM_LIB=$ARM_ROOT/platforms/android-8/arch-arm/usr/lib/
export ARM_TOOL=$ARM_ROOT/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86
export ARM_LIBO=$ARM_TOOL/lib/gcc/arm-linux-androideabi/4.4.3
export PATH=$ARM_TOOL/bin:$PATH
export PATH=$ARM_TOOL/arm-linux-androideabi/bin:$PATH
export ARM_PRE=arm-linux-androideabi
#tries to build for 4.4.3 toolchain
./configure --prefix=./ndk7_build \
--disable-gpac \
--extra-cflags=" -I$ARM_INC -fPIC -DANDROID -fpic -mthumb-interwork -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -DANDROID -Wa,--noexecstack -MMD -MP " \
--extra-ldflags=" -nostdlib -Bdynamic -Wl,--no-undefined -Wl,-z,noexecstack -Wl,-z,nocopyreloc -Wl,-soname,/system/lib/libz.so -Wl,-rpath-link=$ARM_LIB,-dynamic-linker=/system/bin/linker -L$ARM_LIB -nostdlib $ARM_LIB/crtbegin_dynamic.o $ARM_LIB/crtend_android.o -lc -lm -ldl -lgcc " \
--cross-prefix=${ARM_PRE}- \
--disable-asm \
--enable-static \
--host=arm-linux \This is what happens on terminal when i enable libx264 encoder.
STRIP ffmpeg
INSTALL install-progs-yes
INSTALL ffmpeg
INSTALL ffprobe
libavcodec/libavcodec.a(libx264.o): In function `X264_frame':
/home/mehmet/ffmpeg/libavcodec/libx264.c:158: undefined reference to `x264_picture_init'
/home/mehmet/ffmpeg/libavcodec/libx264.c:178: undefined reference to `x264_encoder_reconfig'
/home/mehmet/ffmpeg/libavcodec/libx264.c:189: undefined reference to `x264_encoder_encode'
/home/mehmet/ffmpeg/libavcodec/libx264.c:195: undefined reference to `x264_encoder_delayed_frames'
libavcodec/libavcodec.a(libx264.o): In function `encode_nals':
/home/mehmet/ffmpeg/libavcodec/libx264.c:100: undefined reference to `x264_bit_depth'
libavcodec/libavcodec.a(libx264.o): In function `X264_close':
/home/mehmet/ffmpeg/libavcodec/libx264.c:230: undefined reference to `x264_encoder_close'
libavcodec/libavcodec.a(libx264.o): In function `X264_init':
/home/mehmet/ffmpeg/libavcodec/libx264.c:283: undefined reference to `x264_param_default'
/home/mehmet/ffmpeg/libavcodec/libx264.c:291: undefined reference to `x264_param_default_preset'
/home/mehmet/ffmpeg/libavcodec/libx264.c:313: undefined reference to `x264_param_parse'
/home/mehmet/ffmpeg/libavcodec/libx264.c:448: undefined reference to `x264_param_apply_fastfirstpass'
/home/mehmet/ffmpeg/libavcodec/libx264.c:451: undefined reference to `x264_param_apply_profile'
/home/mehmet/ffmpeg/libavcodec/libx264.c:494: undefined reference to `x264_encoder_open_125'
/home/mehmet/ffmpeg/libavcodec/libx264.c:505: undefined reference to `x264_encoder_headers'