
Recherche avancée
Médias (1)
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (43)
-
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 ;
-
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 ) (...) -
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
Sur d’autres sites (8221)
-
ffmpeg : Input link parameters do not match the corresponding output link parameters, when concatenating same size videos
4 mars 2021, par mSourireI'm trying to combine a video and an audio, using the following command :


ffmpeg -y -i 1.mkv -i 1.mka 
-max_muxing_queue_size 10000 -preset veryfast -r 30 -crf 20 -b:a 96000 -vbr on
-strict experimental
-filter_complex '
color=black:s=320x240:d=7ms[black0];
aevalsrc=0:d=15ms[silence1];
[black0][0]concat=n=2:v=1:a=0[video];
[1][silence1]concat=n=2:v=0:a=1[audio]'
-map [video] -map [audio] -c:v libvpx -c:a libopus output.webm



But ffmpeg returns an error :


[Parsed_concat_2 @ 0x7f8004506d00] Input link in0:v0 parameters (size 640x480, SAR 1:1) do not match the corresponding output link in0:v0 parameters (320x240, SAR 1:1)
[Parsed_concat_2 @ 0x7f8004506d00] Failed to configure output pad on Parsed_concat_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[libopus @ 0x7f800500c000] 1 frames left in the queue on closing
Conversion failed!



It looks like ffmpeg is unable to concatenate video and black frames, complaining, that video has a distinct resolution, but that's not true :


#> ffprobe 1.mkv
Input #0, matroska,webm, from '1.mkv':
 Metadata:
 encoder : GStreamer matroskamux version 1.8.1.1
 creation_time : 2021-03-02T13:44:03.000000Z
 Duration: 00:01:48.41, start: 0.710000, bitrate: 757 kb/s
 Stream #0:0(eng): Video: vp8, yuv420p(progressive), 320x240, SAR 1:1 DAR 4:3, 120 tbr, 1k tbn, 1k tbc (default)
 Metadata:
 title : Video



So, both the input source and the filter has the same resolution.


When I'm trying to change the color filter to "color=s=640x480", ffmpeg says an opposite thing :


[Parsed_concat_2 @ 0x7fca3ca185c0] Input link in0:v0 parameters (size 320x240, SAR 1:1) do not match the corresponding output link in0:v0 parameters (640x480, SAR 1:1)
[Parsed_concat_2 @ 0x7fca3ca185c0] Failed to configure output pad on Parsed_concat_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument



Help please to solve this !


Full listing :


ffmpeg -y -i 1.mkv -i 1.mka
-max_muxing_queue_size 10000
-preset veryfast -r 30 -crf 20 -b:a 96000 -vbr on
-strict experimental
-filter_complex '
color=black:s=320x240:d=7ms[black0];
aevalsrc=0:d=15ms[silence1];
[black0][0]concat=n=2:v=1:a=0[video];
[1][silence1]concat=n=2:v=0:a=1[audio]'
-map [video] -map [audio] -c:v libvpx -c:a libopus output.webm

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with Apple clang version 11.0.0 (clang-1100.0.33.17)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_9 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --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-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --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-librtmp --enable-libspeex --enable-libsoxr --enable-videotoolbox --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, matroska,webm, from '1.mkv':
 Metadata:
 encoder : GStreamer matroskamux version 1.8.1.1
 creation_time : 2021-03-02T13:44:03.000000Z
 Duration: 00:01:48.41, start: 0.710000, bitrate: 757 kb/s
 Stream #0:0(eng): Video: vp8, yuv420p(progressive), 320x240, SAR 1:1 DAR 4:3, 120 tbr, 1k tbn, 1k tbc (default)
 Metadata:
 title : Video
Input #1, matroska,webm, from '1.mka':
 Metadata:
 encoder : GStreamer matroskamux version 1.8.1.1
 creation_time : 2021-03-02T13:44:03.000000Z
 Duration: 00:01:48.40, start: 0.703000, bitrate: 38 kb/s
 Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default)
 Metadata:
 title : Audio
Codec AVOption preset (Configuration preset) specified for output file #0 (output.webm) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Stream mapping:
 Stream #0:0 (vp8) -> concat:in1:v0
 Stream #1:0 (opus) -> concat:in0:a0
 concat -> Stream #0:0 (libvpx)
 concat -> Stream #0:1 (libopus)
Press [q] to stop, [?] for help
[libvpx @ 0x7fe08a80bc00] v1.9.0
[libvpx @ 0x7fe08a80bc00] Bitrate not specified for constrained quality mode, using default of 256kbit/sec
Output #0, webm, to 'output.webm':
 Metadata:
 encoder : Lavf58.45.100
 Stream #0:0: Video: vp8 (libvpx), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 256 kb/s, 30 fps, 1k tbn, 30 tbc (default)
 Metadata:
 encoder : Lavc58.91.100 libvpx
 Side data:
 cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 Stream #0:1: Audio: opus (libopus), 48000 Hz, stereo, flt, 96 kb/s (default)
 Metadata:
 encoder : Lavc58.91.100 libopus
[Parsed_color_0 @ 0x7fe089815940] EOF timestamp not reliable
[Parsed_concat_2 @ 0x7fe088501980] Input link in0:v0 parameters (size 640x480, SAR 1:1) do not match the corresponding output link in0:v0 parameters (320x240, SAR 1:1)
[Parsed_concat_2 @ 0x7fe088501980] Failed to configure output pad on Parsed_concat_2
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
[libopus @ 0x7fe08a810c00] 1 frames left in the queue on closing
Conversion failed!



-
lavu/tx : require output argument to match input for inplace transforms
26 février 2021, par Lynne -
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".