
Recherche avancée
Médias (1)
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (41)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
-
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...)
Sur d’autres sites (4199)
-
Is there a way to convert uploaded videos to browser MP4 using most basic ffmpeg ?
22 janvier 2016, par PeterTheLobsterI am trying to convert videos uploaded to my website to browser friendly mp4 using ffmpeg.
The Problem : the website is hosted by a company and it seems like it does not have the codecs I need (the ones I’m aware to be browser-friendly.) I have learned that h264 and libx264 are the codecs I would want to encode the mp4 videos to, but libx264 is not present and h264 is decodable only. Doing :
exec("ffmpeg -codecs", $output);
tells me that :
D V D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
I have tried converting the videos using mpeg4 codecs, but those are not supported natively in browsers it appears :
$command ="$ffmpeg -i $target -b 1500k -vcodec mpeg4 -pix_fmt yuv420p -acodec aac -strict experimental $converted2 2>&1";
exec($command, $output);The videos converted using the method above play only audio in chrome for example (the mpeg4 codec encoding is supported).
Edit : I was able to convert videos to ogg and webm, but those won’t cover all browsers as far as I’m aware. Especially not the mobile ones anyway.
Question : is there another type of basic ffmpeg, browser friendly mp4 codecs that I am not ware of or was there something wrong with my conversion $command above ? Or would I have to somehow try to install libx264 codecs and libraries ? (My guess is, that I probably cant do that to their servers, right ?)
-
PHP FFMPEG match the Instagram Video Requirements
19 février 2021, par LinesofcodeThis are the Instagram requirements in order to upload a video :


- Container: MOV or MP4 (MPEG-4 Part 14), no edit lists, moov atom at the front of the file.
- Audio codec: AAC, 48khz sample rate maximum, 1 or 2 channels (mono or stereo).
- Video codec: HEVC or H264, progressive scan, closed GOP, 4:2:0 chroma subsampling.
- Frame rate: 23-60 FPS.
- Picture size:
 - Maximum columns (horizontal pixels): 1920
 - Minimum aspect ratio [cols / rows]: 4 / 5
 - Maximum aspect ratio [cols / rows]: 16 / 9
 - Video bitrate: VBR, 5Mbps maximum
- Audio bitrate: 128kbps
- Duration: 60 seconds maximum, 3 seconds minimum
- File size: 100MB maximum



I'm using the https://github.com/PHP-FFMpeg/PHP-FFMpeg library and I'm able to get the metadata of the video this way :


$ffprobe = \FFMpeg\FFProbe::create();
$video = $ffprobe->streams('my_sample_video.mp4')->videos()->first();
$audio = $ffprobe->streams('my_sample_video.mp4')->audios()->first();



Printing
$video
&$audio
returns respectively the following data :

--- video ---
[index] => 0
[codec_name] => h264
[codec_long_name] => H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
[profile] => Baseline
[codec_type] => video
[codec_time_base] => 1/1200
[codec_tag_string] => avc1
[codec_tag] => 0x31637661
[width] => 848
[height] => 480
[coded_width] => 848
[coded_height] => 480
[has_b_frames] => 0
[sample_aspect_ratio] => 0:1
[display_aspect_ratio] => 0:1
[pix_fmt] => yuv420p
[level] => 31
[color_range] => tv
[color_space] => bt709
[color_transfer] => bt709
[color_primaries] => bt709
[chroma_location] => left
[refs] => 1
[is_avc] => 1
[nal_length_size] => 4
[r_frame_rate] => 25/1
[avg_frame_rate] => 25/1
[time_base] => 1/600
[start_pts] => 0
[start_time] => 0.000000
[duration_ts] => 57888
[duration] => 96.480000
[bit_rate] => 1436391
[bits_per_raw_sample] => 8
[nb_frames] => 2412

--- audio ---
[index] => 1
[codec_name] => aac
[codec_long_name] => AAC (Advanced Audio Coding)
[profile] => LC
[codec_type] => audio
[codec_time_base] => 1/44100
[codec_tag_string] => mp4a
[codec_tag] => 0x6134706d
[sample_fmt] => fltp
[sample_rate] => 44100
[channels] => 2
[channel_layout] => stereo
[bits_per_sample] => 0
[r_frame_rate] => 0/0
[avg_frame_rate] => 0/0
[time_base] => 1/44100
[start_pts] => 0
[start_time] => 0.000000
[duration_ts] => 4255744
[duration] => 96.502132
[bit_rate] => 62026
[max_bit_rate] => 64000
[nb_frames] => 4156



Some things are easy to verify like the Video Codec, Audio Codec & Duration, but how to I manage to verify the rest ?


I also noticed that all the MP4 & MOV video samples I use, the metadata of
codec_long_name
always returns "MPEG-4 part 10" and the requirement is "MPEG-4 Part 14".

-
ffmpeg minimal requirements configuration for encoding and decoding h264 files
14 novembre 2013, par TheSquadI'm trying to compile ffmpeg with minimal requirements in order to encode/decode with h264.
So far my command line configuration is :
./configure --disable-yasm --disable-everything --enable-encoder=libx264 --enable-encoder=libfaac --enable-decoder=h264 --enable-muxer=h264 --enable-demuxer=h264 --enable-parser=h264 --enable-protocol=file
once compiled, I try this :
./ffmpeg -i ~/Dropbox/TestFile.mov -vcodec libx264 test.mp4
but I get an error :
ffmpeg version N-58081-g2925571 Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 14 2013 15:49:58 with Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
configuration: --disable-yasm --disable-everything --enable-encoder=libx264 --enable-encoder=libfaac --enable-decoder=h264 --enable-muxer=h264 --enable-demuxer=h264 --enable-parser=h264 --enable-protocol=file
libavutil 52. 52.100 / 52. 52.100
libavcodec 55. 43.100 / 55. 43.100
libavformat 55. 21.100 / 55. 21.100
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 91.100 / 3. 91.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/mGs/Dropbox/TestFile.mov':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2013-06-23 14:33:09
model : iPhone 4S
model-fra : iPhone 4S
encoder : 6.0
encoder-fra : 6.0
date : 2013-06-23T16:33:09+0200
date-fra : 2013-06-23T16:33:09+0200
make : Apple
make-fra : Apple
Duration: 00:00:42.09, start: 0.000000, bitrate: 20960 kb/s
Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 20880 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 1200 tbc (default)
Metadata:
rotate : 180
creation_time : 2013-06-23 14:33:09
handler_name : Core Media Data Handler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, 63 kb/s (default)
Metadata:
creation_time : 2013-06-23 14:33:09
handler_name : Core Media Data Handler
[NULL @ 0x7fd999802e00] Unable to find a suitable output format for 'test.mp4'
test.mp4: Invalid argumentThis is probably coming from the fact that I have forgot something to enable on the ffmpeg configuration... But I can't found out what.
The test file is a video got from iPhone 4S Camera.