
Recherche avancée
Autres articles (11)
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs
12 avril 2011, parLa manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras. -
Qu’est ce qu’un éditorial
21 juin 2013, parEcrivez votre de point de vue dans un article. Celui-ci sera rangé dans une rubrique prévue à cet effet.
Un éditorial est un article de type texte uniquement. Il a pour objectif de ranger les points de vue dans une rubrique dédiée. Un seul éditorial est placé à la une en page d’accueil. Pour consulter les précédents, consultez la rubrique dédiée.
Vous pouvez personnaliser le formulaire de création d’un éditorial.
Formulaire de création d’un éditorial Dans le cas d’un document de type éditorial, les (...)
Sur d’autres sites (4352)
-
Node js async/await promise problem with ytdl and ffmpeg
31 août 2020, par WorkoutBuddyI built a simple youtube downloader cli. It looks like this (without any arg parsing for easier reproduction) :


const ytdl = require('ytdl-core');
const config = require('config');
const progressBar = require('./progressBar');
const logger = require('./logger');
const ffmpeg = require('fluent-ffmpeg');

const url = 'https://www.youtube.com/watch?v=Np8ibIagn3M';

const getInfo = async (url) => {
 logger.info(`Getting metadata for ${url}`);
 const response = await ytdl.getBasicInfo(url);
 const info = response.videoDetails.title;
 logger.info(`Title: ${info}`);
 return info;
};

const getStream = async (url) => {
 logger.info(`Downloading from ${url} ...`);

 let allReceived = false;
 return new Promise((resolve, reject) => {
 const stream = ytdl(url, {
 quality: 'highest',
 filter: (format) => format.container === 'mp4',
 })
 .on('progress', (_, totalDownloaded, total) => {
 if (!allReceived) {
 progressBar.start(total, 0, {
 mbTotal: (total / 1024 / 1024).toFixed(2),
 mbValue: 0,
 });
 allReceived = true;
 }
 progressBar.increment();
 progressBar.update(totalDownloaded, {
 mbValue: (totalDownloaded / 1024 / 1024).toFixed(2),
 });
 })
 .on('end', () => {
 progressBar.stop();
 logger.info('Successfully downloaded the stream!');
 });
 return resolve(stream);
 });
};

const convertToMp3 = async (stream, title) => {
 return new Promise((resolve, reject) => {
 ffmpeg({ source: stream })
 .output(`${config.get('audioDir')}/${title}.mp3`)
 .audioBitrate('192k')
 .run();
 return resolve();
 });
};

const main = async (url) => {
 const info = await getInfo(url);
 console.log('here 1');
 const stream = await getStream(url);
 console.log('here 2');
 await convertToMp3(stream, info);
 console.log('done');
};

main(url);



The output looks like :


➜ node youtube.js
info: Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info: Title: Tu boca - (Bachata Remix Dj Khalid)
here 1
info: Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
here 2
done
[Progress] [████████████████████████████████████████] 100% | Downloaded: 7.15/7.15 MB | Elapsed Time: 5s
info: Successfully downloaded the stream!



However, I would expect this output :


➜ node youtube.js
info: Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info: Title: Tu boca - (Bachata Remix Dj Khalid)
here 1
info: Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
[Progress] [████████████████████████████████████████] 100% | Downloaded: 7.15/7.15 MB | Elapsed Time: 5s
here 2
info: Successfully downloaded the stream!
done



I think I have troubles to understand async/await. As far as I understood, promisifying a function allows me wait for the result. However, it seems that it does not work. I do not know why and how to properly debug it.


EDITED :


const getStream = async (url) => {
 logger.info(`Downloading from ${url} ...`);

 let allReceived = false;
 return new Promise((resolve, reject) => {
 const stream = ytdl(url, {
 quality: 'highest',
 filter: (format) => format.container === 'mp4',
 })
 .on('progress', (_, totalDownloaded, total) => {
 console.log('totalDownloaded: ' + totalDownloaded);
 if (!allReceived) {
 console.log('total: ' + total);
 progressBar.start(total, 0, {
 mbTotal: (total / 1024 / 1024).toFixed(2),
 mbValue: 0,
 });
 allReceived = true;
 }
 progressBar.increment();
 progressBar.update(totalDownloaded, {
 mbValue: (totalDownloaded / 1024 / 1024).toFixed(2),
 });
 })
 .on('end', () => {
 progressBar.stop();
 logger.info('Successfully downloaded the stream!');
 resolve(stream);
 });
 });
};



