
Recherche avancée
Autres articles (87)
-
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 ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs
Sur d’autres sites (15971)
-
Unrecognized option 'stimeout'
22 juin 2022, par ganapati kulkarniUnrecognized option 'stimeout', is popping up when i'm using the command :


ffmpeg -re -rtsp_transport tcp -y -stimeout 1000000 -i "rtsp://admin:admin123@10.40.20.247:554/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif" -c copy -vsync 1 -f segment -segment_time 600 -segment_atclocktime 0 -segment_list_flags +live -reset_timestamps 1 -strftime 1 "C:\MINDA\OBITS\BlackBox\Recordings\Normal\Dahua-5M02C9FPAG1C78A\2022-1-4\%Y.%m.%d.%H.%M.%S.avi"



-
generate thumbnail from stream jaffree Java
27 avril 2022, par med benzekriI am trying to generate a thumbnail from a video stream using jaffree thought they didn't mention in their docs anything about generating thumbnail. I tried to figure it out on my own but it doesn't seem to work.


code for thumbnail generating :


public PipedOutputStream generatethumbnail(){
 PipedOutputStream image = new PipedOutputStream();
 FFmpeg.atPath()
 .addInput(PipeInput.pumpFrom(stream).setPosition(1L, TimeUnit.SECONDS))
 .addOutput(PipeOutput.pumpTo(image).setFormat("image2"))
 .execute();
 return image;
 }
 }



the stack trace when i run a test :


