
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 (23)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...) -
Other interesting software
13 avril 2011, parWe don’t claim to be the only ones doing what we do ... and especially not to assert claims to be the best either ... What we do, we just try to do it well and getting better ...
The following list represents softwares that tend to be more or less as MediaSPIP or that MediaSPIP tries more or less to do the same, whatever ...
We don’t know them, we didn’t try them, but you can take a peek.
Videopress
Website : http://videopress.com/
License : GNU/GPL v2
Source code : (...)
Sur d’autres sites (7235)
-
FFmpeg from Python has Corrupted Output
14 juillet 2019, par MazyodIn a python script, I have :
os.system(ff_cmd)
# also tried Popen(ff_cmd, shell=True).wait()Then, I ran that same
ff_cmd
from terminal directly. Here are the results :# ff_cmd
ffmpeg -i "114006.mp3" -acodec pcm_s16le -ar 16000 -ac 1 "114-006-a4dec52a.wav"
# after running from python
% file 114-006-a4dec52a.wav
114-006-a4dec52a.wav: Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v2, 40 kbps, 16 kHz, Monaural
# after running from terminal
% file 114-006-a4dec52a.wav
114-006-a4dec52a.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 16000 HzCan anyone please explain why in the world would they result in different outputs ?
Output from Python :
ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[mp3 @ 0x7ffa34001800] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/.../114006.mp3':
Duration: 00:00:09.53, start: 0.000000, bitrate: 64 kb/s
Stream #0:0: Audio: mp3, 22050 Hz, stereo, fltp, 64 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/.../114-006-a4dec52a.wav':
Metadata:
ISFT : Lavf58.20.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
Metadata:
encoder : Lavc58.35.100 pcm_s16le
size= 298kB time=00:00:09.53 bitrate= 256.1kbits/s speed= 166x
video:0kB audio:298kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025564%Output from terminal :
ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.4 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/adoptopenjdk-12.0.1.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[mp3 @ 0x7f98ed005800] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/.../114006.mp3':
Duration: 00:00:09.53, start: 0.000000, bitrate: 64 kb/s
Stream #0:0: Audio: mp3, 22050 Hz, stereo, fltp, 64 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to '/.../114-006-a4dec52a.wav':
Metadata:
ISFT : Lavf58.20.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, mono, s16, 256 kb/s
Metadata:
encoder : Lavc58.35.100 pcm_s16le
size= 298kB time=00:00:09.53 bitrate= 256.1kbits/s speed= 469x
video:0kB audio:298kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.025564% -
How to solve issue with ffmpeg being stuck at 'Opening an input file'
20 mai 2021, par zv989I am using a capture card to capture HDMI audio from another machine.



On my host, output of
arecord -l
is as follow :


**** List of CAPTURE Hardware Devices ****
Home directory not accessible: Permission denied
card 0: PCH [HDA Intel PCH], device 0: ALC283 Analog [ALC283 Analog]
 Subdevices: 1/1
 Subdevice #0: subdevice #0
card 1: capture [ezcap U3 capture], device 0: USB Audio [USB Audio]
 Subdevices: 1/1
 Subdevice #0: subdevice #0




The command that I use is :



sudo ffmpeg -f alsa -i hw:CARD=capture,DEV=0 -t 30 test.wav -loglevel debug




When I ran the command, the log seems to freeze at 'Opening an input file' as below :



ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
 configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Splitting the commandline.

Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.

Reading option '-i' ... matched as input url with argument 'hw:CARD=capture,DEV=0'.

Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '30'.

Reading option 'test.wav' ... matched as output url.

Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.

Finished splitting the commandline.

Parsing a group of options: global .

Applying option loglevel (set logging level) with argument debug.

Successfully parsed a group of options.

Parsing a group of options: input url hw:CARD=capture,DEV=0.

Applying option f (force format) with argument alsa.

Successfully parsed a group of options.

Opening an input file: hw:CARD=capture,DEV=0.




It will just stuck there forever, until I press Ctrl+C, then the log continues as follow :



[alsa @ 0x55c9f0eee8c0] interrupted
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:CARD=capture,DEV=0':
 Duration: N/A, bitrate: 1536 kb/s
 Stream #0:0, 0, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: output url test.wav.
Applying option t (record or transcode "duration" seconds of audio/video) with argument 30.
Successfully parsed a group of options.
Opening an output file: test.wav.
File 'test.wav' already exists. Overwrite ? [y/N] y
[file @ 0x55c9f0f03280] Setting default whitelist 'file,crypto'
Successfully opened the file.
Stream mapping:
 Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Finishing stream 0:0 without any data written to it.
detected 4 logical cores
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'time_base' to value '1/48000'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'sample_rate' to value '48000'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'sample_fmt' to value 's16'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] Setting 'channel_layout' to value '0x3'
[graph_0_in_0_0 @ 0x55c9f0f05dc0] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[format_out_0_0 @ 0x55c9f0f060c0] Setting 'sample_fmts' to value 's16'
[AVFilterGraph @ 0x55c9f0f04be0] query_formats: 5 queried, 12 merged, 0 already done, 0 delayed
Output #0, wav, to 'test.wav':
 Metadata:
 ISFT : Lavf57.83.100
 Stream #0:0, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
 Metadata:
 encoder : Lavc57.107.100 pcm_s16le
