
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (31)
-
Encodage et transformation en formats lisibles sur Internet
10 avril 2011MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...) -
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community.
Sur d’autres sites (3041)
-
In Flutter, how to get image pixel
12 janvier 2024, par Pianonemy code here


var response = await Dio().get(
 url,
 options: Options(responseType: ResponseType.bytes)
);
Uint8List? srcImage = Uint8List.fromList(response.data);
Uint8List? watermark = await captureWaterMark();
Image i = Image.memory(srcImage!);
//how can I get the pixel (Image i) such like 1920*1080 or just width/hight pixel
...tell me how to do...
srcImage = await addWaterMarkByFfmpegCommand(srcImage, watermark);
 final result = await ImageGallerySaver.saveImage(
 srcImage!, name: name,
 );



i need get the pic pixel so that i can use it in ffmpeg command, it a func that add a watermark into srcImage, but cause their pixel ratio too diff to adapted watermark


i try to get pixel from ffmpeg... but i failed


/// addWaterMark by using ffmpeg Command
Future addWaterMarkByFfmpegCommand(Uint8List srcImg, Uint8List watermark) async {
 try {
 final Directory tempDir = await Directory.systemTemp.createTemp();
 final File image1File = File('${tempDir.path}/srcImg.jpg');
 await image1File.writeAsBytes(srcImg);
 final File image2File = File('${tempDir.path}/watermark.png');
 await image2File.writeAsBytes(watermark);

 final String outputFilePath = '${tempDir.path}/output.jpg';
 //when i get srcImage pixel, the positions in bold(iw*1) in the following commands will be replaced to make watermark adapted
 final String command =
 '-i ${image1File.path} -i ${image2File.path} -filter_complex "[1:v]scale=**iw*1**:-1[v1];[0:v][v1]overlay=10:10" -frames:v 1 $outputFilePath';
 await FFmpegKit.execute(command);

 final File outputFile = File(outputFilePath);
 final Uint8List outputBytes = await outputFile.readAsBytes();
 return outputBytes;
 } catch (e) {
 print('Error executing ffmpeg command: $e');
 }
 return null;
}



ps : i am new to flutter and ffmpeg, plz help me, I'd appreciate, thanks alot


-
codification of whammy.js fails
5 novembre 2022, par DevStarlightI've been developing a mediastream application capturing video and audio using mediastreamrecorder and whammy.js.



In this process I have found a issue and I suspect it is related to the way whammy.js render and store into a blob var.



I realiced about this because I was trying to encode audio (wav) and video (webm) into mp4 with
ffmpeg
.
For any reason I don't really know at all, some of the videos were encoded correctly but others were not. When It wasn't encoded correctly, the video was not fluent but the audio was.


I've been using this ffmpeg sentence :



'ffmpeg -i path/to/file.wav -i path/to/file.webm -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -map 0:0 -map 1:0 -c:v libx264 -preset ultrafast -qp 0 -c:a libvo_aacenc -b:a 128k path/to/file.mp4'




Then checking with ffprobe on a good conversion and a bad conversion into mp4 with the same camera I got what it comes :



For the good one :



ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
 built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
 configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
 libavutil 55. 9.100 / 55. 9.100
 libavcodec 57. 16.101 / 57. 16.101
 libavformat 57. 19.100 / 57. 19.100
 libavdevice 57. 0.100 / 57. 0.100
 libavfilter 6. 19.100 / 6. 19.100
 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 '/home/devstarlight/Escritorio/178.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf56.36.100
 Duration: 00:00:04.50, start: 0.036281, bitrate: 5821 kb/s
 Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 Stream #0:1(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p, 400x400 [SAR 1:1 DAR 1:1], 5841 kb/s, 16 fps, 16 tbr, 16384 tbn, 32 tbc (default)
 Metadata:
 handler_name : VideoHandler




For the wrong conversion :



ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
 built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
 configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
 libavutil 55. 9.100 / 55. 9.100
 libavcodec 57. 16.101 / 57. 16.101
 libavformat 57. 19.100 / 57. 19.100
 libavdevice 57. 0.100 / 57. 0.100
 libavfilter 6. 19.100 / 6. 19.100
 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 '/home/devstarlight/Escritorio/179.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2avc1mp41
 encoder : Lavf56.36.100
 Duration: 00:00:04.50, start: 0.036281, bitrate: 12815 kb/s
 Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 Stream #0:1(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p, 400x400 [SAR 1:1 DAR 1:1], 13381 kb/s, 1000.24 fps, 1k tbr, 16k tbn, 2k tbc (default)
 Metadata:
 handler_name : VideoHandler




Then I looked into the webm files directly and I realiced that there was no fps defined in the bad file :



