
Recherche avancée
Autres articles (99)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté.
Sur d’autres sites (12957)
-
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.
-
Cropping video with FFmpeg increases the tbn value too much
5 avril 2016, par TOPHere is the information of original video :
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-04-05 03:00:09
Duration: 00:01:50.09, start: 0.000000, bitrate: 8131 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt470bg/bt470bg/smpte170m), 1920x1080, 7995 kb/s, SAR 1:1 DAR 16:9, 44.49 fps, 90k tbr, 90k tbn, 180k tbc (default)Then I used this
ffmpeg
command to crop video :ffmpeg -i file.mp4 -vf "crop=480:480:0:0" -b:v 2048k -preset ultrafast cropped.mp4
Here is the information of cropped video :
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.28.101
Duration: 00:01:50.16, start: 0.023220, bitrate: 1078 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1282x716 [SAR 1:1 DAR 641:358], 1002 kb/s, 44.49 fps, 44.49 tbr, 220455000.00 tbn, 88.98 tbc (default)The default video player of my phone cannot play this video. If I use MX Player I have to change the decoder to Software decoder (instead of Hardware) to open it.
I noticed that the tbn value was increased after reencoding. The old value is 90k. The new value is 220455k. Maybe it is the reason why the default video player doesn’t work.
Question : why is the
tbn
value so big ? How to avoid it ? -
Running frei0r filters with ffmpeg - "Could not find module 'pixeliz0r'."
4 avril 2016, par ksloanI installed frei0r using homebrew
MacK:tmp kevin$ brew list frei0r
/usr/local/Cellar/frei0r/1.4/include/frei0r.h
/usr/local/Cellar/frei0r/1.4/lib/frei0r-1/ (119 files)
/usr/local/Cellar/frei0r/1.4/lib/pkgconfig/frei0r.pc
/usr/local/Cellar/frei0r/1.4/share/doc/ (4 files)Then I installed ffmpeg with the
--with-frei0r
flag, and everything compiled finebrew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265 --with-frei0r
I tried telling ffmpeg where my frie0r filters were installed with
export FREI0R_PATH=/usr/local/Cellar/frei0r/1.4/lib/frei0r-1/
I even created symlinks from the default locations ffmpeg checks...
MacK:tmp kevin$ ls -l /usr/local/lib/frei0r-1
lrwxr-xr-x 1 kevin admin 33 4 Apr 04:43 /usr/local/lib/frei0r-1 -> ../Cellar/frei0r/1.4/lib/frei0r-1But I’m still seeing this error :
[Parsed_frei0r_0 @ 0x7f8938f003c0] Could not find module 'perspective'.
[AVFilterGraph @ 0x7f8938f00160] Error initializing filter 'frei0r' with args 'perspective'
Error initializing complex filters.
Invalid argumentFull output :
MacK:tmp kevin$ ffmpeg -i 1.mp4 -filter_complex "frei0r=perspective" out.mp4
ffmpeg version 3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 7.0.2 (clang-700.1.81)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.0.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-libass --enable-ffplay --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libx265 --enable-nonfree --enable-vda
libavutil 55. 17.103 / 55. 17.103
libavcodec 57. 24.102 / 57. 24.102
libavformat 57. 25.100 / 57. 25.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 31.100 / 6. 31.100
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:08.34, start: 0.023220, bitrate: 4293 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 4161 kb/s, 60 fps, 60 tbr, 15360 tbn, 120 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
Metadata:
handler_name : SoundHandler
[Parsed_frei0r_0 @ 0x7f8938f003c0] Could not find module 'perspective'.
[AVFilterGraph @ 0x7f8938f00160] Error initializing filter 'frei0r' with args 'perspective'
Error initializing complex filters.
Invalid argumentI’ve run out of ideas to try next, what am I missing ? Any help would be greatly appreciated.