
Recherche avancée
Autres articles (47)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
(Dés)Activation de fonctionnalités (plugins)
18 février 2011, parPour gérer l’ajout et la suppression de fonctionnalités supplémentaires (ou plugins), MediaSPIP utilise à partir de la version 0.2 SVP.
SVP permet l’activation facile de plugins depuis l’espace de configuration de MediaSPIP.
Pour y accéder, il suffit de se rendre dans l’espace de configuration puis de se rendre sur la page "Gestion des plugins".
MediaSPIP est fourni par défaut avec l’ensemble des plugins dits "compatibles", ils ont été testés et intégrés afin de fonctionner parfaitement avec chaque (...)
Sur d’autres sites (7692)
-
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)





-
Can build & make video call with pjsip and ffmpeg
10 mai 2023, par QVietI try to build PJSIP with ffmpeg with this config :


i Follow those step :


- 

- build need lib and place in thirdparty folder name ffmpeg
- setup link lib & header already.
- run build with "$configure —with-ffmpeg="
- config_site.h add :












#define PJMEDIA_HAS_OPENH264_CODEC 1 
#define PJMEDIA_HAS_VIDEO 1 
#define PJMEDIA_VIDEO_DEV_HAS_FFMPEG 1 
#define PJMEDIA_HAS_FFMPEG_VID_CODEC 1 
#define PJMEDIA_HAS_FFMPEG 1 
#define PJMEDIA_HAS_FFMPEG_CODEC_H264 1 
#define PJMEDIA_HAS_LIBAVDEVICE 1 
#define PJMEDIA_HAS_OPENH264_CODEC 1





I see have to enable PJMEDIA_HAS_OPENH264_CODEC , if not, can build success but when import will receive this error :


Undefined symbol: _WelsCreateDecoder



cause miss wels package exits in openh264 lib.


The build with success after all with above config but in this :


pj_status_t status = pjsua_vid_enum_codecs(videoCodecInfo, &videoCodecCount);



the codec info just show 1 codec is "H264/97" -> is OpenH264 codec, i can't see ffmpeg here.
When im start call like normal, see log openh264 init call/ open camera .


What i need step to using ffmpeg, i can see any docs about it


can you help me ?


** this i log call stack :**


2023-04-24 10:17:21.522976+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.523 [SIPSample -[SIPSample startEndpointWithEndpointConfiguration:error:]:272] Creating new PSUASIP Endpoint instance.
10:17:21.525 os_core_unix.c !pjlib 2.13-dev for POSIX initialized
10:17:21.526 sip_endpoint.c .Creating endpoint instance...
10:17:21.527 pjlib .select() I/O Queue created (0x1050a32c8)
10:17:21.527 sip_endpoint.c .Module "mod-msg-print" registered
10:17:21.527 sip_transport.c .Transport manager created.
10:17:21.527 pjsua_core.c .PJSUA state changed: NULL --> CREATED
2023-04-24 10:17:21.528077+0700 PSUAKitSample[83000:15642817] 10:17:21.528 sip_endpoint.c .Module "mod-pjsua-log" registered

2023-04-24 10:17:21.528204+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.528 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-PSUA-log" registered
2023-04-24 10:17:21.529375+0700 PSUAKitSample[83000:15642817] 10:17:21.529 sip_endpoint.c .Module "mod-tsx-layer" registered

2023-04-24 10:17:21.529477+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.529 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-tsx-layer" registered
2023-04-24 10:17:21.529491+0700 PSUAKitSample[83000:15642817] 10:17:21.529 sip_endpoint.c .Module "mod-stateful-util" registered

2023-04-24 10:17:21.529592+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.530 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-stateful-util" registered
2023-04-24 10:17:21.529895+0700 PSUAKitSample[83000:15642817] 10:17:21.529 sip_endpoint.c .Module "mod-ua" registered

2023-04-24 10:17:21.530024+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.530 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-ua" registered
2023-04-24 10:17:21.530068+0700 PSUAKitSample[83000:15642817] 10:17:21.530 sip_endpoint.c .Module "mod-100rel" registered

2023-04-24 10:17:21.530181+0700 PSUAKitSample[83000:15642817] 10:17:21.530 sip_endpoint.c .Module "mod-pjsua" registered

2023-04-24 10:17:21.530217+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.530 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-100rel" registered
2023-04-24 10:17:21.530283+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.530 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-PSUA" registered
2023-04-24 10:17:21.530865+0700 PSUAKitSample[83000:15642817] 10:17:21.530 sip_endpoint.c .Module "mod-invite" registered

2023-04-24 10:17:21.530970+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.531 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-invite" registered
2023-04-24 10:17:21.677206+0700 PSUAKitSample[83000:15642817] 10:17:21.677 coreaudio_dev.c .. dev_id 0: iPhone IO device (in=1, out=1) 8000Hz

2023-04-24 10:17:21.677497+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.677 [SIPSample void logCallBack(int, const char *, int):1034] coreaudio_dev.c .. dev_id 0: iPhone IO device (in=1, out=1) 8000Hz
2023-04-24 10:17:21.677588+0700 PSUAKitSample[83000:15642817] 10:17:21.677 coreaudio_dev.c ..core audio initialized

