
Recherche avancée
Autres articles (96)
-
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 -
HTML5 audio and video support
13 avril 2011, parMediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
For older browsers the Flowplayer flash fallback is used.
MediaSPIP allows for media playback on major mobile platforms with the above (...) -
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" ;
Sur d’autres sites (8944)
-
ffmpeg android concatenation with different codec [on hold]
31 mars 2016, par raphwilmesI’m trying to concatenate 10 videos, but 5 of them have
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)And the rest have
Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)And my code is :
String commandForMerge = "";
for(int i = 1; i<=numberQuestion;i++){
commandForMerge += "-i "+toDir+"/image"+i+".mp4 -i "+toDir+"/"+i+".mp4 ";
}
String cmd = commandForMerge+"-filter_complex concat=n=10:v=1:a=1 -y "+toDir+"/input.mp4";
execFFmpegBinaryMerge(cmd);Here my fonction :
private void execFFmpegBinaryMerge(final String command) {
try {
ffmpeg.execute(command, new ExecuteBinaryResponseHandler() {
@Override
public void onFailure(String s) {
}
@Override
public void onSuccess(String s) {
}
@Override
public void onProgress(String s) {
txtProcess.setText(txtProcess.getText()+"\n "+s.toString());
}
@Override
public void onStart() {
txtProcess.setText("mise en place...");
}
@Override
public void onFinish() {
}
});
} catch (FFmpegCommandAlreadyRunningException e) {
// do nothing for now
}
}I use this library : https://github.com/WritingMinds/ffmpeg-android-java
Edit :
Now, I’v this : Unable to find a suitable output format for ’[1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1] ;’ Invalid Agurment
My Command is : *ffmpeg -i image1.mp4 -i 1.mp4 -i image2.mp4 -i 2.mp4 -i image3.mp4 -i 3.mp4.mp4 -i image4.mp4 -i 4.mp4 -i image5.mp4 -i .mp4
filter-complex
"[0:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v0] ;
[1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1] ;
[2:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v2] ;
[3:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v3] ;
[4:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v4] ;
[5:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v5] ;
[6:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v6] ;
[7:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v7] ;
[8:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v8] ;
[9:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v9] ;"
’[v0][0:a][v1][1:a][v2][2:a][v3][3:a][v4][4:a][v5][5:a][v6][6:a][v7][7:a][v8][8:a][v9][9:a]’ concat=n=10:v=1:a=1 -y output.mp4
*Now the "[0:v]scale=-1:480,pad=640:0 :(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v0] ;" pass but not the [1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1] ;
output :
WARINING:linker : /data/data/vrapp_mobile.com.duoquiz2/files/ffmpeg has text relocation. This is wasting memory and is security risk. Please fix.
ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developpers built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
configuration :—target-os=linux —cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- —arm=arm —cpu=cortex-a8 —enable-runtime-cpudetect —sysroot=/home/sb/Source-Code/ffmpeg-android/toolchain-android/sysroot —enable-pic—enable-libx264 —enable-libass —enable-libfreetype —enable-libfrididi —enable-fontconfig —enable-pthreads —disable-debug —disable-ffserver —enable-version3 —enable-hardcored-tables —disable-ffplay —disable-ffprobe —enable-gpl —enable-yasm —disable-doc —disable-shared —enable-static —pjg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config —prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon —extra-cflags=’-l/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protextor-all -mfpu=neon’ —extra-ldflags=’-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,now -pie’ —extra-libs=’-lpng -lexpat -lm’ —extra-cxxflags =
libavutil 54. 7.100/54. 7.100
libavcodec 56 1.100/56. 1.100
libavformat 56. 4.101/56. 4.101
libavdevice 56. 0.100/56. 0.100
libavfilter 5. 1.100/5. 1.100
libswscale 3. 0.100/3. 0.100
libswresample 1. 1.100/1. 1.100
libpostproc 53. 0.100/53. 0.100
Input #0,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image1.mp4’ :
Metadata :
major_brand :isom
minor_version :512
compatible_brands:isomiso2avc1mp41
encoder :Lavf56.4.101
Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata :
handler_name : VideoHandler
Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
Metadata :
handler_name :SoundHandler
Input #1,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/1.mp4’ :
Metadata :
major_brand :isom
minor_version :0
compatible_brands:isom3gp4
creation_time :2016-03-21 16:05:25
Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
Metadata :
rotate :270
creation_time :2016-03-21 16:05:25
handler_name :VideoHandle
Side data :
displaymatrix : rotation of 90.00 degrees
Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
Metadata :
creation_time :2016-03-21 16:05:25
handler_name :SoundHandle
Input #2,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image2.mp4’ :
Metadata :
major_brand :isom
minor_version :512
compatible_brands:isomiso2avc1mp41
encoder :Lavf56.4.101
Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata :
handler_name : VideoHandler
Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
Metadata :
handler_name :SoundHandler
Input #3,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/2.mp4’ :
Metadata :
major_brand :isom
minor_version :0
compatible_brands:isom3gp4
creation_time :2016-03-21 16:05:25
Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
Metadata :
rotate :270
creation_time :2016-03-21 16:05:25
handler_name :VideoHandle
Side data :
displaymatrix : rotation of 90.00 degrees
Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
Metadata :
creation_time :2016-03-21 16:05:25
handler_name :SoundHandle
Input #4,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image3.mp4’ :
Metadata :
major_brand :isom
minor_version :512
compatible_brands:isomiso2avc1mp41
encoder :Lavf56.4.101
Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata :
handler_name : VideoHandler
Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
Metadata :
handler_name :SoundHandler
Input #5,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/3.mp4’ :
Metadata :
major_brand :isom
minor_version :0
compatible_brands:isom3gp4
creation_time :2016-03-21
Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
Metadata :
rotate :270
creation_time :2016-03-2116:05:25
handler_name :VideoHandle
Side data :
displaymatrix : rotation of 90.00 degrees
Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
Metadata :
creation_time :2016-03-21 16:05:25
handler_name :SoundHandle
Input #6,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image4.mp4’ :
Metadata :
major_brand :isom
minor_version :512
compatible_brands:isomiso2avc1mp41
encoder :Lavf56.4.101
Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata :
handler_name : VideoHandler
Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
Metadata :
handler_name :SoundHandler
Input #7,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/4.mp4’ :
Metadata :
major_brand :isom
minor_version :0
compatible_brands:isom3gp4
creation_time :2016-03-21
Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
Metadata :
rotate :270
creation_time :2016-03-2116:05:25
handler_name :VideoHandle
Side data :
displaymatrix : rotation of 90.00 degrees
Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
Metadata :
creation_time :2016-03-21 16:05:25
handler_name :SoundHandle
Input #8,mov,mp4,m4a,3gp,mj2, from ’/storage/emulated/0/DuoQuiz/image5.mp4’ :
Metadata :
major_brand :isom
minor_version :512
compatible_brands:isomiso2avc1mp41
encoder :Lavf56.4.101
Duration : 00:00:02.40, start : 0.023021 , bitrate : 334 kb/s
Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 600x976 [SAR 1:1 DAR 75:122], 17 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata :
handler_name : VideoHandler
Stream #0:1(und) : Audio.mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, s16p, 320 kb/s (default)
Metadata :
handler_name :SoundHandler
Input #9,mov,mp4,m4a,3gp,3g2,mj2, from ’/storage/emulated/0/DuoQuiz/5.mp4’ :
Metadata :
major_brand :isom
minor_version :0
compatible_brands:isom3gp4
creation_time :2016-03-21
Duration : 00:00:02.73, start : 0.000000, bitrate : 229 kb/s
Stream #1:0(eng) : Video : h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x480x 175 kb/s, SAR 65536:65536 DAR 4:3, 7.69frp, 23.08 tbr, 90k tbn, 15tbc (default)
Metadata :
rotate :270
creation_time :2016-03-2116:05:25
handler_name :VideoHandle
Side data :
displaymatrix : rotation of 90.00 degrees
Stream #1:1(eng) : Audio : aac (mp4a / 0x6134706D),44100 Hz, mono, fltp, 49 kb/s (default)
Metadata :
creation_time :2016-03-21 16:05:25
handler_name :SoundHandle
[AVFilterGraph @ 0x2b5b2e10] No such filter : ""
Error configuring filter
*On my computer, i try this command :
-i image1.mp4 -i 1.mp4 -i image2.mp4 -i 2.mp4 -i image3.mp4 -i 3.mp4 -i image4.mp4 -i 4.mp4 -i image5.mp4 -i 5.mp4 -filter_complex "[0:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v0]; [1:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v1]; [2:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v2]; [3:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v3]; [4:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v4]; [5:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v5]; [6:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v6]; [7:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v7]; [8:v]scale=-1:480,pad=640:0:(ow-iw)/2,setsar=1,setpts=PTS-STARTPTS[v8]; [9:v]fps=25,setsar=1,setpts=PTS-STARTPTS[v9]; [v0][0:a][v1][1:a][v2][2:a][v3][3:a][v4][4:a][v5][5:a][v6][6:a][v7][7:a][v8][8:a][v9][9:a] concat=n=10:v=1:a=1" -y output.mp4
That’s ok on my PC but not on my Android
-
Issue with repairing 3GP video using untrunc - Error : bad track : 's263'
2 juillet 2023, par sifiribI am trying to repair a corrupted 3GP video using the untrunc program, but I'm facing an issue due to an error.


