Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
[Solved] Process pipe error
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
BUG REPORT: Unable to gen...
by
paweld
[
Today
at 04:23:23 pm]
Lazarus for Windows on aa...
by
msintle
[
Today
at 04:12:52 pm]
Slow copying of small str...
by
marcov
[
Today
at 04:10:03 pm]
InstallAware Using Lazaru...
by
msintle
[
Today
at 04:09:20 pm]
Lazarus editor feature re...
by
440bx
[
Today
at 04:05:09 pm]
Text orientation in TMemo...
by
CM630
[
Today
at 04:00:30 pm]
Inherits forms and releas...
by
ASerge
[
Today
at 03:37:45 pm]
For-in loop over constant...
by
VisualLab
[
Today
at 01:49:14 pm]
The weird Rewrite bug
by
Kays
[
Today
at 01:23:40 pm]
FpDebug unexpected Assemb...
by
440bx
[
Today
at 12:54:43 pm]
Arabic text, problem on L...
by
Zaher
[
Today
at 12:34:05 pm]
RayLib 5.0
by
Guva
[
Today
at 11:25:40 am]
CocoaInt.CocoaIconUse no ...
by
MISV
[
Today
at 09:20:40 am]
Azure sql database will n...
by
paweld
[
Today
at 07:41:17 am]
Does anyone know why this...
by
TYDQ
[
Today
at 06:39:17 am]
TBGRABitmap.TextSize retu...
by
hedgehog
[
Today
at 06:07:46 am]
AI, NLP and CAI: Text Gen...
by
schuler
[
Today
at 04:26:36 am]
Demoscene Square dot flag...
by
KodeZwerg
[
Today
at 03:47:30 am]
How does Castle Game Eng...
by
michalis
[
Today
at 02:51:40 am]
Have anyone develop UEFI ...
by
440bx
[April 16, 2024, 09:39:52 pm]
Lazarus project made on M...
by
Odacir
[April 16, 2024, 08:56:58 pm]
Is it possible to support...
by
PascalDragon
[April 16, 2024, 08:51:36 pm]
CORBA interface and Varia...
by
PascalDragon
[April 16, 2024, 08:35:43 pm]
Macros confuse error mess...
by
PascalDragon
[April 16, 2024, 08:13:25 pm]
Form scaling
by
fxeconomist
[April 16, 2024, 08:09:39 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] Process pipe error (Read 728 times)
nikel
Full Member
Posts: 186
[Solved] Process pipe error
«
on:
September 22, 2020, 03:16:30 pm »
Hello, I'm trying to get some tags from mp3's, here's my code:
Code: Pascal
[Select]
[+]
[-]
Path
:
=
P
;
TempStringlist
:
=
TStringList
.
Create
;
AProcess
:
=
TProcess
.
Create
(
nil
)
;
AProcess
.
Executable
:
=
'/bin/sh'
;
// /bin/bash
AProcess
.
Parameters
.
Add
(
'-c'
)
;
AProcess
.
Parameters
.
Add
(
'ffprobe -loglevel error -show_entries format_tags='
+
Request
+
' -of default=noprint_wrappers=1:nokey=1 '
+
Path
)
;
AProcess
.
Options
:
=
AProcess
.
Options
+
[
poWaitOnExit
,
poUsePipes
]
;
AProcess
.
Execute
;
I'm getting pipe error on some songs. Why does it happen?
«
Last Edit: September 22, 2020, 05:15:36 pm by nikel
»
Logged
winni
Hero Member
Posts: 3197
Re: Process pipe error
«
Reply #1 on:
September 22, 2020, 03:38:19 pm »
Hi!
I have just no Lazarus at hand.
But as I remember the size of the pipe is 1024 bytes.
Do some tags break this limit?
Winni
Logged
marcov
Administrator
Hero Member
Posts: 11447
FPC developer.
Re: Process pipe error
«
Reply #2 on:
September 22, 2020, 03:40:30 pm »
Do you implement the so called long output scenario? This is always recommended when there are problems.
Or use runcommand, which implements this scenario.
Logged
nikel
Full Member
Posts: 186
Re: Process pipe error
«
Reply #3 on:
September 22, 2020, 04:55:58 pm »
Thanks for the replies. How can I implement scenario, it's a console application.
Logged
marcov
Administrator
Hero Member
Posts: 11447
FPC developer.
Re: Process pipe error
«
Reply #4 on:
September 22, 2020, 04:57:46 pm »
https://wiki.freepascal.org/Executing_External_Programs#Reading_large_output
or easier
https://wiki.freepascal.org/Executing_External_Programs#.28Process..29RunCommand
Logged
nikel
Full Member
Posts: 186
Re: Process pipe error
«
Reply #5 on:
September 22, 2020, 05:15:19 pm »
This worked fine
Code: Pascal
[Select]
[+]
[-]
Path
:
=
P
;
if
RunCommand
(
'/bin/bash'
,
[
'-c'
,
'ffprobe -loglevel error -show_entries format_tags='
+
Request
+
' -of default=noprint_wrappers=1:nokey=1 '
+
'"'
+
Path
+
'"'
]
,
Str
)
then
writeln
(
Str
)
;
Result
:
=
Str
;
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
[Solved] Process pipe error
TinyPortal
© 2005-2018