
Recherche avancée
Autres articles (79)
-
Demande de création d’un canal
12 mars 2010, parEn fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...) -
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
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.
Sur d’autres sites (8958)
-
ffmpeg av_interleaved_write_frame() : Broken pipe under windows
7 avril 2016, par AllenI am using ffmpeg to convert original media file to rawvideo yuv format, ouputed the yuv to pipe, then my command tool receive the raw yuv as input, do some processing.
e.g :
D:\huang_xuezhong\build_win32_VDNAGen>ffmpeg -i test.mkv -c:v rawvideo -s 320x240 -f rawvideo - | my_tool -o output
every time, when run the command, ffmpeg will dump this
av_interleaved_write_frame(): Broken pipe
error msg :Output #0, rawvideo, to 'pipe:':
Metadata:
encoder : Lavf56.4.101
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 120:91 DAR 160:91], q=2-31, 200 kb/s, 24 fps, 24 tbn, 24 tbc (default)
Metadata:
encoder : Lavc56.1.100 rawvideo
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> rawvideo (native))
Press [q] to stop, [?] for help
av_interleaved_write_frame(): Broken pipe
frame= 1 fps=0.0 q=0.0 Lsize= 112kB time=00:00:00.04 bitrate=22118.2kbits/s
video:112kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing o
verhead: 0.000000%
Conversion failed!in my souce code : it take
stdin
as the input file, every time, it read a frame size content from it, if the content read is less than a frame size, then continue read, until a frame is fetched, then it use the frame content to generate something.int do_work (int jpg_width, int jpg_height)
{
int ret = 0;
FILE *yuv_fp = NULL;
unsigned char * yuv_buf = NULL;
int frame_size = 0;
int count = 0;
int try_cnt = 0;
frame_size = jpg_width * jpg_height * 3 / 2;
va_log (vfp_log, "a frame size:%d\n", frame_size);
yuv_fp = stdin;
yuv_buf = (unsigned char *) aligned_malloc_int(
sizeof(char) * (jpg_width + 1) * (jpg_height + 1) * 3, 128);
if (!yuv_buf) {
fprintf (stderr, "malloc yuv buf error\n");
goto end;
}
memset (yuv_buf, 0, frame_size);
while (1) {
try_cnt++;
va_log (vfp_log, "try_cnt is %d\n", try_cnt);
//MAX_TRY_TIMES = 10
if (try_cnt > MAX_TRY_TIMES) {
va_log (vfp_log, "try time out\n");
break;
}
count = fread (yuv_buf + last_pos, 1, frame_size - last_pos, yuv_fp);
if (last_pos + count < frame_size) {
va_log (vfp_log, "already read yuv: %d, this time:%d\n", last_pos + count, count);
last_pos += count;
continue;
}
// do my work here
memset (yuv_buf, 0, frame_size);
last_pos = 0;
try_cnt = 0;
}
end:
if (yuv_buf) {
aligned_free_int (yuv_buf);
}
return ret;
}my log :
2016/04/05 15:20:38 : a frame size:115200
2016/04/05 15:20:38 : try_cnt is 1
2016/04/05 15:20:38 : already read yuv : 49365, this time:49365
2016/04/05 15:20:38 : try_cnt is 2
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 3
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 4
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 5
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 6
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 7
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 8
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 9
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 10
2016/04/05 15:20:38 : already read yuv : 49365, this time:0
2016/04/05 15:20:38 : try_cnt is 11
2016/04/05 15:20:38 : try time out
```my question :
when piping used ,does ffmpeg write content to pipe buffer as soon as it has content, or it will buffer some size content, then flushes them to pipe ?Maybe some internal logic that I misunderstood,any one could help explain or fix my code ?
PS : this command run ok under linux.
-
error in ffmpeg when sending image from pipe via php
12 décembre 2013, par Abdul Aliused the following tutorial to send an uploaded image to ffmpeg from php via pipe.
however it raises an eror saying that the pipe has invalid data in it.
pipe:: Invalid data found when processing input
following is the php code for uploading an image file
$tempPath = $_FILES['vdofile']['tmp_name'];
print_r($tempPath);
$descriptorspec = array(
0 => array("pipe", "r"), // stdin is a pipe that the child will read from
1 => array("pipe", "w"), // stdout is a pipe that the child will write to
2 => array("file", "error-output.txt", "a") // stderr is a file to write to
);
$img = imagecreatefromjpeg($tempPath);
$proc = proc_open("ffmpeg image2pipe -i - -y image.jpg", $descriptorspec, $pipes);
if (is_resource($proc)) {
/*
* $pipes[0] = write something to command being run
* $pipes[1] = read something from command
* $pipes[2] = error from command
*/
fwrite($pipes[0], $_FILES['vdofile']['tmp_name']);
fclose($pipes[0]);
}
proc_close($proc);
?>and simple html uploading code is as follows :
<form action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" />
<input type="submit" value="Upload" />
</form>the error file generated is as follows :
ffmpeg version N-58485-ga12b4bd Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 26 2013 22:07:02 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 55.100 / 52. 55.100
libavcodec 55. 44.100 / 55. 44.100
libavformat 55. 21.102 / 55. 21.102
libavdevice 55. 5.101 / 55. 5.101
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
pipe:: Invalid data found when processing inputany assistance will be appreciated.
**
EDIT
**
the code still produces an error :
ffmpeg version N-58485-ga12b4bd Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 26 2013 22:07:02 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 55.100 / 52. 55.100
libavcodec 55. 44.100 / 55. 44.100
libavformat 55. 21.102 / 55. 21.102
libavdevice 55. 5.101 / 55. 5.101
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
[image2pipe @ 00000000029ee0a0] Could not find codec parameters for stream 0 (Video: none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
pipe:: could not find codec parametersthe following ffmpeg comand is called from within php like above :
ffmpeg -f image2pipe -i - -vcodec mjpeg -vframes 1 -an -f mjpeg image.mp4
-
Updated version number.
8 avril 2013, par blueimpm server/php/UploadHandler.php
Updated version number.