
Recherche avancée
Médias (1)
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (98)
-
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 (...) -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
-
Support audio et vidéo HTML5
10 avril 2011MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)
Sur d’autres sites (13258)
-
Video conversion (using ffmpeg) fails only on apache server
25 avril 2022, par wb.waldemarI'm trying to convert a video using latest static build of ffmpeg and following command :


ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4



This works actually fine on Ubuntu (desktop) and the same command works also on Win 10 but not on the server (Debian GNU/Linux 10) where it should actually work. I can't install or build ffmpeg directly so I've to use a static build. Also simple remux works on the server but not the converion and I do not understand why. I've also read and tried different approaches and suggestions, but none of them could solve the problem.


Does someone have an idea what goes wrong ?


ffmpeg started on 2022-04-22 at 13:02:44
Report written to "ffmpeg-20220422-130244.log"
Log level: 48
Command line:
/dev/tools/ffmpeg -report -y -loglevel info -i en--story-video.mp4 -c:v libx264 -preset slow -crf 22 -c:a copy en--story-video-out.mp4
ffmpeg version N-60837-ge81242bb13-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers
 built with gcc 8 (Debian 8.3.0-6)
 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-libfribidi --enable-libass --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-libxvid --enable-libzimg
 libavutil 57. 22.100 / 57. 22.100
 libavcodec 59. 21.103 / 59. 21.103
 libavformat 59. 17.102 / 59. 17.102
 libavdevice 59. 5.100 / 59. 5.100
 libavfilter 8. 27.100 / 8. 27.100
 libswscale 6. 5.100 / 6. 5.100
 libswresample 4. 4.100 / 4. 4.100
 libpostproc 56. 4.100 / 56. 4.100
Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'info'.
Reading option '-i' ... matched as input url with argument 'en--story-video.mp4'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'libx264'.
Reading option '-preset' ... matched as AVOption 'preset' with argument 'slow'.
Reading option '-crf' ... matched as AVOption 'crf' with argument '22'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'copy'.
Reading option 'en--story-video-out.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument info.
Successfully parsed a group of options.
Parsing a group of options: input url en--story-video.mp4.
Successfully parsed a group of options.
Opening an input file: en--story-video.mp4.
[NULL @ 0xb9b3b80] Opening 'en--story-video.mp4' for reading
[file @ 0xb9b41c0] Setting default whitelist 'file,crypto,data'
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] ISO: File Type Major Brand: isom
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 0, edit list 0 - media time: 512, duration: 522240
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Offset DTS by 512 to make first pts zero.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Setting codecpar->delay to 2 for stream st: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Unknown dref type 0x206c7275 size 12
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Processing st: 1, edit list 0 - media time: 0, duration: 1502222
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] Before avformat_find_stream_info() pos: 15666151 bytes read:88959 seeks:1 nb_streams:2
[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0xb9b6380] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0xb9b6380] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0xb9b6380] Format yuv420p chosen by get_format().
[h264 @ 0xb9b6380] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0xb9b6380] no picture 
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] All info found
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xb9b3b80] After avformat_find_stream_info() pos: 43534 bytes read:155045 seeks:2 frames:4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'en--story-video.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf59.17.102
 Duration: 00:00:34.06, start: 0.000000, bitrate: 3679 kb/s
 Stream #0:0[0x1](und), 3, 1/15360: Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3544 kb/s, 60 fps, 60 tbr, 15360 tbn (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 04/10/2019.
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng), 1, 1/44100: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : ISO Media file produced by Google Inc. Created on: 04/10/2019.
 vendor_id : [0][0][0][0]
