
Recherche avancée
Médias (2)
-
Valkaama DVD Label
4 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Image
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
Autres articles (50)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (8437)
-
FFMPEG command on Android Jave Process does not fully execute
8 novembre 2014, par user2491598The issue I am having is very strange. I have an FFMPEG executable binary library installed on my Android and I am trying to execute this command
ffmpeg -loop 1 -i /storage/emulated/0/image.jpg -i /storage/emulated/0/input.mov -filter_complex '[0:v][1:v] overlay' -shortest /storage/emulated/0/output.mp4
and my JAVA code looks like
try {
Runtime.getRuntime().exec("chmod 700 " + mFfmpegPath);
cmd.add(mFfmpegPath);
cmd.add("-loop");
cmd.add("1");
cmd.add("-i");
cmd.add("/storage/emulated/0/image.jpg");
cmd.add("-i");
cmd.add("/storage/emulated/0/pizza.mov");
cmd.add("-filter_complex");
cmd.add("'[0:v][1:v] overlay'");
cmd.add("-shortest");
cmd.add("-vcodec");
cmd.add("-libx264");
cmd.add("-strict");
cmd.add("experimental");
cmd.add("/storage/emulated/0/output22.mp4");
final ProcessBuilder pb = new ProcessBuilder(cmd);
pb.redirectErrorStream();
final Process p = pb.start();
Log.i("FFMPEG","stdError= " + getSTD(p.getErrorStream()));
p.waitFor();
return run;
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}For some reason I the execution does not fully finish and it stops. It does not even create an output file in my Android storage. Here is the log file from the process stream
11-07 20:34:21.636: I/FFMPEG(6259): stdError= WARNING: linker: /data/data/za.jamie.androidffmpegcmdline/app_bin/ffmpeg has text relocations. This is wasting memory and is a security risk. Please fix.
11-07 20:34:21.636: I/FFMPEG(6259): ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
11-07 20:34:21.636: I/FFMPEG(6259): built on Nov 8 2014 00:21:33 with gcc 4.8 (GCC)
11-07 20:34:21.636: I/FFMPEG(6259): configuration: --target-os=linux --cross-prefix=/home/ubuntu/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/ubuntu/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-avcodec --enable-avformat --enable-swresample --enable-swscale --enable-postproc --enable-avfilter --enable-avresample --disable-libfreetype --enable-libfribidi --disable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --enable-ffplay --enable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/ubuntu/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/ubuntu/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/ubuntu/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/ubuntu/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
11-07 20:34:21.636: I/FFMPEG(6259): libavutil 54. 7.100 / 54. 7.100
11-07 20:34:21.636: I/FFMPEG(6259): libavcodec 56. 1.100 / 56. 1.100
11-07 20:34:21.636: I/FFMPEG(6259): libavformat 56. 4.101 / 56. 4.101
11-07 20:34:21.636: I/FFMPEG(6259): libavdevice 56. 0.100 / 56. 0.100
11-07 20:34:21.636: I/FFMPEG(6259): libavfilter 5. 1.100 / 5. 1.100
11-07 20:34:21.636: I/FFMPEG(6259): libavresample 2. 1. 0 / 2. 1. 0
11-07 20:34:21.636: I/FFMPEG(6259): libswscale 3. 0.100 / 3. 0.100
11-07 20:34:21.636: I/FFMPEG(6259): libswresample 1. 1.100 / 1. 1.100
11-07 20:34:21.636: I/FFMPEG(6259): libpostproc 53. 0.100 / 53. 0.100
11-07 20:34:21.636: I/FFMPEG(6259): Input #0, image2, from '/storage/emulated/0/image.jpg':
11-07 20:34:21.636: I/FFMPEG(6259): Duration: 00:00:00.04, start: 0.000000, bitrate: 35211 kb/s
11-07 20:34:21.636: I/FFMPEG(6259): Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg), 640x640 [SAR 1:1 DAR 1:1], 25 fps, 25 tbr, 25 tbn, 25 tbc
11-07 20:34:21.636: I/FFMPEG(6259): Input #1, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/input.mov':
11-07 20:34:21.636: I/FFMPEG(6259): Metadata:
11-07 20:34:21.636: I/FFMPEG(6259): major_brand : qt
11-07 20:34:21.636: I/FFMPEG(6259): minor_version : 537199360
11-07 20:34:21.636: I/FFMPEG(6259): compatible_brands: qt
11-07 20:34:21.636: I/FFMPEG(6259): creation_time : 2014-10-30 23:57:31
11-07 20:34:21.636: I/FFMPEG(6259): xmp : <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
11-07 20:34:21.636: I/FFMPEG(6259): :
11-07 20:34:21.636: I/FFMPEG(6259): :
11-07 20:34:21.636: I/FFMPEG(6259): : FFMPEG(6259): : xmlns:xmp="http://ns.adobe.com/xap/1.0/"
11-07 20:34:21.636: I/FFMPEG(6259): : xmlns:xmpDM="http://ns.adobe.com/xmp/1.0/DynamicMedia/"
11-07 20:34:21.636: I/FFMPEG(6259): : xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
11-07 20:34:21.636: I/FFMPEG(6259): : xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
11-07 20:34:21.636: I/FFMPEG(6259): : xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#"
11-07 20:34:21.636: I/FFMPEG(6259): : xmlns:creatorAtom="http://ns.adobe.com/creatorAtom/1.0/"
11-07 20:34:21.636: I/FFMPEG(6259): : xmlns:dc="http://purl.org/dc/elements/1.1/"
11-07 20:34:21.636: I/FFMPEG(6259): : xmp:CreateDate="2014-10-30T16:57:31-07:00"
11-07 20:34:21.636: I/FFMPEG(6259): : xmp:ModifyDate="2014-10-30T15:57:57-07:00"
11-07 20:34:21.636: I/FFMPEG(6259): : xmp:CreatorTool="Adobe After Effects CC 2014 (Windows)"
11-07 20:34:21.636: I/FFMPEG(6259): : xmp:MetadataDate="2014-10-30T15:57:57-07:00"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:startTimeScale="30"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:startTimeSampleSize="1"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:videoFrameRate="30.000000"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:videoFieldOrder="Progressive"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:videoPixelAspectRatio="1/1"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:audioSampleRate="48000"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:audioSampleType="16Int"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpDM:audioChannelType="Stereo"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpMM:InstanceID="xmp.iid:b791d2dc-6759-ee45-b5a2-692ecba2c4fd"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpMM:DocumentID="xmp.did:d3fde073-8716-144a-acbd-7676f27002a0"
11-07 20:34:21.636: I/FFMPEG(6259): : xmpMM:OriginalDocumentID="xmp.
11-07 20:34:21.836: E/ViewRootImpl(6259): sendUserActionEvent() mView == nullPlease help :(
-
FFMPEG scale and crop in single command
26 mars 2016, par The Hungry AndroiderI’m using FFMPEG on Android using the following lib : http://writingminds.github.io/ffmpeg-android-java/
This is the command I’m using :
"-i " + path + " -vf scale=480:360,crop=360:360:0:00 -strict -2 -preset ultrafast " + fileOutPath
My goal of this is to scale the image down to 480x360, then crop it to 360x360 from (0,0) (top left corner). HOWEVER, what ends up happening is that it crops from the vertical-center. So for example if you were to take a vide of three blocks on top of each other filling the entire screen, the crop would eventually show just the middle block, whereas I desire the top block.
Any ideas as to what I’m doing wrong ?
My ultimate goal from all of this is to get a square video of size 360x360.
Output log :
03-26 12:10:16.816 17198-17198/com.noq D/FFMPEG: FFMPEG onStart
03-26 12:10:16.900 17198-17385/com.noq D/FFmpeg: Running publishing updates method
03-26 12:10:16.914 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: WARNING: linker: /data/user/0/com.noq/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
03-26 12:10:17.004 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
03-26 12:10:17.004 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
03-26 12:10:17.007 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: configuration: --target-os=linux --cross-prefix=/home/sb/Source-Code/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=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-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
03-26 12:10:17.021 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libavutil 54. 7.100 / 54. 7.100
03-26 12:10:17.022 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libavcodec 56. 1.100 / 56. 1.100
03-26 12:10:17.022 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libavformat 56. 4.101 / 56. 4.101
03-26 12:10:17.022 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libavdevice 56. 0.100 / 56. 0.100
03-26 12:10:17.022 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libavfilter 5. 1.100 / 5. 1.100
03-26 12:10:17.022 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libswscale 3. 0.100 / 3. 0.100
03-26 12:10:17.022 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libswresample 1. 1.100 / 1. 1.100
03-26 12:10:17.022 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: libpostproc 53. 0.100 / 53. 0.100
03-26 12:10:17.201 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Android/data/com.noq/files/Pictures/noq/1459008610063.mp4':
03-26 12:10:17.201 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Metadata:
03-26 12:10:17.201 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: major_brand : mp42
03-26 12:10:17.201 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: minor_version : 0
03-26 12:10:17.201 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: compatible_brands: isommp42
03-26 12:10:17.201 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: creation_time : 2016-03-26 16:10:16
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Duration: 00:00:02.02, start: 0.000000, bitrate: 6131 kb/s
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 5926 kb/s, SAR 65536:65536 DAR 4:3, 29.87 fps, 30.17 tbr, 90k tbn, 180k tbc (default)
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Metadata:
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: rotate : 270
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: creation_time : 2016-03-26 16:10:16
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: handler_name : VideoHandle
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: encoder : MOTO
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Side data:
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: displaymatrix: rotation of 90.00 degrees
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 130 kb/s (default)
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Metadata:
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: creation_time : 2016-03-26 16:10:16
03-26 12:10:17.202 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: handler_name : SoundHandle
03-26 12:10:17.263 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] using SAR=1/1
03-26 12:10:17.297 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] using cpu capabilities: none!
03-26 12:10:17.411 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] profile Constrained Baseline, level 2.1
03-26 12:10:17.417 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
03-26 12:10:17.464 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Output #0, mp4, to '/storage/emulated/0/Android/data/com.noq/files/Pictures/noq/14590086100631459008616802_square.mp4':
03-26 12:10:17.464 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Metadata:
03-26 12:10:17.464 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: major_brand : mp42
03-26 12:10:17.464 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: minor_version : 0
03-26 12:10:17.464 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: compatible_brands: isommp42
03-26 12:10:17.464 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: encoder : Lavf56.4.101
03-26 12:10:17.465 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 360x360 [SAR 1:1 DAR 1:1], q=-1--1, 30.17 fps, 11584 tbn, 30.17 tbc (default)
03-26 12:10:17.465 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Metadata:
03-26 12:10:17.465 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: rotate : 270
03-26 12:10:17.465 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: creation_time : 2016-03-26 16:10:16
03-26 12:10:17.465 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: handler_name : VideoHandle
03-26 12:10:17.465 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: encoder : Lavc56.1.100 libx264
03-26 12:10:17.465 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
03-26 12:10:17.466 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Metadata:
03-26 12:10:17.466 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: creation_time : 2016-03-26 16:10:16
03-26 12:10:17.466 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: handler_name : SoundHandle
03-26 12:10:17.467 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: encoder : Lavc56.1.100 aac
03-26 12:10:17.467 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Stream mapping:
03-26 12:10:17.467 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
03-26 12:10:17.467 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Stream #0:1 -> #0:1 (aac (native) -> aac (native))
03-26 12:10:17.468 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: Press [q] to stop, [?] for help
03-26 12:10:18.035 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: frame= 3 fps=0.0 q=0.0 size= 0kB time=00:00:01.00 bitrate= 0.4kbits/s dup=1 drop=0
03-26 12:10:18.526 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: frame= 21 fps= 20 q=24.0 size= 48kB time=00:00:01.00 bitrate= 390.3kbits/s dup=1 drop=0
03-26 12:10:19.008 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: frame= 26 fps= 17 q=25.0 size= 68kB time=00:00:01.85 bitrate= 301.1kbits/s dup=1 drop=0
03-26 12:10:19.533 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: frame= 47 fps= 23 q=23.0 size= 165kB time=00:00:01.87 bitrate= 719.7kbits/s dup=1 drop=0
03-26 12:10:19.956 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: frame= 62 fps= 25 q=-1.0 Lsize= 297kB time=00:00:02.05 bitrate=1184.9kbits/s dup=1 drop=0
03-26 12:10:19.956 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: video:262kB audio:33kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.992648%
03-26 12:10:19.984 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] frame I:1 Avg QP:20.00 size: 18507
03-26 12:10:19.984 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] frame P:61 Avg QP:23.52 size: 4079
03-26 12:10:19.984 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] mb I I16..4: 100.0% 0.0% 0.0%
03-26 12:10:19.984 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] mb P I16..4: 4.4% 0.0% 0.0% P16..4: 70.9% 0.0% 0.0% 0.0% 0.0% skip:24.7%
03-26 12:10:19.985 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] coded y,uvDC,uvAC intra: 44.6% 40.1% 14.8% inter: 39.1% 32.7% 0.6%
03-26 12:10:19.985 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] i16 v,h,dc,p: 42% 24% 21% 13%
03-26 12:10:19.986 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] i8c dc,h,v,p: 44% 24% 25% 8%
03-26 12:10:19.987 17198-17198/com.noq D/FFMPEG: FFMPEG onProgress: [libx264 @ 0xb78cde30] kb/s:1040.60
03-26 12:10:20.002 17198-17198/com.noq D/FFMPEG: FFMPEG onSuccess: WARNING: linker: /data/user/0/com.noq/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
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- --arch=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-libfribidi --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/sb/Source-Code/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/sb/Source-Code/ffmpeg-android/build/armeabi-v7a-neon --extra-cflags='-I/home/sb/Source-Code/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -mfpu=neon' --extra-ldflags='-L/home/sb/Source-Code/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,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,3g2,mj2, from '/storage/emulated/0/Android/data/com.noq/files/Pictures/noq/1459008610063.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2016-03-26 16:10:16
Duration: 00:00:02.02, start: 0.000000, bitrate: 6131 kb/s
Stream #0:0(eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 640x480, 5926 kb/s, SAR 65536:65536 DAR 4:3, 29.87 fps, 30.17 tbr, 90k tbn, 180k tbc (default)
Metadata:
rotate : 270
creation_time : 2016-03-26 16:10:16
handler_name : VideoHandle
encoder : MOTO
Side data:
displaymatrix: rotation of 90.00 degrees
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 130 kb/s (default)
Metadata:
creation_time : 2016-03-26 16:10:16
handler_name : SoundHandle
[libx264 @ 0xb78cde30] using SAR=1/1
[libx264 @ 0xb78cde30] using cpu capabilities: none!
[libx264 @ 0xb78cde30] profile Constrained Baseline, level 2.1
[libx264 @ 0xb78cde30] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=0 intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
Output #0, mp4, to '/storage/emulated/0/Android/data/com.noq/files/Pictures/noq/14590086100631459008616802_square.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
encoder : Lavf56.4.101
Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 360x360 [SAR 1:1 DAR 1:1], q=-1--1, 30.17 fps, 11584 tbn, 30.17 tbc (default)
Metadata:
rotate : 270
creation_time : 2016-03-26 16:10:16
handler_name : VideoHandle
encoder : Lavc56.1.100 libx264
Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
creation_time : 2016-03-26 16:10:16
handler_name : SoundHandle
encoder : La
03-26 12:10:20.037 17198-17198/com.noq D/FFMPEG: FFMPEG onFinish -
Why calling libav* library doesn't have same quality as ffmpeg command line ?
10 mai 2016, par seaguestI am using the ffmpeg 3 to do the video format conversion, it works fine when I use the command line mode, but when I call the libav* library, I get a audio quality loss problem (there is a lot of noises in the audio).
Here are the two files :
mv.webm - original file
mv2.mp4 converted with libarary , a lot of noisesHere is the probe information for the mv.webm :
$ ffprobe mv.webm
ffprobe version N-79826-g64fd62d Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413
configuration: --prefix=/home/seaguest/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/seaguest/ffmpeg_build/include --extra-ldflags=-L/home/seaguest/ffmpeg_build/lib --enable-gpl --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 39.100 / 57. 39.100
libavformat 57. 36.100 / 57. 36.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'mv.webm':
Metadata:
encoder : Lavf57.36.100
Duration: 00:00:30.00, start: 0.000000, bitrate: 935 kb/s
Stream #0:0: Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 1k tbn (default)
Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)I checked the log printed by command line mode and calling code mode, the setting looks like the same, here are the logs :
$ ffmpeg -i mv.webm -c:a aac -c:v libx264 mv.mp4
ffmpeg version N-79826-g64fd62d Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413
configuration: --prefix=/home/seaguest/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/seaguest/ffmpeg_build/include --extra-ldflags=-L/home/seaguest/ffmpeg_build/lib --enable-gpl --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 39.100 / 57. 39.100
libavformat 57. 36.100 / 57. 36.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, matroska,webm, from 'mv.webm':
Metadata:
encoder : Lavf57.36.100
Duration: 00:00:30.00, start: 0.000000, bitrate: 935 kb/s
Stream #0:0: Video: vp8, yuv420p, 640x480, SAR 1:1 DAR 4:3, 25 fps, 25 tbr, 1k tbn (default)
Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)
[libx264 @ 0x3e5d880] using SAR=1/1
[libx264 @ 0x3e5d880] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x3e5d880] profile High, level 3.0
[libx264 @ 0x3e5d880] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x3e2f680] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, mp4, to 'mv.mp4':
Metadata:
encoder : Lavf57.36.100
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 25 fps, 12800 tbn (default)
Metadata:
encoder : Lavc57.39.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
encoder : Lavc57.39.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (vp8 (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (vorbis (native) -> aac (native))
Press [q] to stop, [?] for help
frame= 750 fps=229 q=-1.0 Lsize= 2508kB time=00:00:30.02 bitrate= 684.5kbits/s speed=9.17x
video:2023kB audio:459kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.052857%
[libx264 @ 0x3e5d880] frame I:11 Avg QP:15.29 size: 20395
[libx264 @ 0x3e5d880] frame P:345 Avg QP:20.93 size: 4350
[libx264 @ 0x3e5d880] frame B:394 Avg QP:23.55 size: 879
[libx264 @ 0x3e5d880] consecutive B-frames: 25.2% 3.2% 33.2% 38.4%
[libx264 @ 0x3e5d880] mb I I16..4: 44.1% 32.5% 23.4%
[libx264 @ 0x3e5d880] mb P I16..4: 1.5% 3.6% 0.6% P16..4: 28.9% 11.2% 4.7% 0.0% 0.0% skip:49.5%
[libx264 @ 0x3e5d880] mb B I16..4: 0.0% 0.1% 0.0% B16..8: 27.4% 2.0% 0.4% direct: 0.8% skip:69.3% L0:40.0% L1:53.3% BI: 6.7%
[libx264 @ 0x3e5d880] 8x8 transform intra:52.6% inter:74.9%
[libx264 @ 0x3e5d880] coded y,uvDC,uvAC intra: 57.5% 68.6% 35.9% inter: 10.6% 11.9% 2.6%
[libx264 @ 0x3e5d880] i16 v,h,dc,p: 36% 42% 7% 15%
[libx264 @ 0x3e5d880] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 23% 15% 6% 7% 7% 10% 7% 10%
[libx264 @ 0x3e5d880] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 27% 14% 6% 8% 7% 7% 6% 6%
[libx264 @ 0x3e5d880] i8c dc,h,v,p: 46% 34% 11% 9%
[libx264 @ 0x3e5d880] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x3e5d880] ref P L0: 63.9% 20.8% 11.2% 4.1%
[libx264 @ 0x3e5d880] ref B L0: 93.1% 6.1% 0.8%
[libx264 @ 0x3e5d880] ref B L1: 95.8% 4.2%
[libx264 @ 0x3e5d880] kb/s:552.32
[aac @ 0x3e5ec00] Qavg: 3030.804
$ ffprobe mv.mp4
ffprobe version N-79826-g64fd62d Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413
configuration: --prefix=/home/seaguest/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/seaguest/ffmpeg_build/include --extra-ldflags=-L/home/seaguest/ffmpeg_build/lib --enable-gpl --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 39.100 / 57. 39.100
libavformat 57. 36.100 / 57. 36.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mv.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.36.100
Duration: 00:00:30.01, start: 0.000000, bitrate: 684 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480 [SAR 1:1 DAR 4:3], 552 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
Metadata:
handler_name : SoundHandlerFor the calling code mode :
$ go run transcode.go mv.webm mv1.mp4
# github.com/3d0c/gmf
../packet.go: In function ‘_cgo_3c42eeb63b1e_Cfunc_avcodec_decode_audio4’:
../packet.go:87:2: warning: ‘avcodec_decode_audio4’ is deprecated [-Wdeprecated-declarations]
func (this *Packet) decode(cc *CodecCtx, frame *Frame) (*Frame, bool, int, error) {
^
In file included from ../packet.go:7:0:
/home/seaguest/ffmpeg_build/include/libavcodec/avcodec.h:4685:5: note: declared here
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
^
../packet.go: In function ‘_cgo_3c42eeb63b1e_Cfunc_avcodec_decode_video2’:
../packet.go:104:2: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations]
}
^
In file included from ../packet.go:7:0:
/home/seaguest/ffmpeg_build/include/libavcodec/avcodec.h:4734:5: note: declared here
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
^
[libx264 @ 0x2d82400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x2d82400] profile High, level 3.0
[libx264 @ 0x2d82400] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x2d480c0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
[mp4 @ 0x2d480c0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
[mp4 @ 0x2d480c0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
[mp4 @ 0x2d480c0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
$ ffprobe mv1.mp4
ffprobe version N-79826-g64fd62d Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu 5.3.1-14ubuntu2) 20160413
configuration: --prefix=/home/seaguest/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/seaguest/ffmpeg_build/include --extra-ldflags=-L/home/seaguest/ffmpeg_build/lib --enable-gpl --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-nonfree
libavutil 55. 24.100 / 55. 24.100
libavcodec 57. 39.100 / 57. 39.100
libavformat 57. 36.100 / 57. 36.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 45.100 / 6. 45.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mv1.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.36.100
Duration: 00:00:30.00, start: 0.000000, bitrate: 751 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480, 613 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 130 kb/s (default)
Metadata:
handler_name : SoundHandlerChecking the setting section, crf=23.0 for both (the rest are exactly the same), but the output bitrate are different (the audio for calling code mode has a lot of noises), how is that possible ?
Why the command line mode and use libav* library mode with same setting, but have different output ?
What should I do to call libav* library to get lossless video conversion ?