But now it is like this :


➜ node youtube.js
info: Getting metadata for https://www.youtube.com/watch?v=Np8ibIagn3M
info: Title: Tu boca - (Bachata Remix Dj Khalid)
here 1
info: Downloading from https://www.youtube.com/watch?v=Np8ibIagn3M ...
[Progress] [██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 14% | Downloaded: 1.02/7.15 MB | Elapsed Time: 52s



Added console.log :


totalDownloaded: 16384
total: 7493903
[Progress] [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% | Downloaded: 0/7.15 MB | Elapsed Time: 0stotalDownloaded: 32768
totalDownloaded: 49152
totalDownloaded: 65536
totalDownloaded: 81920
totalDownloaded: 98304
totalDownloaded: 114688
totalDownloaded: 131072
totalDownloaded: 147456
totalDownloaded: 163840
totalDownloaded: 180224
totalDownloaded: 196608
totalDownloaded: 212992
totalDownloaded: 229376
totalDownloaded: 245760
totalDownloaded: 262144
totalDownloaded: 278528
totalDownloaded: 294912
totalDownloaded: 311296
totalDownloaded: 327680
totalDownloaded: 344064
totalDownloaded: 360448
totalDownloaded: 376832
totalDownloaded: 393216
totalDownloaded: 409600
totalDownloaded: 425984
totalDownloaded: 442368
totalDownloaded: 458752
totalDownloaded: 475136
totalDownloaded: 491520
totalDownloaded: 507904
totalDownloaded: 524288
totalDownloaded: 540672
totalDownloaded: 557056
totalDownloaded: 573440
totalDownloaded: 589824
totalDownloaded: 606208
totalDownloaded: 622592
totalDownloaded: 638976
totalDownloaded: 655360
totalDownloaded: 671744
totalDownloaded: 688128
totalDownloaded: 704512
totalDownloaded: 720896
totalDownloaded: 737280
totalDownloaded: 753664
totalDownloaded: 770048
totalDownloaded: 786432
totalDownloaded: 802816
totalDownloaded: 819200
totalDownloaded: 835584
totalDownloaded: 851968
totalDownloaded: 868352
totalDownloaded: 884736
totalDownloaded: 901120
totalDownloaded: 917504
totalDownloaded: 933888
totalDownloaded: 950272
totalDownloaded: 966656
totalDownloaded: 983040
totalDownloaded: 999424
totalDownloaded: 1015808
totalDownloaded: 1032192
totalDownloaded: 1048576
totalDownloaded: 1064960
[Progress] [██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 14% | Downloaded: 1.02/7.15 MB | Elapsed Time: 25s



-
Very slow writes on MySQL 8 - waiting for handler commit
23 mai 2023, par Akshat GoelI have MySQL 8 docker installation installed on an edge device which has the following two tables to write to


video_paths | CREATE TABLE `video_paths` (
 `entry` int(11) NOT NULL AUTO_INCREMENT,
 `timestamp` bigint(20) NOT NULL,
 `duration` int(11) NOT NULL,
 `path` varchar(255) NOT NULL,
 `motion` int(11) NOT NULL DEFAULT '0',
 `cam_id` varchar(255) NOT NULL DEFAULT '',
 `hd` tinyint(1) NOT NULL DEFAULT '0',
 PRIMARY KEY (`entry`),
 KEY `cam_id` (`cam_id`),
 KEY `timestamp` (`timestamp`)
) ENGINE=InnoDB AUTO_INCREMENT=7342309 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci



AND


CREATE TABLE `tracker` (
 `id` int(11) NOT NULL AUTO_INCREMENT,
 `table_name` varchar(255) NOT NULL,
 `primary_key_name` varchar(255) NOT NULL,
 `pointer` int(11) NOT NULL DEFAULT '0',
 PRIMARY KEY (`id`),
 UNIQUE KEY `table_name` (`table_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci



The following queries are run every few secs for up to 32 cameras and are taking a lot of time as indicated by the slow query log.


UPDATE tracker SET pointer = 7342046 WHERE table_name = 'video_paths'

INSERT INTO video_paths (timestamp,duration,path,cam_id,hd) VALUES (1597548365000,5000,'/s/ss/x-0/v/2020-08-16/3/1.ts','x-1',1)




Most of the time is spent in the
waiting for handler commit
state

The total size of my data (tables + index) is 1GB and I have the following settings enabled to optimise for write


skip-log-bin
- Disabled the bin log because I don't have a replica and therefore no use for it
innodb_flush_log_at_trx_commit =2
- I am Optimising for performance rather than consistency here.
range_optimizer_max_mem_size =0
As mention in this question, I have allowed max memory to range optimiser.
inndo_buffer_pool_size= 512Mb
- This should be enough for my data ?.

innodb_log_file_size= 96Mb
*2 files

I am seeing queries that are taking up to 90-100 secs sometimes.


SET timestamp=1597549337;
INSERT INTO video_paths (timestamp,duration,path,cam_id,hd) VALUES (1597548365000,5000,'/s/ss/x-0/v/2020-08-16/3/1.ts','x-1',1);
# Time: 2020-08-16T03:42:24.533408Z
# Query_time: 96.712976 Lock_time: 0.000033 Rows_sent: 0 Rows_examined: 0



---UPDATE---
Here's the complete my.cnf file


my.cnf

[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
secure-file-priv= NULL
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

skip-log-bin
innodb_buffer_pool_size=536870912
innodb_log_file_size=100663296

# Custom config should go here
!includedir /etc/mysql/conf.d/

conf.d/docker.cnf 
[mysqld]
skip-host-cache
skip-name-resolve 



The docker container is using the host mode so complete 15GB memory is available to the container.


--- UPDATE 2 ---
After increasing the
innodb_buffer_pool_size
to 2GB as suggested by @fyrye, the statements have now started getting stuck onSTATE = UPDATE
instead ofwaiting for handler commit
.

---- UPDATE 3 ---
Looks like the CPU is causing the bottleneck



** ---- UPDATE 4 ---- **
Additional info


- 

- Ram Size




total used free shared buff/cache available
Mem: 15909 1711 9385 2491 4813 11600
Swap: 0 0 0



- 

- No SSD/NVMe devices attached
SHOW GLOBAL STATUS
- https://pastebin.com/vtWi0PUqSHOW GLOBAL VARIABLES
- https://pastebin.com/MUZeG959SHOW FULL PROCESSLIST
- https://pastebin.com/eebEcYk7- htop -
htop
here is for the edge system which has 4 other containers running which include the main app, ffmpeg, mqtt, etc.
 ulimit -a
:














core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 62576
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 62576
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited



- 

opstat -xm 5 4




Linux 4.15.0-106-generic (xxxx) 08/18/2020 _x86_64_ (4 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
 26.97 0.00 22.36 22.53 0.00 28.14

Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
loop0 0.00 0.00 0.00 0.00 0.00 0.00 3.20 0.00 2.40 2.40 0.00 0.00 0.00
sda 13.78 9.89 32.24 11.44 0.37 4.10 209.51 47.52 1079.07 44.07 3994.87 22.39 97.81

avg-cpu: %user %nice %system %iowait %steal %idle
 19.71 0.00 27.85 40.87 0.00 11.57

Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
loop0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda 0.00 0.00 1.40 4.60 0.03 2.71 934.93 142.66 24221.33 666.29 31390.26 166.67 100.00

avg-cpu: %user %nice %system %iowait %steal %idle
 20.16 0.00 26.77 28.30 0.00 24.77

Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
loop0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda 0.00 0.00 8.80 5.60 0.03 3.45 496.11 141.28 12507.78 194.00 31858.00 69.44 100.00



- 

mpstat -P ALL 5 3




Linux 4.15.0-106-generic (sn-1f0ce8) 08/18/2020 _x86_64_ (4 CPU)

02:15:47 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
02:15:52 PM all 21.48 0.00 20.40 29.01 0.00 7.94 0.00 0.00 0.00 21.17
02:15:52 PM 0 24.95 0.00 20.86 5.32 0.00 0.61 0.00 0.00 0.00 48.26
02:15:52 PM 1 17.59 0.00 18.81 57.67 0.00 5.93 0.00 0.00 0.00 0.00
02:15:52 PM 2 21.28 0.00 17.36 0.21 0.00 24.79 0.00 0.00 0.00 36.36
02:15:52 PM 3 22.34 0.00 24.59 52.46 0.00 0.61 0.00 0.00 0.00 0.00

02:15:52 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
02:15:57 PM all 20.56 0.00 20.00 28.26 0.00 7.08 0.00 0.00 0.00 24.10
02:15:57 PM 0 24.44 0.00 18.89 12.32 0.00 0.21 0.00 0.00 0.00 44.15
02:15:57 PM 1 17.73 0.00 15.46 33.20 0.00 4.95 0.00 0.00 0.00 28.66
02:15:57 PM 2 18.93 0.00 22.22 12.35 0.00 22.84 0.00 0.00 0.00 23.66
02:15:57 PM 3 21.06 0.00 23.31 55.21 0.00 0.41 0.00 0.00 0.00 0.00

02:15:57 PM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
02:16:02 PM all 21.81 0.00 18.32 26.42 0.00 7.03 0.00 0.00 0.00 26.42
02:16:02 PM 0 26.43 0.00 19.67 0.20 0.00 0.41 0.00 0.00 0.00 53.28
02:16:02 PM 1 20.57 0.00 17.11 45.21 0.00 5.30 0.00 0.00 0.00 11.81
02:16:02 PM 2 19.67 0.00 16.74 0.21 0.00 21.97 0.00 0.00 0.00 41.42
02:16:02 PM 3 20.45 0.00 19.84 58.91 0.00 0.81 0.00 0.00 0.00 0.00

Average: CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
Average: all 21.28 0.00 19.57 27.90 0.00 7.35 0.00 0.00 0.00 23.90
Average: 0 25.27 0.00 19.81 5.94 0.00 0.41 0.00 0.00 0.00 48.57
Average: 1 18.63 0.00 17.13 45.39 0.00 5.39 0.00 0.00 0.00 13.45
Average: 2 19.96 0.00 18.78 4.28 0.00 23.20 0.00 0.00 0.00 33.77
Average: 3 21.28 0.00 22.57 55.54 0.00 0.61 0.00 0.00 0.00 0.00



-
ffmpeg issue when using it from kurento to rtmp stream
15 juillet 2020, par MaxiI successfully managed to connect ffmpeg with an RTP endpoint of my kurento server. On many tries before I got a "Connection timed out" due my docker configuration. In my docker logs I see following now after RTP endpoint creation and starting ffmpeg :


streamy-server_1 | 2020-07-15 08:30:20.397 INFO 49 --- [nio-8080-exec-1] net.bramp.ffmpeg.RunProcessFunction : ffmpeg -y -v error -protocol_whitelist file,http,https,tcp,tls,udp,rtp -rtbufsize 1500M -re -i /tmp/test.sdp -f flv -vcodec libx264 -pix_fmt yuv420p -s 640x480 -r 20/1 -b:v 1000000 -acodec libmp3lame -ar 44100 -b:a 1000000 -bufsize 4000k -maxrate 1000k -profile:v baseline -deinterlace -preset medium -g 60 -r 30 rtmps://live-api-s.facebook.com:443/rtmp/3163232097002611?xyz
streamy-server_1 | [h264 @ 0x56538aeae0a0] non-existing PPS 0 referenced
streamy-server_1 | Last message repeated 1 times
streamy-server_1 | [h264 @ 0x56538aeae0a0] decode_slice_header error
streamy-server_1 | [h264 @ 0x56538aeae0a0] no frame!
streamy-server_1 | [h264 @ 0x56538aeae0a0] non-existing PPS 0 referenced
streamy-server_1 | Last message repeated 1 times
streamy-server_1 | [h264 @ 0x56538aeae0a0] decode_slice_header error
streamy-server_1 | [h264 @ 0x56538aeae0a0] no frame!
streamy-server_1 | [h264 @ 0x56538aeae0a0] non-existing PPS 0 referenced
streamy-server_1 | Last message repeated 1 times
streamy-server_1 | [h264 @ 0x56538aeae0a0] decode_slice_header error
streamy-server_1 | [h264 @ 0x56538aeae0a0] no frame!
streamy-server_1 | [h264 @ 0x56538aeae0a0] non-existing PPS 0 referenced
streamy-server_1 | Last message repeated 1 times
streamy-server_1 | [h264 @ 0x56538aeae0a0] decode_slice_header error
streamy-server_1 | [h264 @ 0x56538aeae0a0] no frame!
streamy-server_1 | [h264 @ 0x56538aeae0a0] non-existing PPS 0 referenced
streamy-server_1 | Last message repeated 1 times
[...] (this is repeated for the next ~20-30 seconds, then continues with:)
kurento_1 | 0:03:00.152967182 1 0x7faa58093b30 INFO KurentoWebSocketTransport WebSocketTransport.cpp:296:keepAliveSessions: Keep alive 998a9271-615e-490c-acce-6bc22d9592f7
streamy-server_1 | Too many packets buffered for output stream 0:0.
streamy-server_1 | 2020-07-15 08:30:38.361 ERROR 49 --- [nio-8080-exec-1] c.maximummgt.streamy.WebsocketsHandler : Unknown error while websockets session
streamy-server_1 | 
streamy-server_1 | java.lang.RuntimeException: java.io.IOException: ffmpeg returned non-zero exit status. Check stdout.
streamy-server_1 | at net.bramp.ffmpeg.job.SinglePassFFmpegJob.run(SinglePassFFmpegJob.java:46) ~[ffmpeg-0.6.2.jar:0.6.2]



At facebook live it does not receive the video stream. In log I just see this message :


Facebook has not received video signal from the video source for some time. Check that the connectivity between the video source and Facebook is sufficient for the source resolution and bitrate. Check your video encoder logs for details. If problems persist, consider improving connection quality or reducing the bitrate of your video source.


On Kurento Java code I am doing following :


- 

-
Create an RTP endpoint


-
Connect it with the video source from the user


-
Create an SDP offer and save it to a file (currently /tmp/test.sdp)


-
Process SDP offer with the RTP endpoint


-
Start the ffmpeg process with (
net.bramp.ffmpeg.builder.FFmpegBuilder
) :

FFmpegBuilder builder = new FFmpegBuilder()
.addExtraArgs("-protocol_whitelist", "file,http,https,tcp,tls,udp,rtp")
.addExtraArgs("-rtbufsize", "1500M")
.addExtraArgs("-re")
.setInput("/tmp/test.sdp")
.addOutput(rtmpURL)
.setFormat("flv")
.addExtraArgs("-bufsize", "4000k")
.addExtraArgs("-maxrate", "1000k")
.setAudioCodec("libmp3lame")
.setAudioSampleRate(FFmpeg.AUDIO_SAMPLE_44100)
.setAudioBitRate(1_000_000)
.addExtraArgs("-profile:v", "baseline")
.setVideoCodec("libx264")
.setVideoPixelFormat("yuv420p")
.setVideoResolution(width, height)
.setVideoBitRate(1_000_000)
.setVideoFrameRate(20)
.addExtraArgs("-deinterlace")
.addExtraArgs("-preset", "medium")
.addExtraArgs("-g", "60")
.addExtraArgs("-r", "30")
.done();

FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);
executor.createJob(builder).run();
















Can somebody guide here on this issue ? Thanks in advance


EDIT 01 : I disabled now


// FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);
// executor.createJob(builder).run();



so that ffmpeg does not start automatically. After java created the test.sdp, I ran ffmpeg by myself in the console not to stream to facebook but to a mp4 :


ffmpeg -loglevel debug -protocol_whitelist file,crypto,udp,rtp -re -vcodec libvpx -acodec opus -i /tmp/test.sdp -vcodec libx264 -acodec aac -y output.mp4


The output looks as following - I interrupted it after 25s with CTRL + C


root@app:/var/www# ffmpeg -loglevel debug -protocol_whitelist file,crypto,udp,rtp -re -vcodec libvpx -acodec opus -i /tmp/test.sdp -vcodec libx264 -acodec aac -y output.mp4
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
 built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
 configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
 libavutil 55. 78.100 / 55. 78.100
 libavcodec 57.107.100 / 57.107.100
 libavformat 57. 83.100 / 57. 83.100
 libavdevice 57. 10.100 / 57. 10.100
 libavfilter 6.107.100 / 6.107.100
 libavresample 3. 7. 0 / 3. 7. 0
 libswscale 4. 8.100 / 4. 8.100
 libswresample 2. 9.100 / 2. 9.100
 libpostproc 54. 7.100 / 54. 7.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file,crypto,udp,rtp'.
Reading option '-re' ... matched as option 're' (read input at native frame rate) with argument '1'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libvpx'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'opus'.
Reading option '-i' ... matched as input url with argument '/tmp/test.sdp'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'libx264'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'aac'.
Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.
Reading option 'output.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Applying option y (overwrite output files) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url /tmp/test.sdp.
Applying option re (read input at native frame rate) with argument 1.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libvpx.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument opus.
Successfully parsed a group of options.
Opening an input file: /tmp/test.sdp.
[NULL @ 0x55c2344e6a00] Opening '/tmp/test.sdp' for reading
[sdp @ 0x55c2344e6a00] Format sdp probed with size=2048 and score=50
[sdp @ 0x55c2344e6a00] audio codec set to: pcm_mulaw
[sdp @ 0x55c2344e6a00] audio samplerate set to: 44000
[sdp @ 0x55c2344e6a00] audio channels set to: 1
[sdp @ 0x55c2344e6a00] video codec set to: h264
[sdp @ 0x55c2344e6a00] RTP Packetization Mode: 1
[udp @ 0x55c2344e90c0] end receive buffer size reported is 131072
[udp @ 0x55c2344e9320] end receive buffer size reported is 131072
[sdp @ 0x55c2344e6a00] setting jitter buffer size to 500
[udp @ 0x55c2344ea0a0] end receive buffer size reported is 131072
[udp @ 0x55c2344ea180] end receive buffer size reported is 131072
[sdp @ 0x55c2344e6a00] setting jitter buffer size to 500
[sdp @ 0x55c2344e6a00] Before avformat_find_stream_info() pos: 305 bytes read:305 seeks:0 nb_streams:2
[libvpx @ 0x55c2344eeb80] v1.7.0
[libvpx @ 0x55c2344eeb80] --prefix=/usr --enable-pic --enable-shared --disable-install-bins --disable-install-srcs --size-limit=16384x16384 --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --target=x86_64-linux-gcc
[libvpx @ 0x55c2344eeb80] Invalid sync code e06101.
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
[libvpx @ 0x55c2344eeb80] Invalid sync code e06101.
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
 Last message repeated 1 times
[libvpx @ 0x55c2344eeb80] Invalid sync code e06101.
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
[sdp @ 0x55c2344e6a00] Non-increasing DTS in stream 1: packet 3 with DTS 5940, packet 4 with DTS 5940
[...]
[sdp @ 0x55c2344e6a00] Non-increasing DTS in stream 1: packet 956 with DTS 2027726, packet 957 with DTS 2027726
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
[libvpx @ 0x55c2344eeb80] Invalid sync code e06101.
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
[libvpx @ 0x55c2344eeb80] Invalid sync code e06101.
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
[libvpx @ 0x55c2344eeb80] Invalid sync code e06101.
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
[libvpx @ 0x55c2344eeb80] Invalid sync code 4a3bd8.
[sdp @ 0x55c2344e6a00] Non-increasing DTS in stream 1: packet 960 with DTS 2036690, packet 961 with DTS 2036690
[libvpx @ 0x55c2344eeb80] Failed to decode frame: Bitstream not supported by this decoder
[sdp @ 0x55c2344e6a00] interrupted
[sdp @ 0x55c2344e6a00] decoding for stream 1 failed
[sdp @ 0x55c2344e6a00] rfps: 30.000000 0.000926
[sdp @ 0x55c2344e6a00] rfps: 60.000000 0.003706
[sdp @ 0x55c2344e6a00] rfps: 120.000000 0.014824
[sdp @ 0x55c2344e6a00] Setting avg frame rate based on r frame rate
[sdp @ 0x55c2344e6a00] Could not find codec parameters for stream 1 (Video: vp8 (libvpx), 1 reference frame, none(progressive)): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[sdp @ 0x55c2344e6a00] After avformat_find_stream_info() pos: 305 bytes read:305 seeks:0 frames:962
Input #0, sdp, from '/tmp/test.sdp':
 Metadata:
 title : KMS
 Duration: N/A, start: 0.033000, bitrate: N/A
 Stream #0:0, 0, 1/44000: Audio: opus, 48000 Hz, mono, fltp
 Stream #0:1, 962, 1/90000: Video: vp8, 1 reference frame, none(progressive), 30 fps, 30 tbr, 90k tbn, 90k tbc
Successfully opened the file.
Parsing a group of options: output url output.mp4.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument libx264.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument aac.
Successfully parsed a group of options.
Opening an output file: output.mp4.
[file @ 0x55c234563320] Setting default whitelist 'file,crypto'
Successfully opened the file.
[libvpx @ 0x55c2344eb0e0] v1.7.0
[libvpx @ 0x55c2344eb0e0] --prefix=/usr --enable-pic --enable-shared --disable-install-bins --disable-install-srcs --size-limit=16384x16384 --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --target=x86_64-linux-gcc
Stream mapping:
 Stream #0:1 -> #0:0 (vp8 (libvpx) -> h264 (libx264))
 Stream #0:0 -> #0:1 (opus (native) -> aac (native))
Press [q] to stop, [?] for help
Finishing stream 0:0 without any data written to it.
Finishing stream 0:1 without any data written to it.
detected 2 logical cores
[graph_1_in_0_0 @ 0x55c234561360] Setting 'time_base' to value '1/48000'
[graph_1_in_0_0 @ 0x55c234561360] Setting 'sample_rate' to value '48000'
[graph_1_in_0_0 @ 0x55c234561360] Setting 'sample_fmt' to value 'fltp'
[graph_1_in_0_0 @ 0x55c234561360] Setting 'channel_layout' to value '0x4'
[graph_1_in_0_0 @ 0x55c234561360] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x4
[format_out_0_1 @ 0x55c2345611e0] Setting 'sample_fmts' to value 'fltp'
[format_out_0_1 @ 0x55c2345611e0] Setting 'sample_rates' to value '96000|88200|64000|48000|44100|32000|24000|22050|16000|12000|11025|8000|7350'
[AVFilterGraph @ 0x55c234560620] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
Nothing was written into output file 0 (output.mp4), because at least one of its streams received no packets.
frame= 0 fps=0.0 q=0.0 Lsize= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (/tmp/test.sdp):
 Input stream #0:0 (audio): 0 packets read (0 bytes); 0 frames decoded (0 samples);
 Input stream #0:1 (video): 0 packets read (0 bytes); 0 frames decoded;
 Total: 0 packets (0 bytes) demuxed
Output file #0 (output.mp4):
 Output stream #0:0 (video): 0 frames encoded; 0 packets muxed (0 bytes);
 Output stream #0:1 (audio): 0 frames encoded (0 samples); 0 packets muxed (0 bytes);
 Total: 0 packets (0 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x55c234563420] Statistics: 0 seeks, 0 writeouts
[aac @ 0x55c23458bea0] Qavg: -nan
[AVIOContext @ 0x55c2344ef6e0] Statistics: 305 bytes read, 0 seeks
Exiting normally, received signal 2.
root@app:/var/www# ls -lt
total 72
-rw-r--r-- 1 root root 0 Jul 15 09:12 output.mp4



-