The command I ran :


./untrunc -v ~/Desktop/logic/Video0086.3gp ~/Desktop/logic/Video0035.3gp



I am running Ubuntu 20.04 LTS and using the 'v308-d72ec32' version of the untrunc. The error message I encounter is as follows :


Info: version 'v308-d72ec32' using ffmpeg '4.4.2-0ubuntu0.22.04.1'
Info: reading /home/hsrv/Desktop/logic/Video0086.3gp
Info: parsing healthy moov atom ... 
ftyp_ = 'mp42'
[amrnb @ 0x56075d7656c0] Multiple frames in a packet.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/hsrv/Desktop/logic/Video0086.3gp':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: isommp42
 creation_time : 2014-04-26T21:38:29.000000Z
 com.android.version: 12
 Duration: 00:02:22.80, start: 0.000000, bitrate: 154 kb/s
 Stream #0:0(eng): Video: h263 (s263 / 0x33363273), yuv420p, 176x144 [SAR 12:11 DAR 4:3], 140 kb/s, 10.74 fps, 11 tbr, 90k tbn, 29.97 tbc (default)
 Metadata:
 creation_time : 2023-07-02T15:34:22.000000Z
 handler_name : VideoHandle
 vendor_id : [0][0][0][0]
 Stream #0:1(eng): Audio: amr_nb (samr / 0x726D6173), 8000 Hz, mono, flt, 12 kb/s (default)
 Metadata:
 creation_time : 2023-07-02T15:34:22.000000Z
 handler_name : SoundHandle
 vendor_id : [0][0][0][0]
