
Recherche avancée
Médias (3)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Collections - Formulaire de création rapide
19 février 2013, par
Mis à jour : Février 2013
Langue : français
Type : Image
Autres articles (77)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
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 -
ANNEXE : Les plugins utilisés spécifiquement pour la ferme
5 mars 2010, parLe site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)
Sur d’autres sites (10025)
-
How to remove black bars with ffmpeg ?
3 novembre 2022, par watch-thisI'm trying to remove black bars from a 637×478 video




here's what happens :


% ffmpeg -i sfu11.mp4 -vf "scale=ih*16/9:ih,scale=iw:-2,setsar=1" -y out.mp4 
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.102)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/5.1.2 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sfu11.mp4':
 Metadata:
 major_brand : isom
 minor_version : 512
 compatible_brands: isomiso2mp41
 encoder : Lavf57.83.100
 Duration: 01:02:49.37, start: 0.000000, bitrate: 15 kb/s
 Chapters:
 Chapter #0:0: start 0.000000, end 99.833000
 Metadata:
 title : Chapter 01
 Chapter #0:1: start 99.833000, end 701.818000
 Metadata:
 title : Chapter 02
 Chapter #0:2: start 701.818000, end 1213.746000
 Metadata:
 title : Chapter 03
 Chapter #0:3: start 1213.746000, end 1726.892000
 Metadata:
 title : Chapter 04
 Chapter #0:4: start 1726.892000, end 2167.882000
 Metadata:
 title : Chapter 05
 Chapter #0:5: start 2167.882000, end 2816.430000
 Metadata:
 title : Chapter 06
 Chapter #0:6: start 2816.430000, end 3769.366000
 Metadata:
 title : Chapter 07
 Stream #0:0[0x1](und): Video: hevc (Main 10) (hvc1 / 0x31637668), yuv420p10le(tv, progressive), 708x478 [SAR 9:10 DAR 1593:1195], 544 kb/s, 23.98 fps, 23.98 tbr, 24k tbn (default)
 Metadata:
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, 5.1, fltp, 341 kb/s (default)
 Metadata:
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
 Stream #0:2[0x3](eng): Data: bin_data (text / 0x74786574)
 Metadata:
 handler_name : SubtitleHandler
Stream mapping:
 Stream #0:0 -> #0:0 (hevc (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x7f8630806e00] width not divisible by 2 (849x478)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
[aac @ 0x7f8630809d00] Qavg: 15927.165
[aac @ 0x7f8630809d00] 2 frames left in the queue on closing
Conversion failed!



However, the same flags work using
ffplay
but I get horizontal black bars instead.

% ffplay -i sfu11.mp4 -vf "scale=ih\*16/9:ih,scale=iw:-2,setsar=1"





I also tried using the cropdetect filter. It doesn't work and end up with the very same black bars while passing
-vf crop=...
.

-
How to convert png images to a HEVC(h265) video with alpha
20 décembre 2022, par ImWHI want to convert a sequence of png images to a HEVC video with alpha, I would like to use ffmpeg to do this work and find the following command(images name are p01.png, p02.png...) :


ffmpeg -framerate 10 -i p%02d.png -c:v hevc_videotoolbox -require_sw 1 -allow_sw 1 -alpha_quality 0.5 -vtag hvc1 hevc.mov



the print is here :


ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
 built with Apple clang version 14.0.0 (clang-1400.0.29.202)
 configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/5.1.2_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-neon
 libavutil 57. 28.100 / 57. 28.100
 libavcodec 59. 37.100 / 59. 37.100
 libavformat 59. 27.100 / 59. 27.100
 libavdevice 59. 7.100 / 59. 7.100
 libavfilter 8. 44.100 / 8. 44.100
 libswscale 6. 7.100 / 6. 7.100
 libswresample 4. 7.100 / 4. 7.100
 libpostproc 56. 6.100 / 56. 6.100
Input #0, image2, from 'p%02d.png':
 Duration: 00:00:09.60, start: 0.000000, bitrate: N/A
 Stream #0:0: Video: png, rgba(pc), 375x812 [SAR 3779:3779 DAR 375:812], 10 fps, 10 tbr, 10 tbn
Stream mapping:
 Stream #0:0 -> #0:0 (png (native) -> hevc (hevc_videotoolbox))
