
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (36)
-
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)
Sur d’autres sites (4745)
-
Video capturing in portrait mode but the orientation is wrong when played back with a media player
17 octobre 2016, par Ahmed MujtabaI’m trying to make a custom video app. The app captures a video using mediarecorder and uploads it to the website where it’s played on a html5 media player. The issue is that, when I capture the video in portrait mode, the playback video on the website and on vlc player have it’s orientation off by 90 degrees. I have tried various solution on the internet but none work for me.
Here’s what my code for setting up the media recorder :
private bool prepareMediaRecorder() {
Android.Hardware.Camera.Parameters p = mCamera.GetParameters();
List previewSizes = p.SupportedPreviewSizes.ToList();
//mCamera = GetCameraInstance();
//setCameraDisplayOrientation(Activity, cameraId, mCamera);
mediaRecorder = new MediaRecorder();
mCamera.Unlock();
mediaRecorder.SetCamera(mCamera);
mediaRecorder.SetAudioSource(AudioSource.Camcorder);
mediaRecorder.SetVideoSource(VideoSource.Camera);
mediaRecorder.SetOrientationHint(CameraS.result);
if (currentapiVersion >= 16)
{
mediaRecorder.SetProfile(CamcorderProfile.Get(CamcorderQuality.High)); // requires API Level 8 or higher
}
else
{
mediaRecorder.SetProfile(CamcorderProfile.Get(CamcorderQuality.Q480p)); // requires API Level 8 or higher
}
//mediaRecorder.SetVideoFrameRate(30);
mediaRecorder.SetOutputFile(localPath);
mediaRecorder.SetMaxDuration(600000); // Set max duration 60 sec.
mediaRecorder.SetMaxFileSize(50000000); // Set max file size 50M
mediaRecorder.SetVideoSize(previewSizes[0].Width, previewSizes[0].Height);
mediaRecorder.SetPreviewDisplay(mPreview.Holder.Surface);
mediaRecorder.SetOrientationHint(getDisplayOrientationAngle());
try
{
mediaRecorder.Prepare();
}
catch (IllegalStateException e)
{
releaseMediaRecorder();
return false;
}
catch (Java.IO.IOException e)
{
releaseMediaRecorder();
return false;
}
return true;
}
public int getDisplayOrientationAngle() {
//Log.e("", "setDisplayOrientationAngle is call");
int angle;
var mDisplayRotation = Activity.WindowManager.DefaultDisplay.Rotation;
// switch (MeasurementNativeActivity.DisplayRotation) {
switch (mDisplayRotation)
{
case SurfaceOrientation.Rotation0: // This is display orientation
angle = 90; // This is camera orientation
break;
case SurfaceOrientation.Rotation90:
angle = 0;
break;
case SurfaceOrientation.Rotation180:
angle = 270;
break;
case SurfaceOrientation.Rotation270:
angle = 180;
break;
default:
angle = 90;
break;
}
//Log.v("", "media recorder displayRotation: " + mDisplayRotation);
//Log.v("", "media recorder angle: " + angle);
return angle;
}The orientation of the video is fine when played on the phone app but on the website it’s not. I tried to use FFMPEG encoder to rotate the video clockwise. This seemed to fix the orientation of the video, however the aspect ratio of the video is all messed up. The video is stretched vertically and goes off screen.
The command I’m using to rotate and encode the video is as follows :-y -i inputPath -vf scale=640:480,setsar=1,transpose=1 -strict experimental -r 25 -vcodec mpeg4 -b 1000k ab 48000 -ac 2 -ar 22050 destinationPath
I will really appreciate if someone can help me fix either the orientation of the video or the aspect ration after encoding the video.
Cheers !
Edit.
Here’s the readout of the input file :
General
Complete name : C:\Users\Ahmed\Desktop\9adcdb56-500e-4d3f-8fb2-ccf20c680422_yt.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 6.30 MiB
Duration : 12s 437ms
Overall bit rate : 4 251 Kbps
Encoded date : UTC 2016-05-29 23:54:30
Tagged date : UTC 2016-05-29 23:54:30
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.1
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Format settings, GOP : M=1, N=31
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 12s 323ms
Bit rate : 3 967 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Rotation : 90°
Frame rate mode : Variable
Frame rate : 29.700 fps
Minimum frame rate : 29.354 fps
Maximum frame rate : 30.040 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.145
Stream size : 5.83 MiB (92%)
Title : VideoHandle
Language : English
Encoded date : UTC 2016-05-29 23:54:30
Tagged date : UTC 2016-05-29 23:54:30
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : 40
Duration : 12s 437ms
Source duration : 12s 454ms
Bit rate mode : Constant
Bit rate : 128 Kbps
Nominal bit rate : 96.0 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 194 KiB (3%)
Source stream size : 194 KiB (3%)
Title : SoundHandle
Language : English
Encoded date : UTC 2016-05-29 23:54:30
Tagged date : UTC 2016-05-29 23:54:30
mdhd_Duration : 12454 -
mov : Update colr values
19 octobre 2016, par Vittorio Giovaramov : Update colr values
For ’nclx’, the latest edition of the standard switched from JPEG XR
to 23001-8, which matches the current order of our entries. Bounds
are preserved as a sanity check.For ’nclc’, qtff edition 2016-09-13 introduced a few new entries.
Signed-off-by : Vittorio Giovara <vittorio.giovara@gmail.com>
-
How to convert webp images to MP4 video using ffmpeg
12 octobre 2016, par Sunny TambiI have tried many possible command line options with ffmpeg, however not getting this to work. I want to convert series of webp images to a mp4 video.
Some commands that i tried are :ffmpeg -i img%04d.webp out.mp4
ffmpeg -i img%04d.webp -c:v libx264 out.mp4
ffmpeg -i img%04d.webp -pix_fmt yuv420p out.mp4
ffmpeg -i img%04d.webp -c:v libx264 -pix_fmt yuv420p -crf 25 out.mp4
ffmpeg -i img%04d.webp -c:v libx264 -pix_fmt yuv420p -crf 25 -b:v 0 out.mp4None of them creates an mp4 video. A mp4 file, though, gets created, however it is of 0 sec. Here is a sample output of one of the execution :
ffmpeg -i img%04d.webp -c:v libx264 -pix_fmt yuv420p -crf 25 -y out.mp4
ffmpeg version N-81045-g450cf40 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 50.100 / 57. 50.100
libavformat 57. 42.100 / 57. 42.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, image2, from 'img%04d.webp':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0:0: Video: webp, yuva420p(tv, bt470bg/unknown/unknown), 320x568, 25 tbr, 25 tbn, 25 tbc
[libx264 @ 00000000006dbbc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 00000000006dbbc0] profile High, level 2.1
[libx264 @ 00000000006dbbc0] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=25.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 00000000006d8700] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Output #0, mp4, to 'out.mp4':
Metadata:
encoder : Lavf57.42.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 320x568, q=-1--1, 25 fps, 12800 tbn, 25 tbc
Metadata:
encoder : Lavc57.50.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (webp (native) -> h264 (libx264))
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=30.0 Lsize= 3kB time=00:00:00.00 bitrate=265435.9kbits/s speed=0.011x video:2kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 44.661823%
[libx264 @ 00000000006dbbc0] frame I:1 Avg QP:23.37 size: 1100
[libx264 @ 00000000006dbbc0] mb I I16..4: 24.4% 71.5% 4.0%
[libx264 @ 00000000006dbbc0] 8x8 transform intra:71.5%
[libx264 @ 00000000006dbbc0] coded y,uvDC,uvAC intra: 6.1% 5.4% 4.2%
[libx264 @ 00000000006dbbc0] i16 v,h,dc,p: 80% 14% 6% 1%
[libx264 @ 00000000006dbbc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 46% 5% 48% 0% 0% 0% 0% 0% 0%
[libx264 @ 00000000006dbbc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 20% 42% 2% 2% 2% 2% 2% 3%
[libx264 @ 00000000006dbbc0] i8c dc,h,v,p: 89% 9% 1% 0%
[libx264 @ 00000000006dbbc0] kb/s:220.00Excerpt from the above :
frame=1
fps=0.0
time=00:00:00.00
video:2kBThis should give the idea of what I am trying to say.
Need help if someone can tell how to convert a series of webp images to MP4 video.