2022-04-25 00:36:50.250 WARN 200267 --- [ main] c.g.kokorin.jaffree.ffmpeg.PipeOutput : It's recommended to use ChannelOutput since ffmpeg requires seekable output for many formats
2022-04-25 00:36:50.255 WARN 200267 --- [ main] c.github.kokorin.jaffree.ffmpeg.FFmpeg : ProgressListener isn't set, progress won't be reported
2022-04-25 00:36:50.256 INFO 200267 --- [ main] c.g.k.jaffree.process.ProcessHandler : Command constructed:
ffmpeg -loglevel level+info -ss 1.000 -i tcp://127.0.0.1:43417 -n -f image2 tcp://127.0.0.1:38791
2022-04-25 00:36:50.256 INFO 200267 --- [ main] c.g.k.jaffree.process.ProcessHandler : Starting process: ffmpeg
2022-04-25 00:36:50.292 INFO 200267 --- [ main] c.g.k.jaffree.process.ProcessHandler : Waiting for process to finish
2022-04-25 00:36:50.890 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] ffmpeg version 5.0-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers
2022-04-25 00:36:50.891 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] built with gcc 8 (Debian 8.3.0-6)
2022-04-25 00:36:50.928 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
2022-04-25 00:36:50.929 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libavutil 57. 17.100 / 57. 17.100
2022-04-25 00:36:50.929 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libavcodec 59. 18.100 / 59. 18.100
2022-04-25 00:36:50.930 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libavformat 59. 16.100 / 59. 16.100
2022-04-25 00:36:50.930 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libavdevice 59. 4.100 / 59. 4.100
2022-04-25 00:36:50.930 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libavfilter 8. 24.100 / 8. 24.100
2022-04-25 00:36:50.930 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libswscale 6. 4.100 / 6. 4.100
2022-04-25 00:36:50.930 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libswresample 4. 3.100 / 4. 3.100
2022-04-25 00:36:53.600 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] libpostproc 56. 3.100 / 56. 3.100
2022-04-25 00:36:53.601 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tcp://127.0.0.1:43417':
2022-04-25 00:36:53.602 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Metadata:
2022-04-25 00:36:53.603 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] major_brand : mp42
2022-04-25 00:36:53.603 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] minor_version : 0
2022-04-25 00:36:53.603 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] compatible_brands: mp42mp41
2022-04-25 00:36:53.603 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] creation_time : 2019-11-27T09:33:42.000000Z
2022-04-25 00:36:53.604 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Duration: 00:00:20.69, start: 0.000000, bitrate: N/A
2022-04-25 00:36:53.604 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Stream #0:0[0x1](eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 5760x2880, 29992 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
2022-04-25 00:36:53.604 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Metadata:
2022-04-25 00:36:53.605 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] creation_time : 2019-11-27T09:33:42.000000Z
2022-04-25 00:36:53.605 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] handler_name : ?Mainconcept Video Media Handler
2022-04-25 00:36:53.605 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] vendor_id : [0][0][0][0]
2022-04-25 00:36:53.605 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] encoder : AVC Coding
2022-04-25 00:36:53.606 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Side data:
2022-04-25 00:36:53.606 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] stereo3d: 2D
2022-04-25 00:36:53.606 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] spherical: equirectangular (0.000000/0.000000/0.000000) 
2022-04-25 00:36:53.606 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 317 kb/s (default)
2022-04-25 00:36:53.607 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Metadata:
2022-04-25 00:36:53.607 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] creation_time : 2019-11-27T09:33:42.000000Z
2022-04-25 00:36:53.607 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] handler_name : #Mainconcept MP4 Sound Media Handler
2022-04-25 00:36:53.607 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] vendor_id : [0][0][0][0]
2022-04-25 00:36:53.608 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Stream mapping:
2022-04-25 00:36:53.608 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (native))
2022-04-25 00:36:54.787 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Press [q] to stop, [?] for help
2022-04-25 00:36:54.799 WARN 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [swscaler @ 0x6b45b80] [swscaler @ 0x6b52b40] [warning] deprecated pixel format used, make sure you did set range correctly
2022-04-25 00:36:54.801 WARN 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [swscaler @ 0x6b45b80] [swscaler @ 0x8467b00] [warning] deprecated pixel format used, make sure you did set range correctly
2022-04-25 00:36:54.804 WARN 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [swscaler @ 0x6b45b80] [swscaler @ 0x850d400] [warning] deprecated pixel format used, make sure you did set range correctly
2022-04-25 00:36:54.806 WARN 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [swscaler @ 0x6b45b80] [swscaler @ 0x85b2d00] [warning] deprecated pixel format used, make sure you did set range correctly
2022-04-25 00:36:57.870 WARN 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [swscaler @ 0x6b45b80] [swscaler @ 0x8658600] [warning] deprecated pixel format used, make sure you did set range correctly
2022-04-25 00:36:57.871 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Output #0, image2, to 'tcp://127.0.0.1:38791':
2022-04-25 00:36:57.871 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Metadata:
2022-04-25 00:36:57.871 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] major_brand : mp42
2022-04-25 00:36:57.872 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] minor_version : 0
2022-04-25 00:36:57.872 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] compatible_brands: mp42mp41
2022-04-25 00:36:57.872 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] encoder : Lavf59.16.100
2022-04-25 00:36:57.872 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Stream #0:0(eng): Video: mjpeg, yuvj420p(pc, bt709, progressive), 5760x2880, q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn (default)
2022-04-25 00:36:57.873 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Metadata:
2022-04-25 00:36:57.873 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] creation_time : 2019-11-27T09:33:42.000000Z
2022-04-25 00:36:57.873 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] handler_name : ?Mainconcept Video Media Handler
2022-04-25 00:36:57.874 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] vendor_id : [0][0][0][0]
2022-04-25 00:36:57.874 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] encoder : Lavc59.18.100 mjpeg
2022-04-25 00:36:57.874 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] Side data:
2022-04-25 00:36:57.875 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
2022-04-25 00:36:57.875 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] stereo3d: 2D
2022-04-25 00:36:58.077 INFO 200267 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [info] spherical: equirectangular (0.000000/0.000000/0.000000) 
2022-04-25 00:36:58.213 WARN 200267 --- [ Runnable-1] c.g.kokorin.jaffree.process.Executor : Interrupting starter thread (main) because of exception: TCP negotiation failed
2022-04-25 00:36:58.214 WARN 200267 --- [ main] c.g.k.jaffree.process.ProcessHandler : Process has been interrupted
2022-04-25 00:36:58.215 WARN 200267 --- [ main] c.g.kokorin.jaffree.process.Executor : Interrupting ALIVE thread: StdErr
2022-04-25 00:36:58.215 WARN 200267 --- [ main] c.g.kokorin.jaffree.process.Executor : Interrupting ALIVE thread: StdOut
2022-04-25 00:36:58.215 WARN 200267 --- [ main] c.g.kokorin.jaffree.process.Executor : Interrupting ALIVE thread: Runnable-0

