
Recherche avancée
Médias (2)
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
Publier une image simplement
13 avril 2011, par ,
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (111)
-
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 -
De l’upload à la vidéo finale [version standalone]
31 janvier 2010, parLe chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
Upload et récupération d’informations de la vidéo source
Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...) -
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)
Sur d’autres sites (7726)
-
doc/ffserver : extend documentation for Feed/File stream options
29 novembre 2013, par Stefano Sabatini -
ffmpeg 1.0.7 takes minute to create a thumbnail on "broken" video file but other files are seconds to create thumbnail
8 juillet 2015, par Wiggler JtagI’ve been using ffmpeg 1.0.7 for over 450GB (cca 400 files) for creating thumbnails and grabbing video-file information. It tooks me like 1-2 seconds to create 10 thumbnails from 8GB file. But now I’ve got some ’broken’ video file (672 MB) which creates me 1 thumbnail over a minute, 10 thumbnails its over 10 minutes -> my server burns :
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
9769 www-data 20 0 395m 28m 7212 R 157.0 0.4 0:04.99 ffmpegI opened the file in Windows Media Player and getting blank screen while -> video file is weird, opened it in VLC and it wrote me :
Because this AVI file index is broken or missing, seeking will not work correctly. VLC won't repair your file but can temporary fix this problem by building an index in memory.
I’ve clicked ’Play as is’ and it plays the video file correctly, however my webserver burns because of FFmpeg and PHP waits for the return fromexec();
command. Thumbnails are also created fine after 10 minutes, but how can I fix this problem or to prevent from executing FFmpeg for creating thumbnails on these broken ’video’ files ?This is my php :
$cmd = "ffmpeg -i error.avi 2>&1";
$info = `$cmd`;
echo '<pre>';
print_r($info);
echo '</pre>';this is the output I am getting (very quickly)
ffmpeg version 1.0.7 Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 19 2013 07:14:44 with gcc 4.7 (Debian 4.7.2-5)
configuration: --prefix=/usr --extra-cflags='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ' --extra-ldflags='-Wl,-z,relro' --cc='ccache cc' --enable-shared --enable-libmp3lame --enable-gpl --enable-nonfree --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libspeex --enable-nonfree --disable-stripping --enable-libvpx --enable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-librtmp --enable-avfilter --enable-libfreetype --enable-libvo-aacenc --disable-decoder=amrnb --enable-libvo-amrwbenc --enable-libaacplus --libdir=/usr/lib/x86_64-linux-gnu --disable-vda --enable-libbluray --enable-libcdio --enable-gnutls --enable-frei0r --enable-openssl --enable-libass --enable-libopus --enable-fontconfig --enable-libfdk-aac --enable-libdc1394 --disable-altivec --dis libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 59.100 / 54. 59.100
libavformat 54. 29.104 / 54. 29.104
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, avi, from 'error.avi':
Metadata:
encoder : VirtualDubMod 1.5.10.2 (build 2540/release)
Duration: 01:29:39.32, start: 0.000000, bitrate: 1048 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 640x272 [SAR 1:1 DAR 40:17], 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16, 128 kb/s
At least one output file must be specifiedSo it looks like just creating thumbnails is having problems :
exec("ffmpeg -ss 01:11:43 -i error.avi -vframes 1 -s 616x320 -an output_1.jpg 2>&1");
Where could be the problem ? Thanks for your suggestions !
Btw. I am posting this on SO because I’m not sure where it belongs more than here - I think it could be done somehow by PHP but I’m not really sure.
EDIT : I have added timeout, which "fixes" my problem, but even latest version of FFmpeg 2. stucks on creating thumbnail from broken video files.
exec("timeout 5s ffmpeg -ss 01:11:43 -i error.avi -vframes 1 -s 616x320 -an output_1.jpg 2>&1");
-
Segmenting only specific parts of a video file
30 mai 2013, par Christian P.I have some video files that I wish to serve up "dynamically", given the following workflow :
- Convert video from MP4 container to segmented .ts files with accompanying .m3u8 playlist
- Delete .ts files
- On request, generate .ts files (but only those requested, not for the entire video)
I can generate .ts files for the entire video using
ffmpeg
using this commandffmpeg -y -i video.mp4 -c:a copy -bsf:a aac_adtstoasc -c:v copy -bsf:v h264_mp4toannexb -flags -global_header -map 0 -f segment -segment_time 10 -segment_list playlist.m3u8 -segment_format mpegts chunk_%03d.ts
This is what I do in step 1 and it works just fine, video is playing fine. Due to disk constraints, I do not want to have two copies of every video (the original MP4 and the segmented .ts fies), so what I am trying to achieve is to find a command that will allow me to produce only the segments I need, on a per-request basis.
Given the command above we may produce a sample playlist like this :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:12
#EXTINF:11.261267,
chunk_000.ts
#EXTINF:11.261256,
chunk_001.ts
#EXTINF:7.507511,
chunk_002.ts
#EXTINF:11.261256,
chunk_003.ts
#EXTINF:11.261267,
chunk_004.ts
#EXTINF:7.507511,
chunk_005.tsI have tried, using the
-ss
and-t
flags available inffmpeg
, to create only a specific segments. For instance I might skip the first to segments by adding-ss 22.522523
(the total length of the two first segments), but this produces chunks that are not byte-for-byte identical to the original chunks and as such unusable (the video playback just stops). Is there a way to haveffmpeg
(or another program) reproduce the same exact chunks, without producing all of them ?Short version : If I produce a playlist with chunks of an entire video (and accompanying .ts files), can I later reproduce a specific interval of those chunks that are byte-for-byte identical to the original chunks ?