
Recherche avancée
Médias (91)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
avec chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
sans chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
config chosen
13 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
SPIP - plugins - embed code - Exemple
2 septembre 2013, par
Mis à jour : Septembre 2013
Langue : français
Type : Image
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
Autres articles (71)
-
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...) -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
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 ) (...)
Sur d’autres sites (4998)
-
Android YouTube Live v3 rtmp streaming via ffmpeg won't show preview
14 décembre 2017, par Ariel YustHi everyone I’m breaking my head over this issue here,
I’m developing an Android App for streaming content from the user’s device camera (back/front) to a live streaming on YouTube.Problem :
YouTube Live shows "The health is good." in (Live Streaming->Events) but there’s nothing showing in the preview... in fact when I press play it tells me "An error has occurred, please try again later".Why is this happening ? what could be the problem ?
What I’m doing :
using google’s Oauth 2.0 and google api for login.
YouTube V3 data api’s for creating a new broadcast and stream or use an opened stream - I’m using RTMP.I’m opening Camera Api1 and capturing the video into a SurfaceTexture, then I encode images and audio (MIC) using Android’s MediaCodec, save a 3+- seconds *.mp4 file locally and then once the muxer is done I stream the file with ffpmeg.
String[] cmd = {
"-i", filePath, //local file path (video is playable with vlc)
"-strict", "experimental",
"-acodec", "aac",
"-ac", "1",
"-ar", "44100",
"-vcodec", "libx264",
"-pix_fmt", "yuv420p",
"-r", "30",
"-g", "60",
"-vb", "512k",
"-profile:v", "main",
"-preset", "medium",
"-f", "flv",
"-s", "1280x720",
CreateBroadcast.rtmpUrl
};
ffmpeg.execute(cmd, responseHandler); //responseHandler notify me to send next file
//how I set a new rtmpUrl, in CreateBroadcast.java
rtmpUrl =
returnedStream.getCdn().getIngestionInfo().getIngestionAddress() +
File.separator +
returnedStream.getCdn().getIngestionInfo().getStreamName();next file
Using this ffmpeg library.
ffmpeg process log :
10:40:08.967 7..8/c.k.r D/Send: ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers, built with gcc 4.8 (GCC)
10:40:08.968 7..8/c.k.r D/Send: configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
10:40:08.969 7..8/c.k.r D/Send: onProgress -> libavutil 55. 17.103 / 55. 17.103
10:40:08.969 7..8/c.k.r D/Send: onProgress -> libavcodec 57. 24.102 / 57. 24.102
10:40:08.969 7..8/c.k.r D/Send: onProgress -> libavformat 57. 25.100 / 57. 25.100
10:40:08.970 7..8/c.k.r D/Send: onProgress -> libavdevice 57. 0.101 / 57. 0.101
10:40:08.970 7..8/c.k.r D/Send: onProgress -> libavfilter 6. 31.100 / 6. 31.100
10:40:08.971 7..8/c.k.r D/Send: onProgress -> libswscale 4. 0.100 / 4. 0.100
10:40:08.971 7..8/c.k.r D/Send: onProgress -> libswresample 2. 0.101 / 2. 0.101
10:40:08.971 7..8/c.k.r D/Send: onProgress -> libpostproc 54. 0.100 / 54. 0.100
10:40:09.202 7..8/c.k.r D/Send: onProgress -> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/realPoll_0.mp4':
10:40:09.203 7..8/c.k.r D/Send: onProgress -> Metadata:
10:40:09.203 7..8/c.k.r D/Send: onProgress -> major_brand : mp42
10:40:09.204 7..8/c.k.r D/Send: onProgress -> minor_version : 0
10:40:09.204 7..8/c.k.r D/Send: onProgress -> compatible_brands: isommp42
10:40:09.204 7..8/c.k.r D/Send: onProgress -> creation_time : 2017-08:40:08
10:40:09.205 7..8/c.k.r D/Send: onProgress -> com.android.version: 6.0.1
10:40:09.205 7..8/c.k.r D/Send: onProgress -> Duration: 00:00:02.79, start: 0.000000, bitrate: 4080 kb/s
10:40:09.206 7..8/c.k.r D/Send: onProgress -> Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 4166 kb/s, SAR 1:1 DAR 16:9, 30.60 fps, 90k tbr, 90k tbn, 180k tbc (default)
10:40:09.206 7..8/c.k.r D/Send: onProgress -> Metadata:
10:40:09.207 7..8/c.k.r D/Send: onProgress -> creation_time : 2017-08:40:08
10:40:09.207 7..8/c.k.r D/Send: onProgress -> handler_name : VideoHandle
10:40:09.208 7..8/c.k.r D/Send: onProgress -> Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 59 kb/s (default)
10:40:09.208 7..8/c.k.r D/Send: onProgress -> Metadata:
10:40:09.209 7..8/c.k.r D/Send: onProgress -> creation_time : 2017-08:40:08
10:40:09.209 7..8/c.k.r D/Send: onProgress -> handler_name : SoundHandle
10:40:10.312 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] using SAR=1/1
10:40:10.324 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] using cpu capabilities: none!
10:40:10.457 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] profile Main, level 3.1
10:40:10.458 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] 264 - core 148 - 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=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 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=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
10:40:10.494 7..8/c.k.r D/Send: onProgress -> Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/b2mb-vjew-2205-8w39':
10:40:10.495 7..8/c.k.r D/Send: onProgress -> Metadata:
10:40:10.496 7..8/c.k.r D/Send: onProgress -> major_brand : mp42
10:40:10.499 7..8/c.k.r D/Send: onProgress -> minor_version : 0
10:40:10.500 7..8/c.k.r D/Send: onProgress -> compatible_brands: isommp42
10:40:10.502 7..8/c.k.r D/Send: onProgress -> com.android.version: 6.0.1
10:40:10.504 7..8/c.k.r D/Send: onProgress -> encoder : Lavf57.25.100
10:40:10.505 7..8/c.k.r D/Send: onProgress -> Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 512 kb/s, 30 fps, 1k tbn, 30 tbc (default)
10:40:10.507 7..8/c.k.r D/Send: onProgress -> Metadata:
10:40:10.509 7..8/c.k.r D/Send: onProgress -> creation_time : 2017-08:40:08
10:40:10.510 7..8/c.k.r D/Send: onProgress -> handler_name : VideoHandle
10:40:10.511 7..8/c.k.r D/Send: onProgress -> encoder : Lavc57.24.102 libx264
10:40:10.512 7..8/c.k.r D/Send: onProgress -> Side data:
10:40:10.512 7..8/c.k.r D/Send: onProgress -> unknown side data type 10 (24 bytes)
10:40:10.514 7..8/c.k.r D/Send: onProgress -> Stream #0:1(eng): Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, mono, fltp, 69 kb/s (default)
10:40:10.521 7..8/c.k.r D/Send: onProgress -> Metadata:
10:40:10.522 7..8/c.k.r D/Send: onProgress -> creation_time : 2017-08:40:08
10:40:10.522 7..8/c.k.r D/Send: onProgress -> handler_name : SoundHandle
10:40:10.522 7..8/c.k.r D/Send: onProgress -> encoder : Lavc57.24.102 aac
10:40:10.523 7..8/c.k.r D/Send: onProgress -> Stream mapping:
10:40:10.523 7..8/c.k.r D/Send: onProgress -> Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
10:40:10.524 7..8/c.k.r D/Send: onProgress -> Stream #0:1 -> #0:1 (aac (native) -> aac (native))
10:40:10.524 7..8/c.k.r D/Send: onProgress -> Press [q] to stop, [?] for help
10:40:11.017 7..8/c.k.r D/Send: onProgress -> frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.92 bitrate= 4.3kbits/s speed=1.82x
10:40:11.300 7..8/c.k.r D/Send: onProgress -> Past duration 0.912331 too large
10:40:11.342 7..8/c.k.r D/Send: onProgress -> Past duration 0.874321 too large
10:40:11.376 7..8/c.k.r D/Send: onProgress -> Past duration 0.903664 too large
10:40:11.411 7..8/c.k.r D/Send: onProgress -> Past duration 0.884666 too large
10:40:11.545 7..8/c.k.r D/Send: onProgress -> frame= 12 fps= 12 q=0.0 size= 0kB time=00:00:01.03 bitrate= 3.9kbits/s dup=0 drop=2 speed= 1x
10:40:12.105 7..8/c.k.r D/Send: onProgress -> frame= 25 fps= 16 q=0.0 size= 0kB time=00:00:01.03 bitrate= 3.9kbits/s dup=0 drop=2 speed=0.667x
[ 10:40:12.379 191: 191 E/ ]
invalid crash request of size 4 (from pid=7244 uid=0)
10:40:12.598 7..8/c.k.r D/Send: onProgress -> frame= 32 fps= 15 q=0.0 size= 0kB time=00:00:02.02 bitrate= 2.0kbits/s dup=0 drop=2 speed=0.98x
10:40:12.598 7..8/c.k.r D/Send: onProgress -> Past duration 0.792656 too large
10:40:12.675 7..8/c.k.r D/Send: onProgress -> Past duration 0.710991 too large
10:40:12.708 7..8/c.k.r D/Send: onProgress -> Past duration 0.688332 too large
10:40:12.725 7..8/c.k.r D/Send: onProgress -> Past duration 0.710655 too large
10:40:12.760 7..8/c.k.r D/Send: onProgress -> Past duration 0.716331 too large
10:40:12.775 7..8/c.k.r D/Send: onProgress -> Past duration 0.713661 too large
10:40:12.791 7..8/c.k.r D/Send: onProgress -> Past duration 0.688332 too large
10:40:12.825 7..8/c.k.r D/Send: onProgress -> Past duration 0.633659 too large
10:40:12.857 7..8/c.k.r D/Send: onProgress -> Past duration 0.661324 too large
10:40:12.876 7..8/c.k.r D/Send: onProgress -> Past duration 0.670998 too large
10:40:12.942 7..8/c.k.r D/Send: onProgress -> Past duration 0.640327 too large
10:40:17.761 7..8/c.k.r D/Send: onProgress -> frame= 47 fps=6.7 q=0.0 size= 0kB time=00:00:02.02 bitrate= 2.0kbits/s dup=0 drop=2 speed=0.288x
10:40:17.929 7..8/c.k.r D/Send: onProgress -> Past duration 0.605324 too large
10:40:17.997 7..8/c.k.r D/Send: onProgress -> Past duration 0.614998 too large
10:40:18.520 7..8/c.k.r D/Send: onProgress -> frame= 51 fps=6.6 q=42.0 size= 4kB time=00:00:02.02 bitrate= 17.0kbits/s dup=0 drop=2 speed=0.263x
10:40:18.520 7..8/c.k.r D/Send: onProgress -> Past duration 0.605995 too large
10:40:19.607 7..8/c.k.r D/Send: onProgress -> Past duration 0.608986 too large
10:40:19.843 7..8/c.k.r D/Send: onProgress -> frame= 53 fps=5.8 q=42.0 size= 9kB time=00:00:02.02 bitrate= 34.8kbits/s dup=0 drop=2 speed=0.223x
10:40:20.365 7..8/c.k.r D/Send: onProgress -> Past duration 0.614326 too large
10:40:20.710 7..8/c.k.r D/Send: onProgress -> frame= 56 fps=5.7 q=41.0 size= 16kB time=00:00:02.02 bitrate= 66.2kbits/s dup=0 drop=2 speed=0.206x
10:40:21.348 7..8/c.k.r D/Send: onProgress -> frame= 58 fps=5.5 q=41.0 size= 20kB time=00:00:02.02 bitrate= 82.1kbits/s dup=0 drop=2 speed=0.193x
10:40:22.419 7..8/c.k.r D/Send: onProgress -> frame= 61 fps=5.2 q=41.0 size= 27kB time=00:00:02.02 bitrate= 108.3kbits/s dup=0 drop=2 speed=0.173x
10:40:23.232 7..8/c.k.r D/Send: onProgress -> frame= 64 fps=5.1 q=41.0 size= 33kB time=00:00:02.02 bitrate= 133.1kbits/s dup=0 drop=2 speed=0.161x
10:40:24.659 7..8/c.k.r D/Send: onProgress -> frame= 67 fps=4.8 q=40.0 size= 38kB time=00:00:02.02 bitrate= 154.5kbits/s dup=0 drop=2 speed=0.145x
10:40:25.591 7..8/c.k.r D/Send: onProgress -> frame= 69 fps=4.7 q=40.0 size= 42kB time=00:00:02.02 bitrate= 169.5kbits/s dup=0 drop=2 speed=0.138x
10:40:26.137 7..8/c.k.r D/Send: onProgress -> frame= 71 fps=4.6 q=39.0 size= 45kB time=00:00:02.02 bitrate= 183.6kbits/s dup=0 drop=2 speed=0.132x
10:40:26.913 7..8/c.k.r D/Send: onProgress -> frame= 73 fps=4.5 q=39.0 size= 46kB time=00:00:02.02 bitrate= 187.6kbits/s dup=0 drop=2 speed=0.125x
10:40:27.234 7..8/c.k.r D/Send: onProgress -> frame= 76 fps=4.5 q=38.0 size= 49kB time=00:00:02.48 bitrate= 162.7kbits/s dup=0 drop=2 speed=0.149x
10:40:27.295 7..8/c.k.r D/Send: onProgress -> Past duration 0.686333 too large
10:40:27.801 7..8/c.k.r D/Send: onProgress -> Past duration 0.840324 too large
10:40:28.269 7..8/c.k.r D/Send: onProgress -> frame= 78 fps=4.5 q=37.0 size= 53kB time=00:00:02.54 bitrate= 171.5kbits/s dup=0 drop=2 speed=0.147x
10:40:28.269 7..8/c.k.r D/Send: onProgress -> Past duration 0.739662 too large
10:40:28.336 7..8/c.k.r D/Send: onProgress -> Past duration 0.671333 too large
10:40:28.373 7..8/c.k.r D/Send: onProgress -> frame= 80 fps=4.5 q=37.0 size= 59kB time=00:00:02.54 bitrate= 188.7kbits/s dup=0 drop=2 speed=0.143x
10:40:41.320 7..8/c.k.r D/Send: onProgress -> [flv @ 0xb5ba9600] Failed to update header with correct duration.
10:40:41.321 7..8/c.k.r D/Send: onProgress -> [flv @ 0xb5ba9600] Failed to update header with correct filesize.
10:40:41.321 7..8/c.k.r D/Send: onProgress -> frame= 80 fps=2.6 q=-1.0 Lsize= 155kB time=00:00:02.70 bitrate= 468.9kbits/s dup=0 drop=2 speed=0.0877x
10:40:41.322 7..8/c.k.r D/Send: onProgress -> video:128kB audio:23kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.617489%
10:40:41.332 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] frame I:2 Avg QP:28.63 size: 3516
10:40:41.333 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] frame P:62 Avg QP:28.45 size: 1878
10:40:41.333 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] frame B:16 Avg QP:29.68 size: 400
10:40:41.334 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] consecutive B-frames: 71.2% 5.0% 3.8% 20.0%
10:40:41.334 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] mb I I16..4: 98.8% 0.0% 1.2%
10:40:41.334 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] mb P I16..4: 17.8% 0.0% 0.1% P16..4: 17.0% 0.2% 0.7% 0.0% 0.0% skip:64.2%
10:40:41.335 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] mb B I16..4: 0.1% 0.0% 0.0% B16..8: 11.9% 0.0% 0.0% direct: 1.0% skip:87.0% L0:16.0% L1:84.0% BI: 0.0%
10:40:41.335 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] final ratefactor: 30.20
10:40:41.336 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] coded y,uvDC,uvAC intra: 1.4% 20.4% 0.0% inter: 0.4% 14.0% 0.0%
10:40:41.338 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] i16 v,h,dc,p: 66% 22% 7% 4%
10:40:41.339 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 7% 19% 53% 4% 4% 3% 5% 2% 2%
10:40:41.339 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] i8c dc,h,v,p: 71% 16% 12% 0%
10:40:41.340 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] Weighted P-Frames: Y:6.5% UV:6.5%
10:40:41.340 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] ref P L0: 85.6% 4.5% 7.7% 2.2% 0.0%
10:40:41.341 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] ref B L0: 99.3% 0.7%
10:40:41.341 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] ref B L1: 97.0% 3.0%
10:40:41.342 7..8/c.k.r D/Send: onProgress -> [libx264 @ 0xb5b84800] kb/s:384.88
10:40:41.421 7..8/c.k.r D/Send: onProgress -> [aac @ 0xb5b85000] Qavg: 1561.786
10:40:41.423 7..8/c.k.r D/Send: onSuccess -> configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/arm-linux-androideabi- --arch=arm --cpu=cortex-a8 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --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/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/armeabi-v7a --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
10:40:41.423 7..8/c.k.r D/Send: libavutil 55. 17.103 / 55. 17.103
10:40:41.423 7..8/c.k.r D/Send: libavcodec 57. 24.102 / 57. 24.102
10:40:41.423 7..8/c.k.r D/Send: libavformat 57. 25.100 / 57. 25.100
10:40:41.423 7..8/c.k.r D/Send: libavdevice 57. 0.101 / 57. 0.101
10:40:41.424 7..8/c.k.r D/Send: libavfilter 6. 31.100 / 6. 31.100
10:40:41.424 7..8/c.k.r D/Send: libswscale 4. 0.100 / 4. 0.100
10:40:41.424 7..8/c.k.r D/Send: libswresample 2. 0.101 / 2. 0.101
10:40:41.424 7..8/c.k.r D/Send: libpostproc 54. 0.100 / 54. 0.100
10:40:41.424 7..8/c.k.r D/Send: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Movies/realPoll_0.mp4':
10:40:41.424 7..8/c.k.r D/Send: Metadata:
10:40:41.424 7..8/c.k.r D/Send: major_brand : mp42
10:40:41.424 7..8/c.k.r D/Send: minor_version : 0
10:40:41.424 7..8/c.k.r D/Send: compatible_brands: isommp42
10:40:41.424 7..8/c.k.r D/Send: creation_time : 2017-08:40:08
10:40:41.424 7..8/c.k.r D/Send: com.android.version: 6.0.1
10:40:41.424 7..8/c.k.r D/Send: Duration: 00:00:02.79, start: 0.000000, bitrate: 4080 kb/s
10:40:41.424 7..8/c.k.r D/Send: Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1280x720, 4166 kb/s, SAR 1:1 DAR 16:9, 30.60 fps, 90k tbr, 90k tbn, 180k tbc (default)
10:40:41.424 7..8/c.k.r D/Send: Metadata:
10:40:41.424 7..8/c.k.r D/Send: creation_time : 2017-08:40:08
10:40:41.424 7..8/c.k.r D/Send: handler_name : VideoHandle
10:40:41.424 7..8/c.k.r D/Send: Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 59 kb/s (default)
10:40:41.424 7..8/c.k.r D/Send: Metadata:
10:40:41.424 7..8/c.k.r D/Send: creation_time : 2017-08:40:08
10:40:41.424 7..8/c.k.r D/Send: handler_name : SoundHandle
10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] using SAR=1/1
10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] using cpu capabilities: none!
10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] profile Main, level 3.1
10:40:41.425 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] 264 - core 148 - 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=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 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=60 keyint_min=6 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
10:40:41.425 7..8/c.k.r D/Send: Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/b2mb-vjew-2205-8w39':
10:40:41.425 7..8/c.k.r D/Send: Metadata:
10:40:41.425 7..8/c.k.r D/Send: major_brand : mp42
10:40:41.425 7..8/c.k.r D/Send: minor_version : 0
10:40:41.425 7..8/c.k.r D/Send: compatible_brands: isommp42
10:40:41.425 7..8/c.k.r D/Send: com.android.version: 6.0.1
10:40:41.425 7..8/c.k.r D/Send: encoder : Lavf57.25.100
10:40:41.425 7..8/c.k.r D/Send: Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 512 kb/s, 30 fps, 1k tbn, 30 tbc (default)
10:40:41.425 7..8/c.k.r D/Send: Metadata:
10:40:41.425 7..8/c.k.r D/Send: creation_time : 2017-08:40:08
10:40:41.425 7..8/c.k.r D/Send: handler_name : VideoHandle
10:40:41.425 7..8/c.k.r D/Send: encoder : Lavc57.24.102 libx264
10:40:41.425 7..8/c.k.r D/Send: Side data:
10:40:41.425 7..8/c.k.r D/Send: unknown side data type 10 (24 bytes)
10:40:41.425 7..8/c.k.r D/Send: Stream #0:1(eng): Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, mono, fltp, 69 kb/s (default)
10:40:41.426 7..8/c.k.r D/Send: Metadata:
10:40:41.426 7..8/c.k.r D/Send: creation_time : 2017-08:40:08
10:40:41.426 7..8/c.k.r D/Send: handler_name : SoundHandle
10:40:41.426 7..8/c.k.r D/Send: encoder : Lavc57.24.102 aac
10:40:41.426 7..8/c.k.r D/Send: Stream mapping:
10:40:41.426 7..8/c.k.r D/Send: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
10:40:41.427 7..8/c.k.r D/Send: Stream #0:1 -> #0:1 (aac (native) -> aac (native))
10:40:41.427 7..8/c.k.r D/Send: Press [q] to stop, [?] for help
10:40:41.427 7..8/c.k.r D/Send: frame= 0 fps=0.0 q=0.0 size= 0kB time=00:00:00.92 bitrate= 4.3kbits/s speed=1.82x
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.912331 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.874321 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.903664 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.884666 too large
10:40:41.427 7..8/c.k.r D/Send: frame= 12 fps= 12 q=0.0 size= 0kB time=00:00:01.03 bitrate= 3.9kbits/s dup=0 drop=2 speed= 1x
10:40:41.427 7..8/c.k.r D/Send: frame= 25 fps= 16 q=0.0 size= 0kB time=00:00:01.03 bitrate= 3.9kbits/s dup=0 drop=2 speed=0.667x
10:40:41.427 7..8/c.k.r D/Send: frame= 32 fps= 15 q=0.0 size= 0kB time=00:00:02.02 bitrate= 2.0kbits/s dup=0 drop=2 speed=0.98x
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.792656 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.710991 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.688332 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.710655 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.716331 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.713661 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.688332 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.633659 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.661324 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.670998 too large
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.640327 too large
10:40:41.427 7..8/c.k.r D/Send: frame= 47 fps=6.7 q=0.0 size= 0kB time=00:00:02.02 bitrate= 2.0kbits/s dup=0 drop=2 speed=0.288x
10:40:41.427 7..8/c.k.r D/Send: Past duration 0.605324 too large
10:40:41.428 7..8/c.k.r D/Send: Past duration 0.614998 too large
10:40:41.428 7..8/c.k.r D/Send: frame= 51 fps=6.6 q=42.0 size= 4kB time=00:00:02.02 bitrate= 17.0kbits/s dup=0 drop=2 speed=0.263x
10:40:41.428 7..8/c.k.r D/Send: Past duration 0.605995 too large
10:40:41.428 7..8/c.k.r D/Send: Past duration 0.608986 too large
10:40:41.428 7..8/c.k.r D/Send: frame= 53 fps=5.8 q=42.0 size= 9kB time=00:00:02.02 bitrate= 34.8kbits/s dup=0 drop=2 speed=0.223x
10:40:41.428 7..8/c.k.r D/Send: Past duration 0.614326 too large
10:40:41.428 7..8/c.k.r D/Send: frame= 56 fps=5.7 q=41.0 size= 16kB time=00:00:02.02 bitrate= 66.2kbits/s dup=0 drop=2 speed=0.206x
10:40:41.428 7..8/c.k.r D/Send: frame= 58 fps=5.5 q=41.0 size= 20kB time=00:00:02.02 bitrate= 82.1kbits/s dup=0 drop=2 speed=0.193x
10:40:41.428 7..8/c.k.r D/Send: frame= 61 fps=5.2 q=41.0 size= 27kB time=00:00:02.02 bitrate= 108.3kbits/s dup=0 drop=2 speed=0.173x
10:40:41.428 7..8/c.k.r D/Send: frame= 64 fps=5.1 q=41.0 size= 33kB time=00:00:02.02 bitrate= 133.1kbits/s dup=0 drop=2 speed=0.161x
10:40:41.428 7..8/c.k.r D/Send: frame= 67 fps=4.8 q=40.0 size= 38kB time=00:00:02.02 bitrate= 154.5kbits/s dup=0 drop=2 speed=0.145x
10:40:41.428 7..8/c.k.r D/Send: frame= 69 fps=4.7 q=40.0 size= 42kB time=00:00:02.02 bitrate= 169.5kbits/s dup=0 drop=2 speed=0.138x
10:40:41.428 7..8/c.k.r D/Send: frame= 71 fps=4.6 q=39.0 size= 45kB time=00:00:02.02 bitrate= 183.6kbits/s dup=0 drop=2 speed=0.132x
10:40:41.428 7..8/c.k.r D/Send: frame= 73 fps=4.5 q=39.0 size= 46kB time=00:00:02.02 bitrate= 187.6kbits/s dup=0 drop=2 speed=0.125x
10:40:41.428 7..8/c.k.r D/Send: frame= 76 fps=4.5 q=38.0 size= 49kB time=00:00:02.48 bitrate= 162.7kbits/s dup=0 drop=2 speed=0.149x
10:40:41.428 7..8/c.k.r D/Send: Past duration 0.686333 too large
10:40:41.428 7..8/c.k.r D/Send: Past duration 0.840324 too large
10:40:41.428 7..8/c.k.r D/Send: frame= 78 fps=4.5 q=37.0 size= 53kB time=00:00:02.54 bitrate= 171.5kbits/s dup=0 drop=2 speed=0.147x
10:40:41.428 7..8/c.k.r D/Send: Past duration 0.739662 too large
10:40:41.429 7..8/c.k.r D/Send: Past duration 0.671333 too large
10:40:41.429 7..8/c.k.r D/Send: frame= 80 fps=4.5 q=37.0 size= 59kB time=00:00:02.54 bitrate= 188.7kbits/s dup=0 drop=2 speed=0.143x
10:40:41.429 7..8/c.k.r D/Send: [flv @ 0xb5ba9600] Failed to update header with correct duration.
10:40:41.429 7..8/c.k.r D/Send: [flv @ 0xb5ba9600] Failed to update header with correct filesize.
10:40:41.429 7..8/c.k.r D/Send: frame= 80 fps=2.6 q=-1.0 Lsize= 155kB time=00:00:02.70 bitrate= 468.9kbits/s dup=0 drop=2 speed=0.0877x
10:40:41.429 7..8/c.k.r D/Send: video:128kB audio:23kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.617489%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] frame I:2 Avg QP:28.63 size: 3516
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] frame P:62 Avg QP:28.45 size: 1878
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] frame B:16 Avg QP:29.68 size: 400
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] consecutive B-frames: 71.2% 5.0% 3.8% 20.0%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] mb I I16..4: 98.8% 0.0% 1.2%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] mb P I16..4: 17.8% 0.0% 0.1% P16..4: 17.0% 0.2% 0.7% 0.0% 0.0% skip:64.2%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] mb B I16..4: 0.1% 0.0% 0.0% B16..8: 11.9% 0.0% 0.0% direct: 1.0% skip:87.0% L0:16.0% L1:84.0% BI: 0.0%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] final ratefactor: 30.20
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] coded y,uvDC,uvAC intra: 1.4% 20.4% 0.0% inter: 0.4% 14.0% 0.0%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] i16 v,h,dc,p: 66% 22% 7% 4%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 7% 19% 53% 4% 4% 3% 5% 2% 2%
10:40:41.429 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] i8c dc,h,v,p: 71% 16% 12% 0%
10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] Weighted P-Frames: Y:6.5% UV:6.5%
10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] ref P L0: 85.6% 4.5% 7.7% 2.2% 0.0%
10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] ref B L0: 99.3% 0.7%
10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] ref B L1: 97.0% 3.0%
10:40:41.430 7..8/c.k.r D/Send: [libx264 @ 0xb5b84800] kb/s:384.88
10:40:41.430 7..8/c.k.r D/Send: [aac @ 0xb5b85000] Qavg: 1561.786Thanks for your time and insights !
-
How to set the moov atom position when encoding video using ffmpeg in c++
19 décembre 2017, par Zhiqiang LiI’m encoding some h264 video into a mp4 container using ffmpeg in c++. But the result videos place the moov atom(or metadata ?) at the end of the video file, it’s bad for internet streaming.
So how can I set the moov atom position to the front ? -
Dreamcast Serial Extractor
31 décembre 2017, par Multimedia Mike — Sega DreamcastIt has not been a very productive year for blogging. But I started the year by describing an unfinished project that I developed for the Sega Dreamcast, so I may as well end the year the same way. The previous project was a media player. That initiative actually met with some amount of success and could have developed into something interesting if I had kept at it.
By contrast, this post describes an effort that was ultimately a fool’s errand that I spent way too much time trying to make work.
Problem Statement
In my neverending quest to analyze the structure of video games while also hoarding a massive collection of them (though I’m proud to report that I did play at least a few of them this past year), I wanted to be able to extract the data from my many Dreamcast titles, both games and demo discs. I had a tool called the DC Coder’s Cable, a serial cable that enables communication between a Dreamcast and a PC. With the right software, you could dump an entire Dreamcast GD-ROM, which contained a gigabyte worth of sectors.Problem : The dumping software (named ‘dreamrip’ and written by noted game hacker BERO) operated in a very basic mode, methodically dumping sector after sector and sending it down the serial cable. This meant that it took about 28 hours to extract all the data on a single disc by running at the maximum speed of 115,200 bits/second, or about 11 kilobytes/second. I wanted to create a faster method.
The Pitch
I formed a mental model of dreamrip’s operation that looked like this :
As an improvement, I envisioned this beautiful architecture :
Architectural Assumptions
My proposed architecture was predicated on the assumption that the disc reading and serial output functions were both I/O-bound operations and that the CPU would be idle much of the time. My big idea was to use that presumably idle CPU time to compress the sectors before sending them over the wire. As long as the CPU can compress the data faster than 11 kbytes/sec, it should be a win. In order to achieve this, I broke the main program into 3 threads :- The first thread reads the sectors ; more specifically, it asks the drive firmware to please read the sectors and make the data available in system RAM
- The second thread waits for sector data to appear in memory and then compresses it
- The third thread takes the compressed data when it is ready and shuffles it out through the serial cable
Simple and elegant, right ?
For data track compression, I wanted to start with zlib in order to prove the architecture, but then also try bzip2 or lzma. As long as they could compress data faster than the serial port could write it, then it should be a win. For audio track compression, I wanted to use the Flake FLAC encoder. According to my notes, I did get both bzip2 compression and the Flake compressor working on the Dreamcast. I recall choosing Flake over the official FLAC encoder because it was much simpler and had fewer dependencies, always an important consideration for platforms such as this.
Problems
I worked for quite awhile on this project. I have a lot of notes recorded but a lot of the problems I had remain a bit vague in my memory. However, there was one problem I discovered that eventually sunk the entire initiative :The serial output operation is CPU-bound.
My initial mental model was that the a buffer could be “handed off” to the serial subsystem and the CPU could go back to doing other work. Nope. Turns out that the CPU was participating at every step of the serial transfer.
Further, I eventually dug into the serial driver code and learned that there was already some compression taking place via the miniLZO library.
Lessons Learned
- Recognize the assumptions that you’re making up front at the start of the project.
- Prototype in order to ensure plausibility
- Profile to make sure you’re optimizing the right thing (this is something I have learned again and again).
Another interesting tidbit from my notes : it doesn’t matter how many sectors you read at a time, the overall speed is roughly the same. I endeavored to read 1000 2048-byte data sectors, 1 or 10 or 100 at a time, or all 1000 at once. My results :
- 1 : 19442 ms
- 10 : 19207 ms
- 100 : 19194 ms
- 1000 : 19320 ms
No difference. That surprised me.
Side Benefits
At one point, I needed to understand how BERO’s dreamrip software was operating. I knew I used to have the source code but I could no longer find it. Instead, I decided to try to reverse engineer what I needed from the SH-4 binary image that I had. It wasn’t an ELF image ; rather, it was a raw binary meant to be loaded at a particular memory location which makes it extra challenging for ‘objdump’. This led to me asking my most viewed and upvoted question on Stack Overflow : “Disassembling A Flat Binary File Using objdump”. The next day, it also led me to post one of my most upvoted answers when I found the solution elsewhere.Strangely, I have since tried out the command line shown in my answer and have been unable to make it work. But people keep upvoting both the question and the answer.
Eventually this all became moot when I discovered a misplaced copy of the source code on one of my computers.
I strongly recall binging through the Alias TV show while I was slogging away on this project, so I guess that’s a positive association since I got so many fun screenshots out of it.
The Final Resolution
Strangely, I was still determined to make this project work even though the Dreamcast SD adapter arrived for me about halfway through the effort. Part of this was just stubbornness, but part of it was my assumptions about serial port speeds, in particular, my assumption that there was a certain speed-of-light type of limitation on serial port speeds so that the SD adapter, operating over the DC’s serial port, would not be appreciably faster than the serial cable.This turned out to be very incorrect. In fact, the SD adapter is capable of extracting an entire gigabyte disc image in 35-40 minutes. This is the method I have since been using to extract Dreamcast disc images.
The post Dreamcast Serial Extractor first appeared on Breaking Eggs And Making Omelettes.