
Recherche avancée
Autres articles (53)
-
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...) -
Gestion générale des documents
13 mai 2011, parMédiaSPIP ne modifie jamais le document original mis en ligne.
Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)
Sur d’autres sites (4075)
-
Concatenating video using FFMPEG wrapper class [duplicate]
21 décembre 2017, par alan samuelThis question already has an answer here :
I am trying to concatenate video using NReco.VideoConverter wrapper class made for FFMPEG.
I have three video files with the same frame rate and same frame size.
Here is what I have done.
string toconcatfile = @"C:\Users\Alan\Desktop\Black.mp4";
string output1 = @"C:\Users\Alan\Desktop\output1.mp4";
string output2 = @"C:\Users\Alan\Desktop\output2.mp4";
string finaloutput = @"C:\Users\Alan\Desktop\finaloutput.mp4";All the three videos have a frame rate of 25 and Video frame size yet it fails when I add in toconcatfile to the final conversion method.
It works when its just output1 and output2 meaning there must be a different setting in toconcatfile.
Here is what I have tried.
FFMpegConverter fFMpeg = new FFMpegConverter();
//Slices first video
ConvertSettings settings = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
MaxDuration = startcut,
AudioSampleRate = 44100
};
//Slices second video
ConvertSettings settings2 = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
Seek = endcut,
AudioSampleRate = 44100
};
//Copies framerate and size from the previous video to the concatenation video
ConvertSettings settings3 = new ConvertSettings
{
VideoFrameRate = 25,
VideoFrameSize = FrameSize.hd480,
MaxDuration = 4,
AppendSilentAudioStream = true,
AudioSampleRate = 44100
};
string newblack = @"C:\Users\Alan\Desktop\newblack.mp4";
//Slice method called
fFMpeg.ConvertMedia(pathtofile, Format.mp4, output1, Format.mp4, settings);
fFMpeg.ConvertMedia(pathtofile, Format.mp4, output2, Format.mp4, settings2);
fFMpeg.ConvertMedia(toconcatfile, Format.mp4, newblack, Format.mp4, settings3);
String[] inputfiles = new String[2];
inputfiles[0] = output1;
inputfiles[1] = newblack;
//inputfiles[1] = output2;
ConcatSettings concatSettings = new ConcatSettings
{
//CustomOutputArgs = output1+" "+ toconcatfile+ " "+output2+ " -filter_complex \"[0:v:0][0:a:0][1:v:0][1:a:0][2:v:0][2:a:0]concat=n=3:v=1:a=1[outv][outa]\" -map \"[outv]\" - map \"[outa]\""
};
fFMpeg.ConcatMedia(inputfiles, finaloutput, Format.mp4, concatSettings);Can anyone help ?
Edit : I get the exception message - "Invalid argument (exit code : 1)",
Here is the output log of FFMPEG
FFMPEG LOG ITEM - ffmpeg version 3.2.2 Copyright (c) 2000-2016 the
FFmpeg developers
FFMPEG LOG ITEM - built with gcc 5.4.0 (GCC)
FFMPEG LOG ITEM - configuration: --enable-gpl --enable-version3 --enable-
dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --
enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
FFMPEG LOG ITEM - libavutil 55. 34.100 / 55. 34.100
FFMPEG LOG ITEM - libavcodec 57. 64.101 / 57. 64.101
FFMPEG LOG ITEM - libavformat 57. 56.100 / 57. 56.100
FFMPEG LOG ITEM - libavdevice 57. 1.100 / 57. 1.100
FFMPEG LOG ITEM - libavfilter 6. 65.100 / 6. 65.100
FFMPEG LOG ITEM - libswscale 4. 2.100 / 4. 2.100
FFMPEG LOG ITEM - libswresample 2. 3.100 / 2. 3.100
FFMPEG LOG ITEM - libpostproc 54. 1.100 / 54. 1.100
FFMPEG LOG ITEM - Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output1.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:00:30.02, start: 0.000000, bitrate: 543 kb/s
FFMPEG LOG ITEM - Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 407 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 129 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\newblack.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:00:04.02, start: 0.000000, bitrate: 19 kb/s
FFMPEG LOG ITEM - Stream #1:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 160:213 DAR 4:3], 7 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #1:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 2 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\Alan\Desktop\output2.mp4':
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - major_brand : isom
FFMPEG LOG ITEM - minor_version : 512
FFMPEG LOG ITEM - compatible_brands: isomiso2avc1mp41
FFMPEG LOG ITEM - encoder : Lavf57.56.100
FFMPEG LOG ITEM - Duration: 00:01:34.22, start: 0.000000, bitrate: 1058 kb/s
FFMPEG LOG ITEM - Stream #2:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 852x480 [SAR 3893:2872 DAR 276403:114880], 923 kb/s, SAR 12800:9443 DAR 320:133, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
FFMPEG LOG ITEM - Metadata:
Exception thrown: 'NReco.VideoConverter.FFMpegException' in NReco.VideoConverter.dll
FFMPEG LOG ITEM - handler_name : VideoHandler
FFMPEG LOG ITEM - Stream #2:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
FFMPEG LOG ITEM - Metadata:
FFMPEG LOG ITEM - handler_name : SoundHandler
FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Input link in1:v0 parameters (size 852x480, SAR 160:213) do not match the corresponding output link in0:v0 parameters (852x480, SAR 12800:9443)
FFMPEG LOG ITEM - [Parsed_concat_0 @ 04ded5e0] Failed to configure output pad on Parsed_concat_0
FFMPEG LOG ITEM - Error configuring complex filters.
FFMPEG LOG ITEM - Invalid argument -
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 !
-
FFMPEG ALSA xrun crash
13 décembre 2017, par Liam MartensI’m running a YouTube RTMP stream using FFMPEG with x11grab and an alsa loopback device but sometimes after let’s say 20 hours there is an ALSA xrun and then the ffmpeg command crashes, but I’m not sure why or how this happens. (mind you the ffmpeg command does not run continuously it gets restarted automatically every so often, but the xrun makes the command crash causing the stream to go offline sometimes because a crash restart is not fast enough)
I’m using
thread_queue_size
and I’ve even manually compiled ffmpeg with a higherALSA BUFFER SIZE
, but the issue appears to persist still. Besides this I’ve also scoured many posts with people having similar issues but these never really seem to end up resolved.This is the stream command
ffmpeg -loglevel verbose -f alsa -thread_queue_size 12288 -ac 2 -i hw:Loopback,1,0 \
-probesize 10M -f x11grab -field_order tt -thread_queue_size 12288 -video_size 1280x720 -r 30 -i :1.1 \
-c:v libx264 -c:a libmp3lame -shortest -tune fastdecode -tune zerolatency \
-crf 26 -pix_fmt yuv420p -threads 0 -maxrate 2500k -bufsize 2500k -pass 1 -af aresample=async=1 \
-movflags +faststart -flags +global_header -preset ultrafast -r 30 -g 60 -b:v 2000k -b:a 192k -ar 44100 \
-f flv -rtmp_live live rtmp://a.rtmp.youtube.com/live2/{KEY}Log excerpt
ffmpeg version N-89463-gc7a5e80 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
configuration: --prefix=/usr --enable-avresample --enable-avfilter --enable-gpl --enable-libmp3lame --enable-librtmp --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libtheora --enable-postproc --enable-pic --enable-pthreads --enable-shared --disable-stripping --disable-static --enable-vaapi --enable-libopus --enable-libfreetype --enable-libfontconfig --enable-libpulse --disable-debug
libavutil 56. 5.100 / 56. 5.100
libavcodec 58. 6.103 / 58. 6.103
libavformat 58. 3.100 / 58. 3.100
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 7.100 / 7. 7.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:Loopback,1,0':
Duration: N/A, start: 1513163617.594224, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, x11grab, from ':1.1':
Duration: N/A, start: 1513163617.632434, bitrate: N/A
Stream #1:0: Video: rawvideo, 1 reference frame (BGR[0] / 0x524742), bgr0(top first), 854x480, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Parsing...
Parsed protocol: 0
Parsed host : a.rtmp.youtube.com
Parsed app : live2
RTMP_Connect1, ... connected, handshaking
HandShake: Type Answer : 03
HandShake: Server Uptime : 0
HandShake: FMS Version : 4.0.0.1
HandShake: Handshaking finished....
RTMP_Connect1, handshaked
Invoking connect
HandleServerBW: server BW = 2500000
HandleClientBW: client BW = 10000000 2
HandleChangeChunkSize, received: chunk size change to 256
RTMP_ClientPacket, received: invoke 240 bytes
(object begin)
Property:
Property:
Property:
(object begin)
Property: 3,5,3,824>
Property:
Property:
(object end)
Property:
(object begin)
Property:
Property:
Property:
Property:
Property:
(object begin)
Property:
(object end)
(object end)
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <connect>
Invoking releaseStream
Invoking FCPublish
Invoking createStream
RTMP_ClientPacket, received: invoke 21 bytes
(object begin)
Property:
Property:
Property: NULL
(object end)
HandleInvoke, server invoking <onbwdone>
Invoking _checkbw
RTMP_ClientPacket, received: invoke 29 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object end)
HandleInvoke, server invoking <_result>
HandleInvoke, received result for method call <createstream>
Invoking publish
RTMP_ClientPacket, received: invoke 73 bytes
(object begin)
Property:
Property:
Property: NULL
Property:
(object begin)
Property:
Property:
(object end)
(object end)
HandleInvoke, server invoking <onstatus>
HandleInvoke, onStatus: NetStream.Publish.Start
Stream mapping:
Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[graph 0 input from stream 1:0 @ 0x5607d087e060] w:854 h:480 pixfmt:bgr0 tb:1/30 fr:30/1 sar:0/1 sws_param:flags=2
[auto_scaler_0 @ 0x5607d087d800] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x5607d087ed40] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_null_0' and the filter 'format'
[auto_scaler_0 @ 0x5607d087d800] w:854 h:480 fmt:bgr0 sar:0/1 -> w:854 h:480 fmt:yuv420p sar:0/1 flags:0x4
[swscaler @ 0x5607d0880260] Warning: data is not aligned! This can lead to a speed loss
[libx264 @ 0x5607d08684e0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x5607d08684e0] profile Constrained Baseline, level 3.1
[libx264 @ 0x5607d08684e0] 264 - core 148 r2748 97eaef2 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=2 lookahead_threads=2 sliced_threads=1 slices=2 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=60 keyint_min=6 scenecut=0 intra_refresh=0 rc_lookahead=0 rc=crf mbtree=0 crf=26.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=1500 vbv_bufsize=1500 crf_max=0.0 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
[graph_1_in_0_0 @ 0x5607d091c840] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[Parsed_aresample_0 @ 0x5607d0916b40] ch:2 chl:stereo fmt:s16 r:48000Hz -> ch:2 chl:stereo fmt:s16p r:44100Hz
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/{KEY}':
Metadata:
encoder : Lavf58.3.100
Stream #0:0: Video: h264 (libx264), 1 reference frame ([7][0][0][0] / 0x0007), yuv420p(top coded first (swapped)), 854x480, q=-1--1, 1000 kb/s, 30 fps, 1k tbn, 30 tbc
Metadata:
encoder : Lavc58.6.103 libx264
Side data:
cpb: bitrate max/min/avg: 1500000/0/1000000 buffer size: 1500000 vbv_delay: -1
Stream #0:1: Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100 Hz, stereo, s16p, delay 1105, 192 kb/s
Metadata:
encoder : Lavc58.6.103 libmp3lame
frame= 29 fps=0.0 q=17.0 size= 146kB time=00:00:00.94 bitrate=1267.3kbits/s speed=1.86x
frame= 44 fps= 44 q=18.0 size= 168kB time=00:00:01.46 bitrate= 942.4kbits/s speed=1.45x
frame= 60 fps= 40 q=16.0 size= 191kB time=00:00:01.96 bitrate= 794.8kbits/s speed= 1.3x
...
frame= 2740 fps= 30 q=17.0 size= 7993kB time=00:01:31.32 bitrate= 717.0kbits/s speed= 1x
frame= 2755 fps= 30 q=18.0 size= 8013kB time=00:01:31.82 bitrate= 714.9kbits/s speed= 1x
[alsa @ 0x5607d084d7e0] ALSA buffer xrun.
</onstatus></createstream></onbwdone></connect>