
Recherche avancée
Autres articles (42)
-
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 -
Récupération d’informations sur le site maître à l’installation d’une instance
26 novembre 2010, parUtilité
Sur le site principal, une instance de mutualisation est définie par plusieurs choses : Les données dans la table spip_mutus ; Son logo ; Son auteur principal (id_admin dans la table spip_mutus correspondant à un id_auteur de la table spip_auteurs)qui sera le seul à pouvoir créer définitivement l’instance de mutualisation ;
Il peut donc être tout à fait judicieux de vouloir récupérer certaines de ces informations afin de compléter l’installation d’une instance pour, par exemple : récupérer le (...) -
XMP PHP
13 mai 2011, parDixit Wikipedia, XMP signifie :
Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)
Sur d’autres sites (5427)
-
Filter concat has an unconnected output while Video concatenation in ffmpeg wrapper in java
28 février 2024, par ThorI am trying to stitch variable number of videos using ffmpeg wrapper.


I have this code :


private void videoStich(List<string> videoPaths){
 FFmpeg ffmpeg = null;
 FFprobe ffprobe=null;
 String stitchedOutputPath = outputFolder + "/stitched_output.mp4";

 try {
 ffmpeg = new FFmpeg();
 ffprobe = new FFprobe();
 } catch (IOException e) {
 throw new RuntimeException(e);
 }


 FFmpegBuilder builder = new FFmpegBuilder();

 for (int i = 0; i < videoPaths.size(); i++) {
 String videoPath = videoPaths.get(i);
 builder.addInput(videoPath);
 }

 // Add complex filter for concatenation
 StringBuilder complexFilter = new StringBuilder();
 for (int i = 0; i < videoPaths.size(); i++) {
 complexFilter.append("[").append(i).append(":v][").append(i).append(":a]");
// if (i < videoPaths.size() - 1) {
// complexFilter.append("[");
// }
 }
 complexFilter.append("concat=n=").append(videoPaths.size()).append(":v=1:a=1[v][a]");

 builder.setComplexFilter(complexFilter.toString())
 .addOutput(stitchedOutputPath)
 .setFormat("mp4")
 .done();

 FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);
 executor.createJob(builder).run();
 }
</string>


but getting this error :