ss: s263 is_stable: 0
ss: using f=7 span
assuming constant duration of 640 for 'samr' (x1785)

Info: unknown track 's263' found -> fallback to dynamic stats
created dummy track 'free'
removed dummy track 'free'
first_failed: 0 of 101
simpleOrder: 0 
order ( 101): (0, 14) (0, 11) (0, 11) (0, 12) (0, 11) (0, 12) (0, 11) (0, 12) (0, 11) (0, 11) (0, 11) (0, 11) (0, 12) (0, 12) (0, 11) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 11) (0, 11) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 11) (0, 11) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 11) (0, 11) (0, 12) (0, 11) (0, 11) (0, 12) (0, 12) (0, 11) (0, 12) (0, 12) (0, 11) (0, 10) (0, 12) (0, 12) (0, 12) (0, 11) (0, 12) (0, 11) (0, 10) (0, 12) (0, 11) (0, 11) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 12) (0, 10) (0, 12) (0, 11) (0, 11) (0, 12) (0, 12) (0, 12) (0, 12) 
isTrackOrderEnough: 0 (sz=0)
genPatternPerm of: s263
0 s263 0.918296 3
1 samr 1 2
genPatternPerm of: samr
0 s263 4.8125 32
1 samr 0 1
has_zero_transitions_: 0
**Error: bad track: 's263'**



This error message indicates that the untrunc program is having trouble with a track named 's263'. This track could be a track or codec within the video file.


How can I resolve this error and successfully repair the corrupted 3GP video ? What steps should I follow or can you suggest an alternative approach ?


Thank you in advance !


I was expecting trunc tool to fix the corrupted/trunced video. But it gave me this error and no matter how much I searched for a solution, I couldn't find anything.


-
Flutter ffmpeg kit : Invalid size error when trying to scale video
27 juillet 2023, par veryepicdudeI'm trying to resize a video to match instagram's video format requirements. I'm using the
ffmpeg_kit_flutter_full_gpl: ^5.1.0
package to do so and this is the function I'm calling :

Future<void> resizeVideo(String input, String output) async {

 final command = '-i $input -c:v libx264 -aspect 16:9 -crf 18 -vf "scale=iw*min(1280/iw\,720/ih):ih*min(1280/iw\,720/ih),pad=1280:720:(1280-iw)/2:(720-ih)/2" -fpsmax 60 -preset ultrafast -c:a aac -b:a 128k -ac 1 -use_editlist false -ar 48000 -pix_fmt yuv420p -movflags +faststart -t 59 -y $output';
 final session = await FFmpegKit.execute(command);
 print("resize done with ${await session.getReturnCode()}");
}
</void>


However I get this error every time :


Stream #0:0[0x1](und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 60 kb/s (default)
 Metadata:
 creation_time : 2023-07-27T15:30:28.000000Z
 handler_name : Core Media Audio
 vendor_id : [0][0][0][0]
 Stream #0:1[0x2](und): Video: hevc (hvc1 / 0x31637668), yuv420p(tv, smpte170m/bt709/bt709), 720x1280, 2085 kb/s, 30 fps, 30 tbr, 600 tbn (default)
 Metadata:
 creation_time : 2023-07-27T15:30:28.000000Z
 handler_name : Core Media Video
 vendor_id : [0][0][0][0]
Stream mapping:
 Stream #0:1 -> #0:0 (hevc (native) -> h264 (libx264))
 Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
[Parsed_scale_0 @ 0x2834a53f0] Invalid size 'iw*min(1280/iw'
[AVFilterGraph @ 0x28278e3a0] Error initializing filter 'scale'[AVFilterGraph @ 0x28278e3a0] with args 'iw*min(1280/iw'[AVFilterGraph @ 0x28278e3a0] 
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:1
[aac @ 0x105334290] Qavg: 461.613
[aac @ 0x105334290] 2 frames left in the queue on closing



Removing the scale filter makes the function work fine, but it fails the instagram video requirements listed here.
Any help will be greatly appreciated.