com.github.kokorin.jaffree.JaffreeException: Failed to execute, was interrupted

 at com.github.kokorin.jaffree.process.ProcessHandler.interactWithProcess(ProcessHandler.java:190)
 at com.github.kokorin.jaffree.process.ProcessHandler.execute(ProcessHandler.java:147)
 at com.github.kokorin.jaffree.ffmpeg.FFmpeg.execute(FFmpeg.java:400)
 at dz.univ.bechar.mda.service.FFmpegService$Genrator.generatethumbnail(FFmpegService.java:57)
 at dz.univ.bechar.mda.service.FFmpegServiceTest.givenObjectStream_whenGenerate_Thumbnail(FFmpegServiceTest.java:30)
 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.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:725)
 at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
 at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
 at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
 at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
 at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
 at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
 at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
 at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
 at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
 at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
 at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
 at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
 at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
 at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:214)
 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:210)
 at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:135)
 at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
 at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
 at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
 at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
 at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
 at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
 at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
 at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
 at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
 at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
 at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
 at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
 at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
 at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
 at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
 at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
 at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
 at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
 at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
 at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
 at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
 at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
 at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
 at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
 at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
 at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
 at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
 at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
 Suppressed: com.github.kokorin.jaffree.JaffreeException: TCP negotiation failed
 at com.github.kokorin.jaffree.net.TcpServer.run(TcpServer.java:69)
 at com.github.kokorin.jaffree.process.Executor$1.run(Executor.java:83)
 at java.base/java.lang.Thread.run(Thread.java:829)
 Caused by: java.io.IOException: Pipe not connected
 at java.base/java.io.PipedOutputStream.write(PipedOutputStream.java:140)
 at com.github.kokorin.jaffree.util.IOUtil.copy(IOUtil.java:71)
 at com.github.kokorin.jaffree.util.IOUtil.copy(IOUtil.java:50)
 at com.github.kokorin.jaffree.net.PipeOutputNegotiator.negotiate(PipeOutputNegotiator.java:55)
 at com.github.kokorin.jaffree.net.NegotiatingTcpServer.serve(NegotiatingTcpServer.java:44)
 at com.github.kokorin.jaffree.net.TcpServer.run(TcpServer.java:66)
 ... 2 more
Caused by: java.lang.InterruptedException
 at java.base/java.lang.Object.wait(Native Method)
 at java.base/java.lang.Object.wait(Object.java:328)
 at java.base/java.lang.ProcessImpl.waitFor(ProcessImpl.java:495)
 at com.github.kokorin.jaffree.process.ProcessHandler.interactWithProcess(ProcessHandler.java:180)
 ... 73 more



Since the output info is shown, I assume that the thumbnail is generated but somehow interrupted, isn't it ?


Note : I need ffmpeg output to be a stream uploaded to an object storage server.


ffmpeg used : ffmpeg 5.0-static
tried this version ffmpeg-3.4.2-static which worked before on nodejs app with fluent-ffmpeg


-
How to Show result after uploaded file in PHP
23 avril 2022, par i0x4rI have a script that uploads the video to a server, everything is correct but there is a problem, after the upload of the video to the server is completed
it shows all the uploaded files in the (uploads) folder as array !


I only want the result of the file I just uploaded, and it doesn't show me the previous files !
I need ffmpeg to improve video quality


index.php


<?php
//index.php

?>


 
 
 
 <code class="echappe-js"><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

 
<script src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.5.1/dropzone.js"></script>

 
 
 



 
 
 








 



<script>&#xA;&#xA;$(document).ready(function(){&#xA; &#xA; Dropzone.options.dropzoneFrom = {&#xA; autoProcessQueue: true,&#xA; timeout: 300000,&#xA; acceptedFiles:"video/*",&#xA; init: function(){&#xA; var submitButton = document.querySelector(&#x27;#submit-all&#x27;);&#xA; myDropzone = this;&#xA; submitButton.addEventListener("click", function(){&#xA; myDropzone.processQueue();&#xA; });&#xA; this.on("complete", function(){&#xA; if(this.getQueuedFiles().length == 0 &amp;&amp; this.getUploadingFiles().length == 0)&#xA; {&#xA; var _this = this;&#xA; _this.removeAllFiles();&#xA; }&#xA; list_image();&#xA; });&#xA; },&#xA; };&#xA;&#xA; list_image();&#xA;&#xA; function list_image()&#xA; {&#xA; $.ajax({&#xA; url:"upload.php",&#xA; success:function(data){&#xA; $("#preview").html(data);&#xA; }&#xA; });&#xA; }&#xA;&#xA; $(document).on(&#x27;click&#x27;, &#x27;.remove_image&#x27;, function(){&#xA; var name = $(this).attr(&#x27;id&#x27;);&#xA; $.ajax({&#xA; url:"upload.php",&#xA; method:"POST",&#xA; data:{name:name},&#xA; success:function(data)&#xA; {&#xA; list_image();&#xA; }&#xA; })&#xA; });&#xA; &#xA;});&#xA;</script>



