
Recherche avancée
Autres articles (53)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
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 (4560)
-
Why is ffmpeg start time non-zero in .ts format ?
22 janvier 2014, par geekydelI'm using ffmpeg to transcode video to .ts format, and I am getting unexpected start times in the output file.
To simplify things, I've started with a nice simple AVI file (no audio) :
ffmpeg -i in.avi
...
Input #0, avi, from 'in.avi':
Metadata:
encoder : Lavf55.25.100
Duration: 00:00:05.00, start: 0.000000, bitrate: 448 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 24 tbr, 24 tbn, 24 tbcDuration=5s, startTime=0s, as expected.
However, if I transcode to .ts file, with no customisation :
ffmpeg -i in.avi -y out.ts
...
Input #0, avi, from 'in.avi':
Metadata:
encoder : Lavf55.25.100
Duration: 00:00:05.00, start: 0.000000, bitrate: 448 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 480x270 [SAR 1:1 DAR 16:9], 24 tbr, 24 tbn, 24 tbc
Output #0, mpegts, to 'out.ts':
Metadata:
encoder : Lavf55.25.100
Stream #0:0: Video: mpeg2video, yuv420p, 480x270 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 90k tbn, 24 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> mpeg2video)
Press [q] to stop, [?] for help
frame= 120 fps=0.0 q=31.0 Lsize= 315kB time=00:00:04.95 bitrate= 519.9kbits/s dup=1 drop=0
video:277kB audio:0kB subtitle:0 global headers:0kB muxing overhead 13.491544%Then I get a very odd parameters (Duration=4:96s, startTime=1.441667) :
ffmpeg -i out.ts
...
Input #0, mpegts, from 'out.ts':
Duration: 00:00:04.96, start: 1.441667, bitrate: 519 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 480x270 [SAR 1:1 DAR 16:9], max. 104857 kb/s, 24 fps, 24 tbr, 90k tbn, 48 tbcNow, I can just about understand why the transcode might lose a couple of frames, which explains the duration, but I can't see why the start time should be any different to the AVI file's start time.
I have tried transcoding to .mp4, .webm and .mov, and in each case we get the 'correct' start time of 0.0s. Can anybody help explain why .ts files behave differently ?
Thanks in advance !
(ffmpeg version information :)
ffmpeg version N-60031-ga459891 Copyright (c) 2000-2014 the FFmpeg developers
built on Jan 21 2014 05:31:54 with gcc 4.6 (Debian 4.6.3-1)
configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
libavutil 52. 63.100 / 52. 63.100
libavcodec 55. 48.102 / 55. 48.102
libavformat 55. 25.100 / 55. 25.100
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 1.100 / 4. 1.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100 -
FFMPEG Video Cropping slower [duplicate]
23 juin 2016, par syed imtyThis question already has an answer here :
-
Fast Video Compression on Android
2 answers
I am trying to crop rectangular video into a square one using FFMPEG. The video conversion take too much time.
For a video of 30 secs, it takes around 60-70secs to convert
FFMPEG Command
String commandStr =" -i "+videoPath+" -vcodec libx264 -b:v 880k -vf crop=" + videoSize.height + ":"+ videoSize.height + ":" + cropStart +":0 -preset ultrafast -strict -2 " +compressedVideoPath;
Progress Log
D/ViewRootImpl: ViewPostImeInputStage ACTION_DOWN
I/System.out: Video converison : /storage/emulated/0/IHH_y/147.mp4 /storage/emulated/0/IHH_y/147upload.mp4 wxh1080:1080:420
I/System.out: FFMpeg lib onStart
D/FFmpeg: Running publishing updates method
I/System.out: FFMpeg lib onProgressWARNING: linker: /data/data/com.x.y/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
I/System.out: FFMpeg lib onProgressffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
I/System.out: FFMpeg lib onProgress built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
I/System.out: FFMpeg lib 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=
I/System.out: FFMpeg lib onProgress libavutil 54. 7.100 / 54. 7.100
I/System.out: FFMpeg lib onProgress libavcodec 56. 1.100 / 56. 1.100
I/System.out: FFMpeg lib onProgress libavformat 56. 4.101 / 56. 4.101
I/System.out: FFMpeg lib onProgress libavdevice 56. 0.100 / 56. 0.100
I/System.out: FFMpeg lib onProgress libavfilter 5. 1.100 / 5. 1.100
I/System.out: FFMpeg lib onProgress libswscale 3. 0.100 / 3. 0.100
I/System.out: FFMpeg lib onProgress libswresample 1. 1.100 / 1. 1.100
I/System.out: FFMpeg lib onProgress libpostproc 53. 0.100 / 53. 0.100
I/System.out: FFMpeg lib onProgressInput #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/IHH_y/147.mp4':
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress major_brand : mp42
I/System.out: FFMpeg lib onProgress minor_version : 0
I/System.out: FFMpeg lib onProgress compatible_brands: isommp42
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress Duration: 00:00:08.92, start: 0.000000, bitrate: 8966 kb/s
I/System.out: FFMpeg lib onProgress Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 8983 kb/s, 16.66 fps, 16.67 tbr, 90k tbn, 180k tbc (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress rotate : 90
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : VideoHandle
I/System.out: FFMpeg lib onProgress Side data:
I/System.out: FFMpeg lib onProgress displaymatrix: rotation of -90.00 degrees
I/System.out: FFMpeg lib onProgress Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 254 kb/s (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : SoundHandle
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] using cpu capabilities: none!
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] profile Constrained Baseline, level 3.2
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] 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=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=16 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=880 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
I/System.out: FFMpeg lib onProgressOutput #0, mp4, to '/storage/emulated/0/IHH_y/147upload.mp4':
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress major_brand : mp42
I/System.out: FFMpeg lib onProgress minor_version : 0
I/System.out: FFMpeg lib onProgress compatible_brands: isommp42
I/System.out: FFMpeg lib onProgress encoder : Lavf56.4.101
I/System.out: FFMpeg lib onProgress Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080, q=-1--1, 880 kb/s, 16.67 fps, 12800 tbn, 16.67 tbc (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress rotate : 90
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : VideoHandle
I/System.out: FFMpeg lib onProgress encoder : Lavc56.1.100 libx264
I/System.out: FFMpeg lib onProgress Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
I/System.out: FFMpeg lib onProgress Metadata:
I/System.out: FFMpeg lib onProgress creation_time : 2016-06-23 20:00:50
I/System.out: FFMpeg lib onProgress handler_name : SoundHandle
I/System.out: FFMpeg lib onProgress encoder : Lavc56.1.100 aac
I/System.out: FFMpeg lib onProgressStream mapping:
I/System.out: FFMpeg lib onProgress Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
I/System.out: FFMpeg lib onProgress Stream #0:1 -> #0:1 (aac (native) -> aac (native))
I/System.out: FFMpeg lib onProgressPress [q] to stop, [?] for help
I/System.out: FFMpeg lib onProgressframe= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.96 bitrate= 0.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 7 fps=6.8 q=0.0 size= 0kB time=00:00:01.05 bitrate= 0.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 15 fps=9.7 q=35.0 size= 87kB time=00:00:01.07 bitrate= 660.5kbits/s
I/System.out: FFMpeg lib onProgressframe= 15 fps=7.3 q=35.0 size= 87kB time=00:00:01.88 bitrate= 376.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 25 fps=9.6 q=35.0 size= 154kB time=00:00:02.05 bitrate= 613.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 32 fps= 10 q=35.0 size= 199kB time=00:00:02.07 bitrate= 784.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 32 fps=8.8 q=35.0 size= 199kB time=00:00:02.93 bitrate= 556.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 42 fps= 10 q=35.0 size= 263kB time=00:00:03.06 bitrate= 705.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 49 fps= 10 q=36.0 size= 328kB time=00:00:03.08 bitrate= 870.9kbits/s
I/System.out: FFMpeg lib onProgressframe= 50 fps=9.5 q=36.0 size= 341kB time=00:00:04.06 bitrate= 687.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 59 fps= 10 q=36.0 size= 407kB time=00:00:04.06 bitrate= 821.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 66 fps= 10 q=36.0 size= 462kB time=00:00:04.10 bitrate= 922.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 66 fps=9.7 q=36.0 size= 462kB time=00:00:05.00 bitrate= 757.4kbits/s
I/System.out: FFMpeg lib onProgressframe= 77 fps= 10 q=35.0 size= 534kB time=00:00:05.06 bitrate= 864.0kbits/s
I/System.out: FFMpeg lib onProgressframe= 83 fps= 11 q=34.0 size= 566kB time=00:00:05.44 bitrate= 850.2kbits/s
I/System.out: FFMpeg lib onProgressframe= 89 fps= 11 q=34.0 size= 600kB time=00:00:06.06 bitrate= 810.6kbits/s
I/System.out: FFMpeg lib onProgressframe= 95 fps= 11 q=35.0 size= 636kB time=00:00:06.06 bitrate= 859.0kbits/s
I/System.out: FFMpeg lib onProgressframe= 100 fps= 11 q=34.0 size= 676kB time=00:00:06.28 bitrate= 881.8kbits/s
I/System.out: FFMpeg lib onProgressframe= 104 fps= 11 q=33.0 size= 702kB time=00:00:07.07 bitrate= 812.8kbits/s
I/System.out: FFMpeg lib onProgressframe= 114 fps= 11 q=34.0 size= 765kB time=00:00:07.07 bitrate= 885.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 117 fps= 11 q=33.0 size= 787kB time=00:00:07.26 bitrate= 887.7kbits/s
I/System.out: FFMpeg lib onProgressframe= 117 fps= 10 q=33.0 size= 787kB time=00:00:08.03 bitrate= 802.8kbits/s
I/System.out: FFMpeg lib onProgressframe= 129 fps= 11 q=33.0 size= 857kB time=00:00:08.07 bitrate= 869.1kbits/s
I/System.out: FFMpeg lib onProgressframe= 138 fps= 11 q=34.0 size= 922kB time=00:00:08.07 bitrate= 935.1kbits/s
I/System.out: FFMpeg lib onProgressframe= 140 fps= 11 q=33.0 size= 937kB time=00:00:08.58 bitrate= 894.1kbits/s
I/System.out: FFMpeg lib onProgressframe= 144 fps= 11 q=-1.0 Lsize= 1032kB time=00:00:08.96 bitrate= 943.0kbits/s
I/System.out: FFMpeg lib onProgressvideo:889kB audio:138kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.512610%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] frame I:1 Avg QP:33.00 size: 21090
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] frame P:143 Avg QP:34.49 size: 6217
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] mb I I16..4: 100.0% 0.0% 0.0%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] mb P I16..4: 10.3% 0.0% 0.0% P16..4: 21.2% 0.0% 0.0% 0.0% 0.0% skip:68.5%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] final ratefactor: 34.56
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 16.9% 5.8% 0.1% inter: 6.2% 0.9% 0.0%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] i16 v,h,dc,p: 55% 30% 8% 7%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] i8c dc,h,v,p: 55% 18% 24% 3%
I/System.out: FFMpeg lib onProgress[libx264 @ 0xb5e08800] kb/s:842.72
I/System.out: FFMpeg lib onSuccessWARNING: linker: /data/data/com.x.y/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
I/System.out: ffmpeg version n2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
I/System.out: built on Oct 7 2014 15:08:46 with gcc 4.8 (GCC)
I/System.out: 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=
I/System.out: libavutil 54. 7.100 / 54. 7.100
I/System.out: libavcodec 56. 1.100 / 56. 1.100
I/System.out: libavformat 56. 4.101 / 56. 4.101
I/System.out: libavdevice 56. 0.100 / 56. 0.100
I/System.out: libavfilter 5. 1.100 / 5. 1.100
I/System.out: libswscale 3. 0.100 / 3. 0.100
I/System.out: libswresample 1. 1.100 / 1. 1.100
I/System.out: libpostproc 53. 0.100 / 53. 0.100
I/System.out: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/IHH_y/147.mp4':
I/System.out: Metadata:
I/System.out: major_brand : mp42
I/System.out: minor_version : 0
I/System.out: compatible_brands: isommp42
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: Duration: 00:00:08.92, start: 0.000000, bitrate: 8966 kb/s
I/System.out: Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 8983 kb/s, 16.66 fps, 16.67 tbr, 90k tbn, 180k tbc (default)
I/System.out: Metadata:
I/System.out: rotate : 90
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : VideoHandle
I/System.out: Side data:
I/System.out: displaymatrix: rotation of -90.00 degrees
I/System.out: Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 254 kb/s (default)
I/System.out: Metadata:
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : SoundHandle
I/System.out: [libx264 @ 0xb5e08800] using cpu capabilities: none!
I/System.out: [libx264 @ 0xb5e08800] profile Constrained Baseline, level 3.2
I/System.out: [libx264 @ 0xb5e08800] 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=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=16 scenecut=0 intra_refresh=0 rc=abr mbtree=0 bitrate=880 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=0
I/System.out: Output #0, mp4, to '/storage/emulated/0/IHH_y/147upload.mp4':
I/System.out: Metadata:
I/System.out: major_brand : mp42
I/System.out: minor_version : 0
I/System.out: compatible_brands: isommp42
I/System.out: encoder : Lavf56.4.101
I/System.out: Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1080x1080, q=-1--1, 880 kb/s, 16.67 fps, 12800 tbn, 16.67 tbc (default)
I/System.out: Metadata:
I/System.out: rotate : 90
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : VideoHandle
I/System.out: encoder : Lavc56.1.100 libx264
I/System.out: Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
I/System.out: Metadata:
I/System.out: creation_time : 2016-06-23 20:00:50
I/System.out: handler_name : SoundHandle
I/System.out: encoder : Lavc56.1.100 aac
I/System.out: Stream mapping:
I/System.out: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
I/System.out: Stream #0:1 -> #0:1 (aac (native) -> aac (native))
I/System.out: Press [q] to stop, [?] for help
I/System.out: frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.96 bitrate= 0.4kbits/s
I/System.out: frame= 7 fps=6.8 q=0.0 size= 0kB time=00:00:01.05 bitrate= 0.4kbits/s
I/System.out: frame= 15 fps=9.7 q=35.0 size= 87kB time=00:00:01.07 bitrate= 660.5kbits/s
I/System.out: frame= 15 fps=7.3 q=35.0 size= 87kB time=00:00:01.88 bitrate= 376.7kbits/s
I/System.out: frame= 25 fps=9.6 q=35.0 size= 154kB time=00:00:02.05 bitrate= 613.4kbits/s
I/System.out: frame= 32 fps= 10 q=35.0 size= 199kB time=00:00:02.07 bitrate= 784.7kbits/s
I/System.out: frame= 32 fps=8.8 q=35.0 size= 199kB time=00:00:02.93 bitrate= 556.4kbits/s
I/System.out: frame= 42 fps= 10 q=35.0 size= 263kB time=00:00:03.06 bitrate= 705.2kbits/s
I/System.out: frame= 49 fps= 10 q=36.0 size= 328kB time=00:00:03.08 bitrate= 870.9kbits/s
I/System.out: frame= 50 fps=9.5 q=36.0 size= 341kB time=00:00:04.06 bitrate= 687.2kbits/s
I/System.out: frame= 59 fps= 10 q=36.0 size= 407kB time=00:00:04.06 bitrate= 821.2kbits/s
I/System.out: frame= 66 fps= 10 q=36.0 size= 462kB time=00:00:04.10 bitrate= 922.7kbits/s
I/System.out: frame= 66 fps=9.7 q=36.0 size= 462kB time=00:00:05.00 bitrate= 757.4kbits/s
I/System.out: frame= 77 fps= 10 q=35.0 size= 534kB time=00:00:05.06 bitrate= 864.0kbits/s
I/System.out: frame= 83 fps= 11 q=34.0 size= 566kB time=00:00:05.44 bitrate= 850.2kbits/s
I/System.out: frame= 89 fps= 11 q=34.0 size= 600kB time=00:00:06.06 bitrate= 810.6kbits/s
I/System.out: frame= 95 fps= 11 q=35.0 size= 636kB time=00:00:06.06 bitrate= 859.0kbits/s
I/System.out: frame= 100 fps= 11 q=34.0 size= 676kB time=00:00:06.28 bitrate= 881.8kbits/s
I/System.out: frame= 104 fps= 11 q=33.0 size= 702kB time=00:00:07.07 bitrate= 812.8kbits/s
I/System.out: frame= 114 fps= 11 q=34.0 size= 765kB time=00:00:07.07 bitrate= 885.7kbits/s
I/System.out: frame= 117 fps= 11 q=33.0 size= 787kB time=00:00:07.26 bitrate= 887.7kbits/s
I/System.out: frame= 117 fps= 10 q=33.0 size= 787kB time=00:00:08.03 bitrate= 802.8kbits/s
I/System.out: frame= 129 fps= 11 q=33.0 size= 857kB time=00:00:08.07 bitrate= 869.1kbits/s
I/System.out: frame= 138 fps= 11 q=34.0 size= 922kB time=00:00:08.07 bitrate= 935.1kbits/s
I/System.out: frame= 140 fps= 11 q=33.0 size= 937kB time=00:00:08.58 bitrate= 894.1kbits/s
I/System.out: frame= 144 fps= 11 q=-1.0 Lsize= 1032kB time=00:00:08.96 bitrate= 943.0kbits/s
I/System.out: video:889kB audio:138kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.512610%
I/System.out: [libx264 @ 0xb5e08800] frame I:1 Avg QP:33.00 size: 21090
I/System.out: [libx264 @ 0xb5e08800] frame P:143 Avg QP:34.49 size: 6217
I/System.out: [libx264 @ 0xb5e08800] mb I I16..4: 100.0% 0.0% 0.0%
I/System.out: [libx264 @ 0xb5e08800] mb P I16..4: 10.3% 0.0% 0.0% P16..4: 21.2% 0.0% 0.0% 0.0% 0.0% skip:68.5%
I/System.out: [libx264 @ 0xb5e08800] final ratefactor: 34.56
I/System.out: [libx264 @ 0xb5e08800] coded y,uvDC,uvAC intra: 16.9% 5.8% 0.1% inter: 6.2% 0.9% 0.0%
I/System.out: [libx264 @ 0xb5e08800] i16 v,h,dc,p: 55% 30% 8% 7%As you can see from the log, the conversion fps is very low
Need help to make it faster.Note : The source file is MP4 and output file is MP4 as well
-
Fast Video Compression on Android
-
ffmpeg stops randomly with "No more output streams to write to, finishing" when reading rtsp stream [on hold]
7 juin 2016, par ImagineDragonBasically I am running the following ffmpeg command to read an h264 rtsp stream using hls muxer, under Ubuntu 14.04 64bit with i7 CPU and 8GB memory :
ffmpeg -v debug -i rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB -codec copy -flags -global_header -f hls -hls_time 5 -use_localtime 1 -hls_segment_filename '/home/eason/ffmpeg-test/%s.ts' '/home/eason/ffmpeg-test/live.m3u8'
ffmpeg version N-79139-gde1a0d4 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab
libavutil 55. 19.100 / 55. 19.100
libavcodec 57. 30.100 / 57. 30.100
libavformat 57. 29.101 / 57. 29.101
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 40.102 / 6. 40.102
libavresample 3. 0. 0 / 3. 0. 0
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
Reading option '-i' ... matched as input file with argument 'rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB'.
Reading option '-codec' ... matched as option 'codec' (codec name) with argument 'copy'.
Reading option '-flags' ... matched as AVOption 'flags' with argument '-global_header'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'hls'.
Reading option '-hls_time' ... matched as AVOption 'hls_time' with argument '5'.
Reading option '-use_localtime' ... matched as AVOption 'use_localtime' with argument '1'.
Reading option '-hls_segment_filename' ... matched as AVOption 'hls_segment_filename' with argument '/home/eason/ffmpeg-test/%s.ts'.
Reading option '/home/eason/ffmpeg-test/live.m3u8' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB.
Applying option re (read input at native frame rate) with argument 1.
Successfully parsed a group of options.
Opening an input file: rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB.
[tcp @ 0x29c4d60] No default whitelist set
[rtsp @ 0x29c2e20] SDP:
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640028;sprop-parameter-sets=Z2QAKKzoBQBbkA==,aO48sA==
a=control:trackID=0
m=audio 0 RTP/AVP 98
a=rtpmap:98 MPEG4-GENERIC/16000/1
a=fmtp:98 profile-level-id=1;mode=AAC-lbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1408;cpresent=0;
a=control:trackID=1
[rtsp @ 0x29c2e20] video codec set to: h264
[rtsp @ 0x29c2e20] RTP Packetization Mode: 1
[rtsp @ 0x29c2e20] RTP Profile IDC: 64 Profile IOP: 0 Level: 28
[rtsp @ 0x29c2e20] Extradata set to 0x29c4ff0 (size: 22)
[rtsp @ 0x29c2e20] audio codec set to: aac
[rtsp @ 0x29c2e20] audio samplerate set to: 16000
[rtsp @ 0x29c2e20] audio channels set to: 1
[rtp @ 0x29c50a0] No default whitelist set
[udp @ 0x29c5200] No default whitelist set
[udp @ 0x29c5200] end receive buffer size reported is 131072
[udp @ 0x29d9480] No default whitelist set
[udp @ 0x29d9480] end receive buffer size reported is 131072
[rtsp @ 0x29c2e20] method SETUP failed: 461 Unsupported transport
[rtsp @ 0x29c2e20] CSeq: 3
[rtsp @ 0x29c2e20] setting jitter buffer size to 0
Last message repeated 1 times
[rtsp @ 0x29c2e20] hello state=0
[rtsp @ 0x29c2e20] All info found
[rtsp @ 0x29c2e20] rfps: 24.250000 0.018062
[rtsp @ 0x29c2e20] rfps: 24.333333 0.012911
[rtsp @ 0x29c2e20] rfps: 24.416667 0.008627
[rtsp @ 0x29c2e20] rfps: 24.500000 0.005207
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 24.583333 0.002653
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 24.666667 0.000965
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 24.750000 0.000142
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 24.833333 0.000185
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 24.916667 0.001093
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 25.000000 0.002867
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 25.083333 0.005507
Last message repeated 1 times
[rtsp @ 0x29c2e20] rfps: 25.166667 0.009011
[rtsp @ 0x29c2e20] rfps: 25.250000 0.013382
[rtsp @ 0x29c2e20] rfps: 25.333333 0.018618
[rtsp @ 0x29c2e20] rfps: 50.000000 0.011469
Input #0, rtsp, from 'rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0, 28, 1/90000: Video: h264 (High), 1 reference frame, yuv420p(left), 1280x720, 1/180000, 24.75 tbr, 90k tbn, 180k tbc
Stream #0:1, 23, 1/16000: Audio: aac (LC), 16000 Hz, mono, fltp
Successfully opened the file.
Parsing a group of options: output file /home/eason/ffmpeg-test/live.m3u8.
Applying option codec (codec name) with argument copy.
Applying option f (force format) with argument hls.
Successfully parsed a group of options.
Opening an output file: /home/eason/ffmpeg-test/live.m3u8.
Successfully opened the file.
[file @ 0x2cae180] Setting default whitelist 'file,crypto'
[mpegts @ 0x29f7ce0] muxrate VBR, pcr every 9000 pkts, sdt every 2147483647, pat/pmt every 2147483647 pkts
Output #0, hls, to '/home/eason/ffmpeg-test/live.m3u8':
Metadata:
encoder : Lavf57.29.101
Stream #0:0, 0, 1/90000: Video: h264, 1 reference frame, yuv420p(left), 1280x720 (0x0), 1/90000, q=2-31, 24.75 tbr, 90k tbn, 90k tbc
Stream #0:1, 0, 1/90000: Audio: aac (LC), 16000 Hz, mono
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per stream)
Last message repeated 103 times
[hls @ 0x2a0fc00] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[AVIOContext @ 0x2c998c0] Statistics: 0 seeks, 155 writeouts=N/A speed=1.01x
[file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
[file @ 0x2ca9fc0] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
[AVIOContext @ 0x2caa080] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 103 writeouts=N/A speed= 1x
[file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
[file @ 0x2c97c60] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
[AVIOContext @ 0x2c97d20] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 104 writeouts=N/A speed= 1x
[file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
[file @ 0x2c99680] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
[AVIOContext @ 0x2c99820] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 28 writeoutse=N/A speed= 1x
[file @ 0x29c50c0] Setting default whitelist 'file,crypto'
[file @ 0x2ba60e0] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
[AVIOContext @ 0x29c2ce0] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 111 writeouts=N/A speed= 1x
[file @ 0x2c97d40] Setting default whitelist 'file,crypto'
[file @ 0x2a134e0] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:0
[AVIOContext @ 0x2a11000] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 105 writeouts=N/A speed= 1x
[file @ 0x29c50c0] Setting default whitelist 'file,crypto'
[file @ 0x2a10c00] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:1
[AVIOContext @ 0x2a10cc0] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 103 writeouts=N/A speed= 1x
[file @ 0x29c50c0] Setting default whitelist 'file,crypto'
[file @ 0x2c99480] Setting default whitelist 'file,crypto'
.......repeat........
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:71
[AVIOContext @ 0x2c97fa0] Statistics: 0 seeks, 1 writeouts
[rtsp @ 0x29c2e20] Too short data for FU-A H264 RTP packette=N/A speed= 1x
[AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 103 writeouts=N/A speed= 1x
[file @ 0x2c97b20] Setting default whitelist 'file,crypto'
[file @ 0x2c97c60] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:72
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 156 writeouts=N/A speed= 1x
[file @ 0x2c99480] Setting default whitelist 'file,crypto'
[file @ 0x2cab600] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:73
[AVIOContext @ 0x2cab6c0] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 104 writeouts=N/A speed= 1x
[file @ 0x2cadc00] Setting default whitelist 'file,crypto'
[file @ 0x2c99480] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:74
[AVIOContext @ 0x29c2ce0] Statistics: 0 seeks, 1 writeouts
[AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 103 writeouts=N/A speed= 1x
[file @ 0x2a13540] Setting default whitelist 'file,crypto'
[file @ 0x2cab680] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:75
[AVIOContext @ 0x2c99480] Statistics: 0 seeks, 1 writeouts
No more output streams to write to, finishing.:46.09 bitrate=N/A speed=0.993x
[AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 138 writeouts
[file @ 0x29c50c0] Setting default whitelist 'file,crypto'
[hls @ 0x2a0fc00] EXT-X-MEDIA-SEQUENCE:76
[AVIOContext @ 0x2ba60e0] Statistics: 0 seeks, 1 writeouts
frame= 8423 fps= 21 q=-1.0 Lsize=N/A time=00:06:46.09 bitrate=N/A speed=0.993x
video:37031kB audio:1586kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (rtsp://172.16.11.247:554/live/ch00_0?token=hQttXvrjSPOcClQB):
Input stream #0:0 (video): 8423 packets read (37919815 bytes);
Input stream #0:1 (audio): 6345 packets read (1624337 bytes);
Total: 14768 packets (39544152 bytes) demuxed
Output file #0 (/home/eason/ffmpeg-test/live.m3u8):
Output stream #0:0 (video): 8423 packets muxed (37919815 bytes);
Output stream #0:1 (audio): 6345 packets muxed (1624337 bytes);
Total: 14768 packets (39544152 bytes) muxed
0 frames successfully decoded, 0 decoding errorsThe problem is that ffmpeg exits randomly after 5 to 20 minutes. The RTSP is a live stream so stopping every 5 minute is really not acceptable. In the ffmpeg log I can’t see any noticeable error except "No more output streams to write to, finishing." near the end. Can someone shed some light upon this ? How can I make ffmpeg run without stopping ? Thanks