The good record :



ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
 built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
 configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
 libavutil 55. 9.100 / 55. 9.100
 libavcodec 57. 16.101 / 57. 16.101
 libavformat 57. 19.100 / 57. 19.100
 libavdevice 57. 0.100 / 57. 0.100
 libavfilter 6. 19.100 / 6. 19.100
 libswscale 4. 0.100 / 4. 0.100
 libswresample 2. 0.101 / 2. 0.101
 libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from '/home/devstarlight/Escritorio/179.webm':
 Metadata:
 encoder : whammy
 Duration: 00:00:04.25, start: 0.000000, bitrate: 1859 kb/s
 Stream #0:0: Video: vp8, yuv420p, 400x400, SAR 1:1 DAR 1:1, 1k tbr, 1k tbn, 1k tbc (default)




The bad record :



ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
 built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
 configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
 libavutil 55. 9.100 / 55. 9.100
 libavcodec 57. 16.101 / 57. 16.101
 libavformat 57. 19.100 / 57. 19.100
 libavdevice 57. 0.100 / 57. 0.100
 libavfilter 6. 19.100 / 6. 19.100
 libswscale 4. 0.100 / 4. 0.100
 libswresample 2. 0.101 / 2. 0.101
 libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from '/home/devstarlight/Escritorio/178.webm':
 Metadata:
 encoder : whammy
 Duration: 00:00:04.36, start: 0.000000, bitrate: 1461 kb/s
 Stream #0:0: Video: vp8, yuv420p, 400x400, SAR 1:1 DAR 1:1, 16 fps, 16 tbr, 1k tbn, 1k tbc (default)




ffmpeg
output rate option (-r) is empty and rate is forced to 25 fps (because in fact in thewebm
it doesn't exist).


Is that issue registered at any point or someone know how to solve it ?



Thanks in advice.


-
codification of whammy.js fails
17 décembre 2015, par DevStarlightI’ve been developing a mediastream application capturing video and audio using mediastreamrecorder and whammy.js.
In this process I have found a issue and I suspect it is related to the way whammy.js render and store into a blob var.
I realiced about this because I was trying to encode audio (wav) and video (webm) into mp4 with
ffmpeg
.
For any reason I don’t really know at all, some of the videos were encoded correctly but others were not. When It wasn’t encoded correctly, the video was not fluent but the audio was.I’ve been using this ffmpeg sentence :
'ffmpeg -i path/to/file.wav -i path/to/file.webm -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -map 0:0 -map 1:0 -c:v libx264 -preset ultrafast -qp 0 -c:a libvo_aacenc -b:a 128k path/to/file.mp4'
Then checking with ffprobe on a good conversion and a bad conversion into mp4 with the same camera I got what it comes :
For the good one :
ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 19.100 / 6. 19.100
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 '/home/devstarlight/Escritorio/178.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.36.100
Duration: 00:00:04.50, start: 0.036281, bitrate: 5821 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:1(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p, 400x400 [SAR 1:1 DAR 1:1], 5841 kb/s, 16 fps, 16 tbr, 16384 tbn, 32 tbc (default)
Metadata:
handler_name : VideoHandlerFor the wrong conversion :
ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 19.100 / 6. 19.100
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 '/home/devstarlight/Escritorio/179.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf56.36.100
Duration: 00:00:04.50, start: 0.036281, bitrate: 12815 kb/s
Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream #0:1(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv420p, 400x400 [SAR 1:1 DAR 1:1], 13381 kb/s, 1000.24 fps, 1k tbr, 16k tbn, 2k tbc (default)
Metadata:
handler_name : VideoHandlerThen I looked into the webm files directly and I realiced that there was no fps defined in the bad file :
The good record :
ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 19.100 / 6. 19.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from '/home/devstarlight/Escritorio/179.webm':
Metadata:
encoder : whammy
Duration: 00:00:04.25, start: 0.000000, bitrate: 1859 kb/s
Stream #0:0: Video: vp8, yuv420p, 400x400, SAR 1:1 DAR 1:1, 1k tbr, 1k tbn, 1k tbc (default)The bad record :
ffprobe version N-77003-g64f7db5 Copyright (c) 2007-2015 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration: --prefix=/home/devstarlight/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/devstarlight/ffmpeg_build/include --extra-ldflags=-L/home/devstarlight/ffmpeg_build/lib --bindir=/home/devstarlight/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
libavutil 55. 9.100 / 55. 9.100
libavcodec 57. 16.101 / 57. 16.101
libavformat 57. 19.100 / 57. 19.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 19.100 / 6. 19.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from '/home/devstarlight/Escritorio/178.webm':
Metadata:
encoder : whammy
Duration: 00:00:04.36, start: 0.000000, bitrate: 1461 kb/s
Stream #0:0: Video: vp8, yuv420p, 400x400, SAR 1:1 DAR 1:1, 16 fps, 16 tbr, 1k tbn, 1k tbc (default)ffmpeg
output rate option (-r) is empty and rate is forced to 25 fps (because in fact in thewebm
it doesn’t exist).Is that issue registered at any point or someone know how to solve it ?
Thanks in advice.