2023-04-24 10:17:21.677804+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.678 [SIPSample void logCallBack(int, const char *, int):1034] coreaudio_dev.c ..core audio initialized
2023-04-24 10:17:21.678538+0700 PSUAKitSample[83000:15642817] 10:17:21.678 pjlib ..select() I/O Queue created (0x1060684a8)

2023-04-24 10:17:21.678743+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.679 [SIPSample void logCallBack(int, const char *, int):1034] pjlib ..select() I/O Queue created (0x1060684a8)
2023-04-24 10:17:21.683380+0700 PSUAKitSample[83000:15642817] 10:17:21.683 pjsua_vid.c ..Initializing video subsystem..

2023-04-24 10:17:21.683585+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.683 [SIPSample void logCallBack(int, const char *, int):1034] PSUA_vid.c ..Initializing video subsystem..
2023-04-24 10:17:21.684058+0700 PSUAKitSample[83000:15642817] 10:17:21.684 vid_conf.c ...Created video conference bridge with 32 ports

2023-04-24 10:17:21.684260+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.684 [SIPSample void logCallBack(int, const char *, int):1034] vid_conf.c ...Created video conference bridge with 32 ports
2023-04-24 10:17:21.684983+0700 PSUAKitSample[83000:15642817] 10:17:21.684 openh264.cpp ...OpenH264 codec initialized

2023-04-24 10:17:21.685168+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.685 [SIPSample void logCallBack(int, const char *, int):1034] openh264.cpp ...OpenH264 codec initialized
2023-04-24 10:17:21.685237+0700 PSUAKitSample[83000:15642817] 10:17:21.685 opengl_dev.c ...OpenGL device initialized

2023-04-24 10:17:21.685370+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.685 [SIPSample void logCallBack(int, const char *, int):1034] opengl_dev.c ...OpenGL device initialized
2023-04-24 10:17:21.715616+0700 PSUAKitSample[83000:15642817] 10:17:21.715 darwin_dev.m ...Darwin video initialized with 5 devices:

2023-04-24 10:17:21.715796+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.716 [SIPSample void logCallBack(int, const char *, int):1034] darwin_dev.m ...Darwin video initialized with 5 devices:
2023-04-24 10:17:21.715812+0700 PSUAKitSample[83000:15642817] 10:17:21.715 darwin_dev.m ... 0: [Renderer] iOS - UIView

2023-04-24 10:17:21.715917+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.716 [SIPSample void logCallBack(int, const char *, int):1034] darwin_dev.m ... 0: [Renderer] iOS - UIView
2023-04-24 10:17:21.715921+0700 PSUAKitSample[83000:15642817] 10:17:21.715 darwin_dev.m ... 1: [Capturer] AVF - Front Camera

2023-04-24 10:17:21.716006+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.716 [SIPSample void logCallBack(int, const char *, int):1034] darwin_dev.m ... 1: [Capturer] AVF - Front Camera
2023-04-24 10:17:21.716033+0700 PSUAKitSample[83000:15642817] 10:17:21.716 darwin_dev.m ... 2: [Capturer] AVF - Back Camera

2023-04-24 10:17:21.716137+0700 PSUAKitSample[83000:15642817] 10:17:21.716 darwin_dev.m ... 3: [Capturer] AVF - Back Dual Camera

2023-04-24 10:17:21.716152+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.716 [SIPSample void logCallBack(int, const char *, int):1034] darwin_dev.m ... 2: [Capturer] AVF - Back Camera
2023-04-24 10:17:21.716218+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.716 [SIPSample void logCallBack(int, const char *, int):1034] darwin_dev.m ... 3: [Capturer] AVF - Back Dual Camera
2023-04-24 10:17:21.716247+0700 PSUAKitSample[83000:15642817] 10:17:21.716 darwin_dev.m ... 4: [Capturer] AVF - Back Telephoto Camera

2023-04-24 10:17:21.716375+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.716 [SIPSample void logCallBack(int, const char *, int):1034] darwin_dev.m ... 4: [Capturer] AVF - Back Telephoto Camera
2023-04-24 10:17:21.716409+0700 PSUAKitSample[83000:15642817] 10:17:21.716 colorbar_dev.c ...Colorbar video src initialized with 2 device(s):

2023-04-24 10:17:21.716673+0700 PSUAKitSample[83000:15642817] 10:17:21.716 colorbar_dev.c ... 0: Colorbar generator

2023-04-24 10:17:21.716764+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.717 [SIPSample void logCallBack(int, const char *, int):1034] colorbar_dev.c ...Colorbar video src initialized with 2 device(s):
2023-04-24 10:17:21.716918+0700 PSUAKitSample[83000:15642817] 10:17:21.716 colorbar_dev.c ... 1: Colorbar-active

2023-04-24 10:17:21.716938+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.717 [SIPSample void logCallBack(int, const char *, int):1034] colorbar_dev.c ... 0: Colorbar generator
2023-04-24 10:17:21.717192+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.717 [SIPSample void logCallBack(int, const char *, int):1034] colorbar_dev.c ... 1: Colorbar-active
2023-04-24 10:17:21.717528+0700 PSUAKitSample[83000:15642817] 10:17:21.717 sip_endpoint.c .Module "mod-evsub" registered

