
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (62)
-
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page. -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (6984)
-
How to start an FFmpeg process, create a pipe and write data from the parent process ?
3 mai 2021, par xlxsMy code is based on https://stackoverflow.com/a/32279430/5941827.


I run FFmpeg with the following params :


std::stringstream sstm;
sstm << "ffmpeg -loglevel error -y -f rawvideo -vcodec rawvideo -s " << std::to_string(width) << "x" << std::to_string(height) //
 << " -pix_fmt rgb24 -framerate " << std::to_string(fps) << " -i - -c:v libx264 -preset " << getPreset(encodeSpeed) << //
 " -crf " << std::to_string(crf) << " -shortest " << path;



(the variables are initialized in a class constructor correctly)


Then I open the pipe with
pPipe = popen(sstm.str().c_str(), "w")
.The problem is after Ifwrite
to it and callingfclose
, based on the contents I write sometimes less or more bytes reach FFmpeg, and I get

[rawvideo @ 000000000010c3df] Invalid buffer size, packet size 196606 < expected frame_size 196608
Error while decoding stream #0:0: Invalid argument



The saved output video usually has one frame more or less than the expected.
I have checked the array I'm sending trough the pipe with
fwrite
and it's size is correct.
It appears that based on the data I send some bytes don't get there, or more bytes than I send go through the pipe.

I have also tried two different FFmpeg versions, but with the same error message.


-
How to merge two ffmpeg queries to one pipe ?
19 mai 2021, par Aleksey TimoshchenkoI have a sequence (100 images) (image ex : https://drive.google.com/file/d/1V8HwOuIo9PBX3ix0eKFQFGimskU_H0mN/view?usp=sharing) of Bayer images, what I need to do is


- 

- debayer them
- compress the result in the
.h264
file






So, there are two queries that I use


for debayer


ffmpeg -y -i D:\Buffer\Bayer\Time%7d_img.bmp -vf format=gray -f rawvideo pipe: -hide_banner | ffmpeg -y -f rawvideo -pixel_format bayer_rggb8 -video_size 4104x3006 -i pipe: -frames 100 D:\Buffer\res\result%7d.png -hide_banner



and for compression


ffmpeg -framerate 30 -i D:\Buffer\res\result%7d.png -c:v hevc_nvenc -qp 0 D:\Buffer\res264\test5.h264 -hide_banner



I need to merge these two queries into one, I tried to do it like this


ffmpeg -y -i D:\Buffer\Bayer\Time%7d_img.bmp -vf format=gray -f rawvideo pipe: -hide_banner | ffmpeg -y -f rawvideo -pixel_format bayer_rggb8 -video_size 4104x3006 pipe: -hide_banner | ffmpeg -c:v hevc_nvenc -qp 0 -i pipe D:\Buffer\res264\test5.h264 -hide_banner



but I get an error here


Input #0, image2, from 'D:\Buffer\Bayer\Time%7d_img.bmp':
Output #0, rawvideo, to 'pipe:': Duration:
00:00:40.0Output file #0 does not contain any stream0
, start: 0.000000, bitrate: N/AUnknown decoder 'hevc_nvenc'

 Stream #0:0: Video: bmp, pal8, 2464x2056, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
 Stream #0:0 -> #0:0 (bmp (native) -> rawvideo (native))
Press [q] to stop, [?] for help
Output #0, rawvideo, to 'pipe:':
 Metadata:
 encoder : Lavf58.29.100
 Stream #0:0: Video: rawvideo (Y800 / 0x30303859), gray, 2464x2056, q=2-31, 1013196 kb/s, 25 fps, 25 tbn, 25 tbc
 Metadata:
 encoder : Lavc58.54.100 rawvideo
av_interleaved_write_frame(): Invalid argument
Error writing trailer of pipe:: Invalid argument
frame= 1 fps=0.0 q=-0.0 Lsize= 4947kB time=00:00:00.04 bitrate=1013196.8kbits/s speed= 2x
video:4947kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Conversion failed!



What am I doing wrong here ?


-
How to pipe attachment to variable
1er juin 2021, par ioundesinI would like to pipe an attachement from inside a *.mka to a variable instead of to a file.


Saving the attachment to a *.txt file looks like this (and works) :


import io
import subprocess
import sys, os
import soundfile as sf

full_path = os.path.realpath(__file__)
path, filex = os.path.split(full_path)

fname = 'my_own_soundfile.mka'
fullpath = path + '\\' + fname
pathffmpeg = 'C:/FFmpeg/bin/ffmpeg.exe'

command = [pathffmpeg, "-dump_attachment:t:0",
 "C:\folder\\attachment.txt",
 "-i", fullpath] # This one works

proc = subprocess.run(command, stdout=subprocess.PIPE)



This command is my attempt at piping the attachment, however this does not work :


command = [pathffmpeg, "-dump_attachment:t:0",
 "-f", "PIPE:0",
 "-i", fullpath]



What can I do to make this work ?