upload.php


<?php

//upload.php

$folder_name = 'upload/';
$tumb_name = 'thumb/';
$imageext = '.png';

if(!empty($_FILES))
{

 $temp_file = $_FILES['file']['tmp_name'];
 $location = $folder_name . $_FILES['file']['name'];
 move_uploaded_file($temp_file, $location);
 $upload = $_FILES['file']['name'];
 $uploadStr = str_replace(" ", "\ ",$upload);
 $locationStr = str_replace(" ","\ ",$location);
 $cmd = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&1";
 echo shell_exec($cmd);
}

if(isset($_POST["name"]))
{
 $filename = $folder_name.$_POST["name"];
 $imagename = $thumb_name.$_POST["name"].$imageext;
 unlink($filename);
 unlink($imagename);
}

$result = array();

$files = scandir('upload');

$output = '<div class="row">';

if(false !== $files)
{
 foreach($files as $file)
 {
 if('.' != $file && '..' != $file)
 {
 $output .= '
 <a href="http://stackoverflow.com/view.php?file=&#x27;.$file.&#x27;" target="_blank"> <img src="http://stackoverflow.com/feeds/tag/thumb/&#x27;.$file.&#x27;.png" class="img-thumbnail" width='246' height='138' /></a>
 <button type="button" class="btn btn-link remove_image">Remove</button>
 ';
 }
 }
}
$output .= '</div>';
echo $output;

?>



EDIT :
I put the example on an Array, I don't want it, I just want it to show the downloaded video I just uploaded as a result.


EDIT 2 :
There are some who say type $location and it displays the downloaded file, but this does not work !!!
I just tried more than once and with several uses, there is no display where the text is empty


This is an example of that


<?php

//upload.php

$folder_name = 'upload/';
$tumb_name = 'thumb/';
$imageext = '.png';

if(!empty($_FILES))
{

 $temp_file = $_FILES['file']['tmp_name'];
 $location = $folder_name . $_FILES['file']['name'];
 move_uploaded_file($temp_file, $location);
 $upload = $_FILES['file']['name'];
 $uploadStr = str_replace(" ", "\ ",$upload);
 $locationStr = str_replace(" ","\ ",$location);
 $cmd = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&1";
 echo shell_exec($cmd);
}

if(isset($_POST["name"]))
{
 $filename = $folder_name.$_POST["name"];
 $imagename = $thumb_name.$_POST["name"].$imageext;
 unlink($filename);
 unlink($imagename);
}


$output .= 'Successfly file is "'.$location.'"';
echo $output;

?>



Result : Successfly file is ""
no name file :(


EDIT 3 :


this code upload.php
functions not working


<?php

//upload.php

$folder_name = 'upload/';
$tumb_name = 'thumb/';
$imageext = '.png';

if(!empty($_FILES))
{

 $temp_file = $_FILES['file']['tmp_name'];
 $location = $folder_name . $_FILES['file']['name'];
 move_uploaded_file($temp_file, $location);
 $upload = $_FILES['file']['name'];
 $uploadStr = str_replace(" ", "\ ",$upload);
 $locationStr = str_replace(" ","\ ",$location);
 $cmd = "ffmpeg -y -i {$locationStr} -ss 00:00:15 -vframes 1 thumb/{$uploadStr}.png 2>&1";
 echo shell_exec($cmd);
}


echo "The file " . $location . " has been uploaded";
// not working
echo "<br />";
echo "The file " . $upload . " has been uploaded";
// not working
echo "<br />";
echo "The file " . $uploadStr . " has been uploaded";
// not working
echo "<br />";
echo "The file " . $locationStr . " has been uploaded";
// not working

?>





this error :
[23-Apr-2022 12:31:56 Asia/Riyadh] PHP Notice : Undefined variable : location in /home/prdix/public_html/test/upload.php on line 38


line 38 : echo $location ;


About the developer solution Markus AO


I did the experiment and it is quite good, but dropzone is still missing, because I will upload a large video and the normal upload compresses the video before uploading, here is a picture from my mobile while uploading, but this does not happen with dropzone



I want to implement this in dropzone as well, because this library does not compress the video, but upload it in full size.


Thank you bro.