2023-04-24 10:17:21.717645+0700 PSUAKitSample[83000:15642975] 💚 DEBUG 10:17:21.718 [SIPSample void logCallBack(int, const char *, int):1034] sip_endpoint.c .Module "mod-evsub" registered
2023-04-24 10:17:21.717710+0700 PSUAKitSample[83000:15642817] 10:17:21.717 sip_endpoint.c .Module "mod-presence" registered



-
ffmpeg works at command line but I got this error when I use it in nodejs app :
15 avril 2023, par Ibrahim AshourThis is the code :


import fs from 'fs';
import googleTTS from 'google-tts-api';
import https from 'https';
import { exec } from 'child_process';

async function convertTextToVoice(text, fileName) {
 const outputFile = `./audios/${fileName}.mp3`;

 const words = text.split(' ');
 const chunks = [];
 let chunk = '';

 for (const word of words) {
 if (chunk.length + word.length < 200) {
 chunk += ' ' + word;
 } else {
 chunks.push(chunk.trim());
 chunk = word;
 }
 }

 chunks.push(chunk.trim());

 for (let i = 0; i < chunks.length; i++) {
 const chunkFile = `./audios/${fileName}-chunk${i}.mp3`;
 const url = await googleTTS.getAudioUrl(chunks[i], {
 lang: 'ar',
 slow: false,
 host: 'https://translate.google.com',
 });


 try {
 const file = await fs.createWriteStream(chunkFile);
 https.get(url, response => {
 response.pipe(file);
 file.on('finish', () => {
 file.close();
 console.log(`Chunk ${i} created successfully`);
 });
 }).on('error', error => {
 console.error(`Error downloading chunk ${i}: ${error}`);
 });
 } catch (error) {
 console.error(error);
 }
 }

 const chunkFiles = chunks.map((chunk, i) => `./audios/${fileName}-chunk${i}.mp3`);

 // Use ffmpeg to merge the audio files
 const concatCommand = `ffmpeg -i "concat:${chunkFiles.join('|')}" -acodec copy ${outputFile}`;
 try {
 await new Promise((resolve, reject) => {
 exec(concatCommand, (error, stdout, stderr) => {
 if (error) {
 console.error(`Error executing ffmpeg command: ${error}`);
 reject(error);
 } else {
 console.log(`Audio file ${outputFile} created successfully`);
 resolve();
 }
 });
 });

 for (const chunkFile of chunkFiles) {
 await fs.promises.unlink(chunkFile);
 console.log(`${chunkFile} deleted successfully`);
 }
 } catch (error) {
 console.error(error);
 }
}



This is the Error :
./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3
ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3
Error executing ffmpeg command : Error : Command failed : ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3
ffmpeg version 2023-02-04-git-bdc76f467f-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 —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-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-liblensfun —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-d3d11va —enable-dxva2 —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-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 57. 44.100 / 57. 44.100
libavcodec 59. 63.100 / 59. 63.100
libavformat 59. 38.100 / 59. 38.100
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 56.100 / 8. 56.100
libswscale 6. 8.112 / 6. 8.112
libswresample 4. 9.100 / 4. 9.100
libpostproc 56. 7.100 / 56. 7.100
[mp3 @ 00000177df48a1c0] Format mp3 detected only with low score of 1, misdetection possible !
[mp3 @ 00000177df48a1c0] Failed to read frame size : Could not seek to 1026.
concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3 : Invalid argument


Error : Command failed : ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3
ffmpeg version 2023-02-04-git-bdc76f467f-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 —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-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-liblensfun —enable-libvidstab —enable-libvmaf —enable-libzimg —enable-amf —enable-cuda-llvm —enable-cuvid —enable-ffnvcodec —enable-nvdec —enable-nvenc —enable-d3d11va —enable-dxva2 —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-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 57. 44.100 / 57. 44.100
libavcodec 59. 63.100 / 59. 63.100
libavformat 59. 38.100 / 59. 38.100
libavdevice 59. 8.101 / 59. 8.101
libavfilter 8. 56.100 / 8. 56.100
libswscale 6. 8.112 / 6. 8.112
libswresample 4. 9.100 / 4. 9.100
libpostproc 56. 7.100 / 56. 7.100
[mp3 @ 00000177df48a1c0] Format mp3 detected only with low score of 1, misdetection possible !
[mp3 @ 00000177df48a1c0] Failed to read frame size : Could not seek to 1026.
concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3 : Invalid argument


at ChildProcess.exithandler (node:child_process:419:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1091:16)
at ChildProcess._handle.onexit (node:internal/child_process:302:5) {



code : 1,
killed : false,
signal : null,
cmd : 'ffmpeg -i "concat :./audios/تجربة-chunk0.mp3|./audios/تجربة-chunk1.mp3" -acodec copy ./audios/تجربة.mp3'
}
Chunk 1 created successfully
Chunk 0 created successfully


I expected the command to work in the nodejs app like in the command line