Press [q] to stop, [?] for help
[1] 16348 trace trap ffmpeg -framerate 10 -i p%02d.png -c:v hevc_videotoolbox -require_sw 1 1 0.



It seems like there is no error and the video has been generated but the size of video is always
0kb
, I try to change the parameter for command but nothing changed, so is there something working with the command ? or Is there is a simple way to create the HEVC video using png image ? Thanks

My Environment :
Apple silicon(MacBook with M1 Pro clip) Mac OS 13.0
ffmpeg : 5.1.2


-
How do I get an InputStream out of a Mono ?
30 octobre 2022, par EinfariBear with my noobness, I am learning web-flux. I had this simple application that takes a video and extract the audio using FFprobe and FFmpeg, so I thought of redoing it reactively, but I am failing miserably...


Controller :


@PostMapping("/upload")
public String upload(@RequestPart("file") Mono<filepart> filePartMono, final Model model) {
 Flux<string> filenameList = mediaComponent.extractAudio(filePartMono);
 model.addAttribute("filenameList", new ReactiveDataDriverContextVariable(filenameList));
 return "download";
}
</string></filepart>


Function to get audio streams out of the video :


public Mono<ffproberesult> getAudioStreams(InputStream inputStream) {
 try {
 return Mono.just(FFprobe.atPath(FFprobePath)
 .setShowStreams(true)
 .setSelectStreams(StreamType.AUDIO)
 .setLogLevel(LogLevel.INFO)
 .setInput(inputStream)
 .execute());
 } catch (JaffreeException e) {
 log.error(e.getMessage(), e);
 throw new MediaException("Audio formats could not be identified.");
 }
}
</ffproberesult>


Attempt 1 :


public Flux<string> extractAudio(Mono<filepart> filePartMono) {
 filePartMono.flatMapMany(Part::content)
 .map(dataBuffer -> dataBuffer.asInputStream(true))
 .flatMap(this::getAudioStreams)
 .subscribe(System.out::println);
 ...
}
</filepart></string>


Attempt 2 :


public Flux<string> extractAudio(Mono<filepart> filePartMono) {
 filePartMono.flatMapMany(Part::content)
 .reduce(InputStream.nullInputStream(), (inputStream, dataBuffer) -> new SequenceInputStream(
 inputStream, dataBuffer.asInputStream()
 ))
 .flatMap(this::getAudioStreams)
 .subscribe(System.out::println);
 ...
}
</filepart></string>


Attempt 3 :


public Flux<string> extractAudio(Mono<filepart> filePartMono) {
 DataBufferUtils.write(filePartMono.flatMapMany(Part::content), OutputStream.nullOutputStream())
 .map(dataBuffer -> dataBuffer.asInputStream(true))
 .flatMap(this::getAudioStreams)
 .subscribe(System.out::println);
 ...
}
</filepart></string>


Attempt 1 and 3 seems to be the same in the end, FFprobe complains as follows :


2022-10-30 11:24:30.292 WARN 79049 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9162702340] [warning] STSZ atom truncated
2022-10-30 11:24:30.292 ERROR 79049 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9162702340] [error] stream 0, contradictionary STSC and STCO
2022-10-30 11:24:30.292 ERROR 79049 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9162702340] [error] error reading header
2022-10-30 11:24:30.294 ERROR 79049 --- [ StdErr] c.g.k.jaffree.process.BaseStdReader : [error] tcp://127.0.0.1:51532: Invalid data found when processing input
2022-10-30 11:24:30.295 INFO 79049 --- [oundedElastic-3] c.g.k.jaffree.process.ProcessHandler : Process has finished with status: 1
2022-10-30 11:24:30.409 ERROR 79049 --- [oundedElastic-3] c.e.s.application.MediaComponent : Process execution has ended with non-zero status: 1. Check logs for detailed error message.



Attempt 2 produces multiple of these :


Exception in thread "Runnable-0" java.lang.StackOverflowError
 at java.base/java.io.SequenceInputStream.read(SequenceInputStream.java:198)



Could anybody point me in the right direction ? What am I doing wrong ? By the way, I am outputting to console just to see a result, but in the end I need to take all the outputted streams and pass them as arguments to another function that will finally extract the audio, so I need to figure out that as well.


Thank you in advance.