2024-02-28T16:30:53.033+05:30 INFO 4711 --- [sample_project] [pool-3-thread-1] net.bramp.ffmpeg.RunProcessFunction : ffmpeg -version
2024-02-28T16:30:53.126+05:30 INFO 4711 --- [sample_project] [pool-3-thread-1] net.bramp.ffmpeg.RunProcessFunction : ffmpeg -y -v error -i src/main/resources/cutted_videos/0_trimmed.mp4 -i src/main/resources/cutted_videos/1_trimmed.mp4 -filter_complex [0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1[v][a] -f mp4 src/main/resources/cutted_videos/stitched_output.mp4
Filter concat has an unconnected output
java.lang.RuntimeException: java.io.IOException: ffmpeg returned non-zero exit status. Check stdout.



I have been trying to fix this since a long time and didn't find any issue with the filter, it is looking good to me. Can anyone help me with it ?


EDIT :
I found that when I use this command in terminal :


ffmpeg -i in1.mp4 -i in2.mp4\
 -filter_complex "[0:v] [0:a] [1:v] [1:a] \
concat=n=2:v=1:a=1 [v] [a]" \
 -f mp4 output_test5.mp4



it didn ;t work
while when i used this :


ffmpeg -i in1.mp4 -i in2.mp4\
 -filter_complex "[0:v] [0:a] [1:v] [1:a] \
concat=n=2:v=1:a=1 [v] [a]" \
 -f mp4 -map "[v]" -map "[a]" output_test4.mp4



it worked. I think i need to add -map "[v]" -map "[a]" somehow in the code.


but when i try to add :
builder.setComplexFilter(complexFilter.toString())
.addOutput(stitchedOutputPath)
.setFormat("mp4")
.map()
.done() ;


or


builder.setComplexFilter(complexFilter.toString())
.addOutput(stitchedOutputPath)
.setFormat("mp4")
.setMap()
.done() ;


both .set() or setMap() doesn't exist. What to do, how to do ?


-
Yet another ffmpeg concat audio sync issue [closed]
15 mars 2024, par DemiurgI've read through dozens of posts, tried many suggestions, nothing seems to work for me. The funny part is that the video is fine in some players (e.g. Quicktime) but not the others (e.g. Chrome).


This is what I currently use :


ffmpeg -i segment.mp4 -q 0 -c copy segment.ts
ffmpeg -f concat -i videos.txt -c copy -y final.mp4



This is what ffmpeg shows for the originals


Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '52M35S_1710280355.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42isom
 creation_time : 2024-03-12T21:53:35.000000Z
 Duration: 00:00:59.86, start: 0.000000, bitrate: 851 kb/s
 Stream #0:0[0x1](und): Audio: opus (Opus / 0x7375704F), 48000 Hz, mono, fltp, 10 kb/s (default)
 Metadata:
 creation_time : 2024-03-12T21:53:35.000000Z
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 1920x1080, 836 kb/s, 10.02 fps, 10 tbr, 90k tbn (default)
 Metadata:
 creation_time : 2024-03-12T21:53:35.000000Z
 vendor_id : [0][0][0][0]



-
FFmpeg : Specify pixel format for STD_IN input
27 février 2024, par ShadowMagic896This is the current command :


ffmpeg -i pipe:0 -pix_fmt yuv420p -f mp4 -vf "transpose=1" -f matroska pipe:1


Essentially, it takes an MP4 file, rotates it 90 degrees, and converts it back to mtk and outputs it to STD_OUT.


This is the error :


WARNING:root:[mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9979dd00] stream 0, offset 0x50: partial file
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9979dd00] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 170x144, 32 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp41isom
 creation_time : 2024-02-26T20:53:03.000000Z
 Duration: 00:00:03.88, start: 0.000000, bitrate: N/A
 Stream #0:0[0x1](und): Video: h264 (avc1 / 0x31637661), none, 170x144, 32 kb/s, 30 fps, 30 tbr, 30k tbn (default)
 Metadata:
 creation_time : 2024-02-26T20:53:03.000000Z
 handler_name : VideoHandler
 vendor_id : [0][0][0][0]
 encoder : AVC Coding
 Stream #0:1[0x2](und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
 Metadata:
 creation_time : 2024-02-26T20:53:03.000000Z
 handler_name : SoundHandler
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
 Stream #0:1 -> #0:1 (aac (native) -> vorbis (libvorbis))
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9979dd00] stream 0, offset 0x50: partial file
[in#0/mov,mp4,m4a,3gp,3g2,mj2 @ 000001ff9978b080] Error during demuxing: Invalid data found when processing input
Cannot determine format of input 0:0 after EOF
[vf#0:0 @ 000001ff997d6040] Task finished with error code: -1094995529 (Invalid data found when processing input)
[vf#0:0 @ 000001ff997d6040] Terminating thread with return code -1094995529 (Invalid data found when processing input)
[aost#0:1/libvorbis @ 000001ff99cd1780] No filtered frames for output stream, trying to initialize anyway.
[vost#0:0/libx264 @ 000001ff997d4fc0] Could not open encoder before EOF
[vost#0:0/libx264 @ 000001ff997d4fc0] Task finished with error code: -22 (Invalid argument)
[vost#0:0/libx264 @ 000001ff997d4fc0] Terminating thread with return code -22 (Invalid argument)
[out#0/matroska @ 000001ff997a6180] Nothing was written into output file, because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0KiB time=N/A bitrate=N/A speed=N/A 
Conversion failed!



I am running this via Python, this is the script :


async def send_proc_pipe(self) -> bytes:

 command = f"ffmpeg -hide_banner -loglevel error -i pipe:0 -pix_fmt yuv420p -f mp4 -vf \"transpose=1\" -f matroska pipe:1"

 proc = await asyncio.create_subprocess_shell(
 cmd=command,
 stdin=asyncio.subprocess.PIPE,
 stdout=asyncio.subprocess.PIPE,
 stderr=asyncio.subprocess.PIPE
 )
 
 std_in = self.blob

 c_out, c_err = await proc.communicate(std_in)
 if c_err:
 logging.warning(c_err.decode("utf-8"))

 return c_out



I'm not really use what else to try here. I've re-ordered the parameters and tried different pixel formats with no success.