size= 0kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (hw:CARD=capture,DEV=0):
 Input stream #0:0 (audio): 0 packets read (0 bytes); 0 frames decoded (0 samples);
 Total: 0 packets (0 bytes) demuxed
Output file #0 (test.wav):
 Output stream #0:0 (audio): 0 frames encoded (0 samples); 0 packets muxed (0 bytes);
 Total: 0 packets (0 bytes) muxed
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x55c9f0f033e0] Statistics: 3 seeks, 3 writeouts
Exiting normally, received signal 2.




What is wrong with the command ?


-
How can I fix video processing and 500 Error - (Laravel, FFmpeg)
19 juillet 2019, par San Martín Figueroa PabloI’m setting up a new website with Laravel for uploading videos...
I have read all the possible solutions but none of them help me to solve the issue...This is my issue : When I upload a small file (<10mb) the web works fine, the video get uploaded and the video get converted, the dashboard shows the converted videos---
When I try to upload a large file, the file get uploaded, the video get converted with a green frame on it (really uggly) and the site goes to a 500 server error...
I’m using Laravel Jobs to do the conversion.
My Controller code :
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use Symfony\Component\HttpFoundation\Response;
use Carbon;
use Closure;
use App\Jobs\ConvertVideoForPreview;
use FFMpeg\FFProbe;
use FFMpeg\Coordinate\Dimension;
use FFMpeg\Format\Video\X264;
use Pawlox\VideoThumbnail\Facade\VideoThumbnail;
use Pbmedia\LaravelFFMpeg\FFMpegFacade as FFMpeg;
use Illuminate\Contracts\Filesystem\Filesystem;
use App\Video;
class VideoController extends Controller
{
public function createVideo(){
return view('video.createVideo');
}
public function saveVideo(Request $request){
set_time_limit(0);
ini_set('memory_limit', '1024M');
//Validar Formulario
$validatedData = $this -> validate($request, [
'title' => 'required',
'description' => 'required',
'palabras' => 'required',
'video' => 'mimetypes:video/mp4,video/quicktime'
]);
$video = new Video();
$user = \Auth::user();
$video -> user_id = $user->id;
$video -> title = $request -> input('title');
$video -> description = $request -> input('description');
$video -> palabras = $request -> input('palabras');
$video_file = $request -> file('video');
if($video_file){
$video_path = 'original'.'_'.$video_file ->
getClientOriginalName();
Storage::disk('videos')-> put($video_path,
\File::get($video_file));
$videoUrl = storage_path('app/videos/').$video_path;
$storageUrl = storage_path('app/thumbs/');
$fileName = 'thumb'.'_'.time().'.jpg';
$second = 2;
VideoThumbnail::createThumbnail($videoUrl, $storageUrl,
$fileName, $second, $width = 640, $height = 480);
$video -> preview = $fileName;
$video -> video_path = $video_path;
}
$video -> save();
ConvertVideoForPreview::dispatch($video);
return redirect() -> route('home')
-> with (array(
'message' => 'El video se ha enviado con exito'));
}
public function getImage($filename){
$file = Storage::disk('thumbs') -> get($filename);
return new Response($file, 200);
}
public function getVideo($filename){
$file = Storage::disk('converted_videos') ->
get($filename);
return new Response($file, 200);
}
}This is my ConvertVideo Job :
<?php
namespace App\Jobs;
use App\Video;
use Carbon\Carbon;
use FFMpeg;
use FFMpeg\Format\Video\X264;
use Illuminate\Http\Request;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
class ConvertVideoForPreview implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable,
SerializesModels;
public $video;
public function __construct(Video $video)
{
$this -> video = $video;
}
public function handle()
{
$converted_name= 'preview'.'-'.$this -> video ->
video_path.'.mp4';
FFMpeg::open('videos/'.$this -> video -> video_path)
-> export()
-> inFormat(new \FFMpeg\Format\Video\X264)
-> save('converted_videos/'.$converted_name);
$this -> video -> update([
'video_preview' => $converted_name,
'processed' => true
]);
}
}One of my goals is to upload large video files (<=4GB), show a uploading process bar and a encoding process bar during the video upload.
I getting this error :
[core:error] [pid 14787:tid 139975366489856] [client
201.188.26.12:51022] Script timed out before returning headers:
index.php,It’s happend when the video es proccesing and the redirect to home dashboard it’s call...
The FFMPEG works :
[2019-07-19 17:20:41] local.INFO: ffprobe executed command successfully
[2019-07-19 17:21:52] local.INFO: ffmpeg executed command successfully
[2019-07-19 17:21:52] local.INFO: ffmpeg running command '/usr/local/bin/ffmpeg' '-y' '-i' '/home/tribus/public_html/storage/app/videos/original_Sequence 01.mov' '-threads' '12' '-vcodec' 'libx264' '-acodec' 'libfaac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-pass' '2' '-passlogfile' '/tmp/ffmpeg-passes5d31fbe9010e6ldt9s/pass-5d31fbe90152d' '/home/tribus/public_html/storage/app/converted_videos/preview-original_Sequence 01.mov.mp4'I have tried : Change all the memory and file size in PHP.ini, Nginx, Apache... (Probably I’m missing one)...
Changed timeouts too.
My environment : VPS 4GB 50GB, APACHE 2.4, PHP7.3, MySql MariaDB, WebServer : Apache-Nginx, Laravel 5.8.
Can anyone help me to reach this ?...
This is how the large video looks after converted and show 500 error in the browser :
Error video processed