--------------------------------------------------------------------------------------------------------------- INITIALIZING VIDBOT, v1.6.0... --------------------------------------------------------------------------------------------------------------- [01:45:10.581] Vidbot :: start() [01:45:10.581] Vidbot :: _next(), _stepIndex:0 of 4 [01:45:10.582] index :: _onStepStarted_vidbot(), step: 1 [01:45:10.583] Vidbot :: step[0], label:Initializing Core [01:45:10.591] index :: _onStepProgress_vidbot(), percent: 20 [01:45:10.592] Vidbot :: _parse() [01:45:10.593] index :: _onStepProgress_vidbot(), percent: 40 [01:45:10.593] Vidbot :: _validate() [01:45:10.594] index :: _onStepProgress_vidbot(), percent: 60 [01:45:10.594] Vidbot :: _fonts() [01:45:10.594] FabricFontManager :: add(), id: SourceSansPro-Bold [01:45:10.595] src: /var/app/Vidbot-V2/assets/fonts/SourceSansPro/SourceSansPro-Bold.ttf [01:45:10.604] FabricFontManager :: add(), id: SourceSansPro-Light [01:45:10.604] src: /var/app/Vidbot-V2/assets/fonts/SourceSansPro/SourceSansPro-Light.ttf [01:45:10.605] FabricFontManager :: add(), id: DINOT-Bold [01:45:10.605] src: /var/app/Vidbot-V2/assets/fonts/DINOT/DINOT-Bold.otf [01:45:10.606] FabricFontManager :: add(), id: DINOT-Light [01:45:10.606] src: /var/app/Vidbot-V2/assets/fonts/DINOT/DINOT-Light.otf [01:45:10.607] FabricFontManager :: add(), id: TradeGothicLTStd-Regular [01:45:10.607] src: /var/app/Vidbot-V2/assets/fonts/TradeGothicCond/TradeGothicLTStd-Regular.otf [01:45:10.608] FabricFontManager :: add(), id: TradeGothicLTStd-Bold [01:45:10.608] src: /var/app/Vidbot-V2/assets/fonts/TradeGothicCond/TradeGothicLTStd-Bold.otf [01:45:10.609] index :: _onStepProgress_vidbot(), percent: 80 [01:45:10.609] Vidbot :: _clips() [01:45:10.610] StreamManager :: add(), id:audio_vo, type:audio [01:45:10.610] AudioClip[audio_vo] :: constructor() [01:45:10.610] InputStream[audio_vo] :: constructor() [01:45:10.610] Vidbot :: StreamMgr.on( 'ADDED' ), data: { streamID: 'audio_vo', clipId: null } [01:45:10.614] StreamManager :: add(), id:bg_music, type:audio [01:45:10.614] AudioClip[bg_music] :: constructor() [01:45:10.614] InputStream[bg_music] :: constructor() [01:45:10.614] Vidbot :: StreamMgr.on( 'ADDED' ), data: { streamID: 'bg_music', clipId: null } [01:45:10.614] StreamManager :: add(), id:simplefadedisplay, type:canvas [01:45:10.615] CanvasStream[canvas_1028049538062] :: constructor() [01:45:10.615] InputStream[canvas_1028049538062] :: constructor() [01:45:10.699] KenBurnsSlideshow[simplefadedisplay] :: constructor() [01:45:10.699] Overlay[simplefadedisplay] :: constructor() [01:45:10.699] CanvasClip[simplefadedisplay] :: constructor() [01:45:10.700] Clip[simplefadedisplay] :: constructor() [01:45:10.700] clip:"simplefadedisplay" added to stream:"canvas_1028049538062" [01:45:10.700] Vidbot :: StreamMgr.on( 'ADDED' ), data: { streamID: 'canvas_1028049538062', clipId: 'simplefadedisplay' } [01:45:10.700] StreamManager :: add(), id:caption, type:canvas [01:45:10.700] RenCaption[caption] :: constructor() [01:45:10.700] Ren[caption] :: constructor() [01:45:10.701] Overlay[caption] :: constructor() [01:45:10.701] CanvasClip[caption] :: constructor() [01:45:10.701] Clip[caption] :: constructor() [01:45:10.701] clip:"caption" added to stream:"canvas_1028049538062" [01:45:10.701] Vidbot :: StreamMgr.on( 'ADDED' ), data: { streamID: 'canvas_1028049538062', clipId: 'caption' } [01:45:10.701] all added... [01:45:10.701] Vidbot :: _next(), _stepIndex:1 of 4 [01:45:10.701] index :: _onStepCompleted_vidbot(), step: 1 [01:45:10.702] index :: _onStepStarted_vidbot(), step: 2 [01:45:10.702] Vidbot :: step[1], label:Initializing Input Streams [01:45:10.702] StreamManager :: init() [01:45:10.703] Vidbot :: StreamMgr.on( 'STREAM_INITED' ), data: { streamID: 'audio_vo', progress: 0.3333333333333333 } [01:45:10.703] index :: _onStepProgress_vidbot(), percent: 33 [01:45:10.703] Vidbot :: StreamMgr.on( 'STREAM_INITED' ), data: { streamID: 'bg_music', progress: 0.6666666666666666 } [01:45:10.703] index :: _onStepProgress_vidbot(), percent: 67 [01:45:10.704] CanvasStream[canvas_1028049538062] :: _init(), BEGIN [01:45:10.704] i:0, c.id:simplefadedisplay [01:45:10.704] KenBurnsSlideshow[simplefadedisplay] :: _init(), BEGIN [01:45:10.704] KenBurnsSlideshow[simplefadedisplay] :: _validate() [01:45:10.705] KenBurnsSlideshow[undefined] :: _validateAnim() [01:45:10.705] KenBurnsSlideshow[undefined] :: _validateTheme() [01:45:10.707] i:1, c.id:caption [01:45:10.707] RenCaption[caption] :: _init() [01:45:10.707] RenCaption[caption] :: _validate() [01:45:10.708] KenBurnsSlideshow[simplefadedisplay] :: _build() [01:45:10.714] AnimatedImageFrame[aif] :: constructor() [01:45:10.715] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.716] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_1.jpg [01:45:10.728] RenCaption[caption] :: _build() [01:45:10.746] Overlay[caption] :: _animate() [01:45:10.749] CanvasStream[caption] :: _init(), p.then() [01:45:10.772] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.775] AnimatedImageFrame[aif] :: _init(), END [01:45:10.777] AnimatedImageFrame[aif] :: constructor() [01:45:10.777] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.777] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_2.jpg [01:45:10.795] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.797] AnimatedImageFrame[aif] :: _init(), END [01:45:10.798] AnimatedImageFrame[aif] :: constructor() [01:45:10.798] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.798] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_3.jpg [01:45:10.817] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.818] AnimatedImageFrame[aif] :: _init(), END [01:45:10.819] AnimatedImageFrame[aif] :: constructor() [01:45:10.819] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.819] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_4.jpg [01:45:10.839] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.840] AnimatedImageFrame[aif] :: _init(), END [01:45:10.840] AnimatedImageFrame[aif] :: constructor() [01:45:10.840] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.840] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_5.jpg [01:45:10.859] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.860] AnimatedImageFrame[aif] :: _init(), END [01:45:10.861] AnimatedImageFrame[aif] :: constructor() [01:45:10.861] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.861] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_6.jpg [01:45:10.880] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.881] AnimatedImageFrame[aif] :: _init(), END [01:45:10.882] AnimatedImageFrame[aif] :: constructor() [01:45:10.882] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.882] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_7.jpg [01:45:10.899] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.900] AnimatedImageFrame[aif] :: _init(), END [01:45:10.901] AnimatedImageFrame[aif] :: constructor() [01:45:10.901] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.901] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_8.jpg [01:45:10.919] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.920] AnimatedImageFrame[aif] :: _init(), END [01:45:10.920] AnimatedImageFrame[aif] :: constructor() [01:45:10.920] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.920] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_9.jpg [01:45:10.939] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.940] AnimatedImageFrame[aif] :: _init(), END [01:45:10.940] AnimatedImageFrame[aif] :: constructor() [01:45:10.940] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.940] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_10.jpg [01:45:10.959] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.960] AnimatedImageFrame[aif] :: _init(), END [01:45:10.960] AnimatedImageFrame[aif] :: constructor() [01:45:10.961] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.961] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_11.jpg [01:45:10.985] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:10.986] AnimatedImageFrame[aif] :: _init(), END [01:45:10.986] AnimatedImageFrame[aif] :: constructor() [01:45:10.987] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:10.987] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_12.jpg [01:45:11.006] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.007] AnimatedImageFrame[aif] :: _init(), END [01:45:11.007] AnimatedImageFrame[aif] :: constructor() [01:45:11.007] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.007] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_13.jpg [01:45:11.024] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.025] AnimatedImageFrame[aif] :: _init(), END [01:45:11.026] AnimatedImageFrame[aif] :: constructor() [01:45:11.026] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.026] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_14.jpg [01:45:11.046] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.047] AnimatedImageFrame[aif] :: _init(), END [01:45:11.047] AnimatedImageFrame[aif] :: constructor() [01:45:11.048] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.048] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_15.jpg [01:45:11.067] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.068] AnimatedImageFrame[aif] :: _init(), END [01:45:11.068] AnimatedImageFrame[aif] :: constructor() [01:45:11.068] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.068] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_16.jpg [01:45:11.089] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.090] AnimatedImageFrame[aif] :: _init(), END [01:45:11.091] AnimatedImageFrame[aif] :: constructor() [01:45:11.091] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.091] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_17.jpg [01:45:11.109] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.110] AnimatedImageFrame[aif] :: _init(), END [01:45:11.111] AnimatedImageFrame[aif] :: constructor() [01:45:11.111] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.111] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_18.jpg [01:45:11.128] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.129] AnimatedImageFrame[aif] :: _init(), END [01:45:11.130] AnimatedImageFrame[aif] :: constructor() [01:45:11.130] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.130] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_19.jpg [01:45:11.152] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.153] AnimatedImageFrame[aif] :: _init(), END [01:45:11.154] AnimatedImageFrame[aif] :: constructor() [01:45:11.154] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.154] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_20.jpg [01:45:11.170] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.171] AnimatedImageFrame[aif] :: _init(), END [01:45:11.171] AnimatedImageFrame[aif] :: constructor() [01:45:11.172] AnimatedImageFrame[aif] :: _init(), BEGIN [01:45:11.172] CanvasClip :: LoadImageWithPromise(), src: 419D22F2-5A18-CCC3-9CA4-56566426ACDB_1.jpg [01:45:11.189] CanvasClip :: LoadImageWithPromise(), loaded, isError: false [01:45:11.190] AnimatedImageFrame[aif] :: _init(), END [01:45:11.190] Overlay[simplefadedisplay] :: _animate() [01:45:11.191] KenBurnsSlideshow[simplefadedisplay] :: _init(), END [01:45:11.191] CanvasStream[simplefadedisplay] :: _init(), p.then() [01:45:11.191] CanvasStream[canvas_1028049538062] :: _init(), promise.all.then() [01:45:11.193] CanvasStream[canvas_1028049538062] :: _init(), END [01:45:11.193] StreamMangaer :: init(), stream[canvas_1028049538062].then() [01:45:11.194] Vidbot :: StreamMgr.on( 'STREAM_INITED' ), data: { streamID: 'canvas_1028049538062', progress: 1 } [01:45:11.194] index :: _onStepProgress_vidbot(), percent: 100 [01:45:11.194] StreamManager :: init(), promise.all.then... [01:45:11.194] Vidbot :: StreamMgr.on( 'INITED' ) [01:45:11.194] Vidbot :: _next(), _stepIndex:2 of 4 [01:45:11.194] index :: _onStepCompleted_vidbot(), step: 2 [01:45:11.194] index :: _onStepStarted_vidbot(), step: 3 [01:45:11.195] Vidbot :: step[2], label:Rendering Canvas Streams [01:45:11.195] Vidbot :: StreamMgr.on( 'RENDER_STARTED' ), data: undefined [01:45:11.195] StreamManager :: render() [01:45:11.196] CanvasStream[canvas_1028049538062] :: render() [01:45:11.232] index :: _onStepProgress_vidbot(), percent: 0 [01:45:26.467] index :: _onStepProgress_vidbot(), percent: 5 [01:45:43.604] index :: _onStepProgress_vidbot(), percent: 10 [01:46:00.924] index :: _onStepProgress_vidbot(), percent: 15 [01:46:19.442] index :: _onStepProgress_vidbot(), percent: 20 [01:46:38.924] index :: _onStepProgress_vidbot(), percent: 25 [01:46:58.693] index :: _onStepProgress_vidbot(), percent: 30 [01:47:14.962] index :: _onStepProgress_vidbot(), percent: 35 [01:47:31.236] index :: _onStepProgress_vidbot(), percent: 40 [01:47:47.340] index :: _onStepProgress_vidbot(), percent: 45 [01:48:04.448] index :: _onStepProgress_vidbot(), percent: 50 [01:48:20.997] index :: _onStepProgress_vidbot(), percent: 55 [01:48:36.168] index :: _onStepProgress_vidbot(), percent: 60 [01:48:51.381] index :: _onStepProgress_vidbot(), percent: 65 [01:49:08.522] index :: _onStepProgress_vidbot(), percent: 70 [01:49:25.294] index :: _onStepProgress_vidbot(), percent: 75 [01:49:41.112] index :: _onStepProgress_vidbot(), percent: 80 [01:49:57.168] index :: _onStepProgress_vidbot(), percent: 85 [01:50:13.520] index :: _onStepProgress_vidbot(), percent: 90 [01:50:30.358] index :: _onStepProgress_vidbot(), percent: 95 [01:50:47.963] index :: _onStepProgress_vidbot(), percent: 100 [01:50:49.928] StreamManager :: render(), Promise.all.then... [01:50:49.928] Vidbot :: StreamMgr.on( 'RENDER_COMPLETED' ), data: undefined [01:50:49.929] Vidbot :: _next(), _stepIndex:3 of 4 [01:50:49.929] index :: _onStepCompleted_vidbot(), step: 3 [01:50:49.929] index :: _onStepStarted_vidbot(), step: 4 [01:50:49.930] Vidbot :: step[3], label:Encoding Media [01:50:49.933] CanvasFilters :: Overlay() [01:50:49.933] AudioStream[audio_vo] :: inputOptions() [01:50:49.934] AudioFilters :: Volume() [01:50:49.934] filter: [2:a]volume=1[2_vol] [01:50:49.934] AudioFilters :: Delay() [01:50:49.934] filter: [2_vol]adelay=0|0[2_del] [01:50:49.934] AudioStream[bg_music] :: inputOptions() [01:50:49.934] AudioFilters :: Volume() [01:50:49.934] filter: [3:a]volume=0.25[3_vol] [01:50:49.934] AudioFilters :: FadeOut() [01:50:49.935] filter: [3_vol]afade=t=out:st=62.24:d=1[3_fadeout] [01:50:49.935] AudioFilters :: Delay() [01:50:49.935] filter: [3_fadeout]adelay=0|0[3_del] [01:50:49.935] AudioFilters :: Mix() [01:50:49.935] filter: [2_del][3_del]amix=inputs=2:duration=longest[a_out] [01:50:49.935] mixed filter: [2_del][3_del]amix=inputs=2:duration=longest[a_out] [01:50:49.938] hang.time: 60 [01:50:50.047] Vidbot :: ffmpeg.on( 'start' ) [01:50:50.047] ffmpeg -f lavfi -i color=c=000000:s=640x360:r=30:duration=62.24 -r 30 -i ./tmp/canvas_1028049538062_%05d.png -to 00:01:02.240 -i file:///var/www/html/ [01:50:50.048] clients/16181/audio/419D22F2-5A18-CCC3-9CA4-56566426ACDB.mp3 -to 00:01:02.240 -i file:///var/app/video_pre_processor/assets/vidbot/_files/audio/Concep [01:50:50.048] t4.mp3 -y -filter_complex [0:v][1:v]overlay=x=0:y=0[1_out];[2:a]volume=1[2_vol];[2_vol]adelay=0|0[2_del];[3:a]volume=0.25[3_vol];[3_vol]afade=t=out:st [01:50:50.048] =62.24:d=1[3_fadeout];[3_fadeout]adelay=0|0[3_del];[2_del][3_del]amix=inputs=2:duration=longest[a_out] -acodec aac -vcodec libx264 -r 30 -f mp4 -map [ [01:50:50.048] a_out] -map [1_out] -preset veryfast -crf 18 -movflags frag_keyframe+empty_moov -pix_fmt yuv420p /var/www/html/clients/16181/video/419D22F2-5A18-CCC3- [01:50:50.048] 9CA4-56566426ACDB.mp4 [01:50:50.193] index :: _onStepProgress_vidbot(), percent: -3337481454 [01:50:50.629] index :: _onStepProgress_vidbot(), percent: 1 [01:50:51.642] index :: _onStepProgress_vidbot(), percent: 8 [01:50:52.141] index :: _onStepProgress_vidbot(), percent: 11 [01:50:53.155] index :: _onStepProgress_vidbot(), percent: 17 [01:50:53.665] index :: _onStepProgress_vidbot(), percent: 20 [01:50:54.680] index :: _onStepProgress_vidbot(), percent: 27 [01:50:55.699] index :: _onStepProgress_vidbot(), percent: 32 [01:50:56.202] index :: _onStepProgress_vidbot(), percent: 35 [01:50:57.214] index :: _onStepProgress_vidbot(), percent: 41 [01:50:58.227] index :: _onStepProgress_vidbot(), percent: 46 [01:50:59.229] index :: _onStepProgress_vidbot(), percent: 52 [01:51:00.251] index :: _onStepProgress_vidbot(), percent: 57 [01:51:00.752] index :: _onStepProgress_vidbot(), percent: 61 [01:51:01.756] index :: _onStepProgress_vidbot(), percent: 67 [01:51:02.764] index :: _onStepProgress_vidbot(), percent: 72 [01:51:03.265] index :: _onStepProgress_vidbot(), percent: 75 [01:51:04.274] index :: _onStepProgress_vidbot(), percent: 81 [01:51:05.283] index :: _onStepProgress_vidbot(), percent: 87 [01:51:05.782] index :: _onStepProgress_vidbot(), percent: 90 [01:51:06.792] index :: _onStepProgress_vidbot(), percent: 95 [01:51:07.655] index :: _onStepProgress_vidbot(), percent: 100 [01:51:07.691] Vidbot :: ffmpeg.on( 'end' ), Done! [01:51:07.691] StreamManager :: dispose() [01:51:07.692] CanvasStream[canvas_1028049538062] :: dispose() [01:51:07.697] Vidbot :: fflog.on( 'finish' ) [01:51:07.697] fflog.path: /var/www/html/clients/16181/video/419D22F2-5A18-CCC3-9CA4-56566426ACDB.mp4.fflog [01:51:07.697] Vidbot :: _next(), _stepIndex:4 of 4 [01:51:07.697] index :: _onStepCompleted_vidbot(), step: 4 [01:51:07.698] index :: _onComplete_vidbot(), data: { stepTime: 0, appTime: 357.137, output: '/var/www/html/clients/16181/video/419D22F2-5A18-CCC3-9CA4-56566426ACDB.mp4', duration: 62.24 } --------------------------------------------------------------------------------------------------------------- Output File : /var/app/video_pre_processor/jobs/postp//var/www/html/clients/16181/video/419D22F2-5A18-CCC3-9CA4-56566426ACDB.mp4 Media Duration : 00:01:02.240 Generation Time : 00:05:57.137 ---------------------------------------------------------------------------------------------------------------