Successfully opened the file.
Parsing a group of options: output url en--story-video-out.mp4.
Applying option c:v (codec name) with argument libx264.
Applying option c:a (codec name) with argument copy.
Successfully parsed a group of options.
Opening an output file: en--story-video-out.mp4.
[file @ 0xb9fbec0] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
detected 20 logical cores
[h264 @ 0xba04680] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0xba04680] nal_unit_type: 8(PPS), nal_ref_idc: 3
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba04680] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0xba04680] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0xba04680] Format yuv420p chosen by get_format().
[h264 @ 0xba04680] Reinit context to 1920x1088, pix_fmt: yuv420p
[h264 @ 0xba04680] no picture 
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[h264 @ 0xbaa3b80] no picture 
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba067c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba9c2c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba21fc0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbab8e80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbac7b00] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbad6840] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbae5580] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbaf42c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb03000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb11d40] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb20a80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb2f7c0] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb3e500] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xbb4d240] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
cur_dts is invalid st:0 (0) [init:0 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[h264 @ 0xba04680] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
[h264 @ 0xbaa3b80] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 2
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'video_size' to value '1920x1080'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'pix_fmt' to value '0'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'time_base' to value '1/15360'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'pixel_aspect' to value '1/1'
[graph 0 input from stream 0:0 @ 0xba9f800] Setting 'frame_rate' to value '60/1'
[graph 0 input from stream 0:0 @ 0xba9f800] w:1920 h:1080 pixfmt:yuv420p tb:1/15360 fr:60/1 sar:1/1
[format @ 0xbaa0540] Setting 'pix_fmts' to value 'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21|yuv420p10le|yuv422p10le|yuv444p10le|nv20le|gray|gray10le'
[AVFilterGraph @ 0xba16380] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[libx264 @ 0xba03c80] using mv_range_thread = 24
[libx264 @ 0xba03c80] using SAR=1/1
[libx264 @ 0xba03c80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[AVIOContext @ 0xb9fba00] Statistics: 0 bytes written, 0 seeks, 0 writeouts
[AVIOContext @ 0xb9b4480] Statistics: 220581 bytes read, 2 seeks
Conversion failed!



-
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


-
My FFMPEG throws me unexpected errors while writing a Thumbnail to the songs
4 mars 2019, par Harmonised7I am using Node to execute my ffmpeg. I use this wrapper :
https://www.npmjs.com/package/ffmpeg
Everything was fine when I was using smaller versions of the thumbnails provided by Youtube, but when I attempted the HD ones, it suddenly started giving me an error. I’ve tried -pix_fmt yuv422p and Many other pixel formats, but nothing helped. Though ONE out of 100+ songs did tag successfully.
here is my code :
downloadTags(tags.thumbnail, `./thumbnails/${tags.title}.jpg`).then(thumbnail =>
{
video.addCommand('-i', `"${thumbnail}"`);
video.addCommand('-map', '0');
video.addCommand('-map', '1');
video.addCommand('-c', 'copy');
video.addCommand('-c:v:1', 'png');
video.addCommand('-disposition:v:0', 'attached_pic');
if(tags.title)
video.addCommand('-metadata', `title="${tags.title}"`);
if(tags.artist)
video.addCommand('-metadata', `artist="${tags.artist}"`);
if(tags.id)
video.addCommand('-metadata', `comment="https://www.youtube.com/watch?v=${tags.id}"`);
video.addCommand('-pix_fmt', `yuv422p`);
var output = 'downloaded'
if (outFolder)
{
output = outFolder;
if(!fs.existsSync(output)) fs.mkdirSync(output);
}
video.save(`"./${output}/${tags.title}.${tags.format}"`, function (error, file)
{
if (error)
{
resolve(error);
return
}
try
{
fs.unlinkSync(song);
}
catch(err)
{
console.log(err.code);
}
resolve();
});
});
}and here is my error :
E
RROR: Error: Command failed: ffmpeg -i "songs/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a" -y -i "./thumbnails/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].jpg" -map 0 -map 1 -c copy -c:v:1 png -disposition:v:0 attached_pic -metadata title="&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep]" -metadata artist="AReallyLongAndAwesomeNameThatIsBetterThanYoursInEveryPossibleWay" -metadata comment="https://www.youtube.com/watch?v=HprdvIIpR-I" "./written/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a"
ffmpeg version N-93214-g7e4d3dbe18 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8.2.1 (GCC) 20190212
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 47.102 / 58. 47.102
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 000002213366bb00] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'songs/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].m4a':
Metadata:
major_brand : M4A
minor_version : 512
compatible_brands: isomiso2
title : &I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep]
artist : Cider Party
encoder : Lavf58.18.104
comment : https://www.youtube.com/watch?v=HprdvIIpR-I
Duration: 00:05:24.80, start: 0.000000, bitrate: 127 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 120x90 [SAR 1:1 DAR 4:3], 90k tbr, 90k tbn, 90k tbc
Input #1, image2, from './thumbnails/&I feat. Giggly Maria - Dive (Exiark's Endless Sky Remix) [Chillstep].jpg':
Duration: 00:00:00.04, start: 0.000000, bitrate: 1575 kb/s
Stream #1:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 480x360 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #1:0 -> #0:2 (mjpeg (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler @ 00000221353d4fc0] deprecated pixel format used, make sure you did set range correctly
[ipod @ 00000221336703c0] Could not find tag for codec png in stream #2, codec not currently supported in container
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:2 --
Conversion failed!Keep in mind that All of my thumbnails retrieved are .jpg
Any suggestions ? Getting really desperate at this point...