
Recherche avancée
Autres articles (32)
-
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 -
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...) -
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
Sur d’autres sites (8031)
-
How to pipe ppm data into ffmpeg from blender frameserver with while loop in PowerShell
14 octobre 2016, par RadiumBlender 2.6 manual features this little
sh
script for encoding a video from the Blender frameserver viaffmpeg
. It works great on Windows with Cygwin, but only without-hwaccel
hardware acceleration flag.#!/bin/sh
BLENDER=http://localhost:8080
OUTPUT=/tmp/output.ogv
eval `wget ${BLENDER}/info.txt -O - 2>/dev/null |
while read key val ; do
echo R_$key=$val
done`
i=$R_start
{
while [ $i -le $R_end ] ; do
wget ${BLENDER}/images/ppm/$i.ppm -O - 2>/dev/null
i=$(($i+1))
done
} | ffmpeg -vcodec ppm -f image2pipe -r $R_rate -i pipe:0 -b 6000k -vcodec libtheora $OUTPUT
wget ${BLENDER}/close.txt -O - 2>/dev/null >/dev/nullI’d like to encode my videos from Blender’s in Windows with
-hwaccel dxva2
which works with PowerShell. I’ve begun converting the script to PowerShell but I have run into one last problem. I am having difficulty replicating this part of the script in PowerShell.i=$R_start
{
while [ $i -le $R_end ] ; do
wget ${BLENDER}/images/ppm/$i.ppm -O - 2>/dev/null
i=$(($i+1))
done
} | ffmpeg -vcodec ppm -f image2pipe -r $R_rate -i pipe:0 -b 6000k -vcodec libtheora $OUTPUTBelow is my conversion to PowerShell.
echo "gathering data";
$blender = "http://localhost:8080";
$output = "C:\Users\joel\Desktop\output.mp4";
$webobj = wget $blender"/info.txt";
$lines = $webobj.Content -split('[\r\n]') | ? {$_};
$info = @{};
foreach ($line in $lines) {
$lineinfo = $line -split('[\s]') | ? {$_};
$info[$lineinfo[0]] = $lineinfo[1];
}
echo $info;
[int]$end = [convert]::ToInt32($info['end'],10);
[int]$i = [convert]::ToInt32($info['start'],10);
$video="";
( while ($i -le $end) {
$frame = wget $blender"/images/ppm/"$i".ppm" > $null;
echo $frame.Content > $null;
$i++;
} ) | ffmpeg -hwaccel dxva2 -vcodec ppm -f image2pipe -r $info['rate'] -i pipe:0 -b 6000k -vcodec libx264 $output;This is the piece I’m having trouble with. I’m not quite sure what the proper syntax is to pipe the data into the
ffmpeg
command in the same way as the bash script above.( while( $i -le $end ) {
$frame = wget $blender"/images/ppm/"$i".ppm" > $null;
echo $frame.Content > $null;
$i++;
} ) | ffmpeg -hwaccel dxva2 -vcodec ppm -f image2pipe -r $info['rate'] -i pipe:0 -b 6000k -vcodec libx264 $output;Here is the output :
PS C :\Users\joel\Desktop> .\encode.ps1 gathering data
Name Value
-----
rate 30
height 720
ratescale 1
end 57000
width 1280
start 1
while : The term ’while’ is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
At C :\Users\joel\Desktop\encode.ps1:15 char:3
+ ( while ($i -le $end)
+
+ CategoryInfo : ObjectNotFound : (while:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException -
Live encoding with FFmpeg , decklink and pipe [duplicate]
5 novembre 2016, par SKALISThis question already has an answer here :
What is the best way to get live video input from a Blackmagic Decklink card and get it encoded with an external encoder (NvEncoder)
I try :
mkfifo output.yuv
ffmpeg -f decklink -r 30000/1000 -pix_fmt uyvy422 -i "DeckLink Mini Recorder 4K@24" output.yuv
& NvEncoder -i output.yuv -pix_fmt yuv420p -bitrate 21M -fps30 output.tsProblem seems that the NvEncoder cannot take the uyvy422 format, so can I change that to yuv420p when capturing and before sending it trough the pipe ?
The decklink card only can give me uyvy422
-
OpenCV to ffplay from named pipe (fifo)
16 novembre 2016, par Betsalel WilliamsonI’ve been working on piping video from OpenCV in C++. I’ve tried to pipe the image after processing from OpenCV to a named pipe with the end goal of republishing the stream using a webserver either with VLC or a NodeJS server.
Where I’m stuck is that the output from OpenCV doesn’t seem to be processing correctly. The video always has artifacts even though it should be the raw video.
int main(int argc, char** argv)
{
VideoCapture camera(argv[1]);
float fps = 15;
// VLC raw video
printf("Run command:\n\ncat /tmp/myfifo | cvlc --demux=rawvideo --rawvid-fps=%4.2f --rawvid-width=%.0f --rawvid-height=%.0f --rawvid-chroma=RV24 - --sout \"#transcode{vcodec=h264,vb=200,fps=30,width=320,height=240}:std{access=http{mime=video/x-flv},mux=ffmpeg{mux=flv},dst=:8081/stream.flv}\""
,fps
,camera.get(CV_CAP_PROP_FRAME_WIDTH)
,camera.get(CV_CAP_PROP_FRAME_HEIGHT)
);
// ffplay raw video
printf("Run command:\n\ncat /tmp/myfifo | ffplay -f rawvideo -pixel_format bgr24 -video_size %.0fx%.0f -framerate %4.2f -i pipe:"
,camera.get(CV_CAP_PROP_FRAME_WIDTH)
,camera.get(CV_CAP_PROP_FRAME_HEIGHT)
,fps
);
int fd;
int status;
char const * myFIFO = "/tmp/myfifo";
if ((status = mkfifo(myFIFO, 0666)) < 0) {
// printf("Fifo mkfifo error: %s\n", strerror(errno));
// exit(EXIT_FAILURE);
} else {
cout << "Made a named pipe at: " << myFIFO << endl;
}
cout << "\n\nHit any key to continue after running one of the previously listed commands..." << endl;
cin.get();
if ((fd = open(myFIFO,O_WRONLY|O_NONBLOCK)) < 0) {
printf("Fifo open error: %s\n", strerror(errno));
exit(EXIT_FAILURE);
}
while (true)
{
if (waitKey(1) > 0)
{
break;
}
Mat colorImage;
camera >> colorImage;
// method: named pipe as matrix writes data to the named pipe, but image has glitch
size_t bytes = colorImage.total() * colorImage.elemSize();
if (write(fd, colorImage.data, bytes) < 0) {
printf("Error in write: %s \n", strerror(errno));
}
}
close(fd);
exit(EXIT_SUCCESS);
}