Recherche avancée

Médias (91)

Autres articles (34)

  • Déploiements possibles

    31 janvier 2010, par

    Deux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
    L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
    Version mono serveur
    La version mono serveur consiste à n’utiliser qu’une (...)

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

Sur d’autres sites (8474)

  • Introducing Updates to the Funnels Feature

    29 mai 2024, par Erin

    We’ve made improvements to the Funnels feature to be more user-friendly and offer you greater flexibility. 

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
           if ('function' === typeof window.playMatomoVideo){<br />
           window.playMatomoVideo(&quot;FunnelsProductUpdate2024&quot;, &quot;#FunnelsProductUpdate2024&quot;)<br />
           } else {<br />
           document.addEventListener(&quot;DOMContentLoaded&quot;, function() { window.playMatomoVideo(&quot;FunnelsProductUpdate2024&quot;, &quot;#FunnelsProductUpdate2024&quot;); });<br />
           }<br />
      &lt;/script&gt;

    Here’s what’s changing :

    Setting up and managing funnels is now easier than ever 

    Previously, creating funnels was tedious and required going through the Goals feature. But we’ve changed that with the introduction of a separate page to configure funnels. 

    Dedicated Manage Funnels page in Matomo

    Create funnels with greater flexibility—no longer tied to goals 

    Funnels is now a standalone feature, providing you with more flexibility. Before, you could only create a funnel if it was tied to a goal, in other words, the final step in the funnel had to be a goal. What’s more, you also couldn’t use goals for steps in the funnel.  

    Previous configuration requirements of Funnels in Matomo
    Previous configuration requirements of Funnels

    Now, funnels are independent of goals, and goals can serve as steps within the funnel. This means you have the freedom to configure any combination of steps in a funnel : 

    • All steps can be goals 
    • No steps need to be goals 
    • Or some steps can be goals, some steps can be events 
    Goals no longer required in Matomo Funnels

    No matter what your customer journey looks like, funnels now offer the versatility to meet your business’s specific needs. 

    Find friction points faster with intuitive visuals 

    One of the most significant improvements is the visual upgrade of the Funnels feature. The new Funnels graph is now visually in line with industry standards and intuitive. 

    New Funnel Analytics chart in Matomo

    The new visual provides a clearer view of your drop-off and conversion rates so you can instantly find points of friction in your funnel to improve the user experience and overall conversion rate.  

    This visualisation also provides a detailed overview of the number of visitors who enter, exit, skip, or proceed at each step of your funnel by using different coloured bars for visual clarity on each step’s performance. 

    With this update, we’ve also replaced ‘backfilled visits’ with ‘skipped steps’ to avoid misinterpretation of the data. 

    New data table for more granular insights 

    Accompanying this visual improvement is a new data table, allowing for more granular insights, segment comparison, and easy data export.

    We’ve also increased Funnel analysis limits. You can now compare funnel data for 2 date periods and 6 segments (up to 12 compared datasets in total). 

    Sign up for our newsletter to receive all the latest Matomo updates. 

  • FFMPEG is not working in app service post deployment

    1er mars 2024, par Tushar Gupta

    I using the Xabe.FFmpeg package to generate clips from a video. The code is basically converting a video to multiple clips and it's working fine in my local but whenever I am uploading the code to app service the code is not working.

    &#xA;

    Stack : .net&#xA;App Service OS : Windows

    &#xA;

    Error :

    &#xA;

    2024-02-13 08:57:34.092 +00:00 [Error] Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer : Connection ID "16573246629528734243", Request ID "40000a24-0000-e600-b63f-84710c7967bb" : An unhandled exception was thrown by the application.System.ComponentModel.Win32Exception (193) : An error occurred trying to start process 'C :\home\site\wwwroot\Controllers\ffmpeg\bin\ffmpeg.exe' with working directory 'C :\home\site\wwwroot'. The specified executable is not a valid application for this OS platform.at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)at System.Diagnostics.Process.Start()at Xabe.FFmpeg.FFmpeg.RunProcess(String args, String processPath, Nullable1 priority, Boolean standardInput, Boolean standardOutput, Boolean standardError)at Xabe.FFmpeg.FFmpegWrapper.&lt;>c__DisplayClass14_0.<runprocess>b__0()at System.Threading.Tasks.Task</runprocess>1.InnerInvoke()at System.Threading.Tasks.Task.<>c.<.cctor>b__281_0(Object obj)at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)--- End of stack trace from previous location ---at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)--- End of stack trace from previous location ---at Xabe.FFmpeg.Conversion.Start(String parameters, CancellationToken cancellationToken)at ExtractResponseAPI.Controllers.HomeController.PrepareVideoClips(CloudBlockBlob sourceVideoBlob, TimeSpan startTime, TimeSpan endTime) in C :\Users\tushar.h.gupta\source\repos\ExtractResponseAPI\Controllers\HomeController.cs:line 164at ExtractResponseAPI.Controllers.HomeController.GetIntervalsAsync(String query) in C :\Users\tushar.h.gupta\source\repos\ExtractResponseAPI\Controllers\HomeController.cs:line 60at ExtractResponseAPI.Controllers.HomeController.Get(String query) in C :\Users\tushar.h.gupta\source\repos\ExtractResponseAPI\Controllers\HomeController.cs:line 24at lambda_method4(Closure, Object)at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<invokenextactionfilterasync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State&amp; next, Scope&amp; scope, Object&amp; state, Boolean&amp; isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<invokeinnerfilterasync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<invokefilterpipelineasync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<invokeasync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<invokeasync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT</invokeasync></invokeasync></invokefilterpipelineasync></invokeinnerfilterasync></invokenextactionfilterasync>1.ProcessRequestAsync()

    &#xA;

    Code :

    &#xA;

    private async Task> PrepareVideoClips(CloudBlockBlob sourceVideoBlob, TimeSpan startTime, TimeSpan endTime)&#xA;{&#xA;    string tempDirectory = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());&#xA;&#xA;    // Create a temporary directory to store clips locally&#xA;    Directory.CreateDirectory(tempDirectory);&#xA;&#xA;    // Download the source video&#xA;    string sourceVideoPath = Path.Combine(tempDirectory, "sourceVideo.mp4");&#xA;    await sourceVideoBlob.DownloadToFileAsync(sourceVideoPath, FileMode.Create);&#xA;    FFmpeg.SetExecutablesPath("Controllers\\ffmpeg\\bin\\");&#xA;    // Use FFmpegCore to trim the video&#xA;    string outputVideoPath = Path.Combine(tempDirectory, "output.mp4");&#xA;&#xA;    await FFmpeg.Conversions.New()&#xA;        .AddParameter($"-ss {startTime.TotalSeconds}") // Start time&#xA;        .AddParameter($"-i {sourceVideoPath}")&#xA;        .AddParameter($"-to {(endTime - startTime).TotalSeconds}") // Duration&#xA;        .SetOutput(outputVideoPath)&#xA;        .Start();&#xA;&#xA;    // Return a list of file paths for the clips&#xA;    return new List<string> { outputVideoPath };&#xA;}&#xA;</string>

    &#xA;

    I tried deploying the app service using different OS but still facing the same issue, I also tried using different packages but the result is same.

    &#xA;

  • How to stream webcam video over RTSP using ffmpeg on Windows 10 ? [closed]

    15 mai 2024, par let me down slowly

    I am trying to stream my laptop's webcam using RTSP protocol using ffmpeg. I am trying to simulate an actual IP Camera. I have already tried different tools already including using VidGear python package, and gstreamer but could not get it working. Note : I am on Windows 10. I have tried this command :

    &#xA;

    ffmpeg -f dshow -s 320x240 -rtbufsize 2147.48M -r 30 -vcodec mjpeg -i video="HD Camera" -f rtsp -rtsp_transport tcp rtsp://localhost:8554/mystream&#xA;

    &#xA;

    It turns on the webcam with but prints these logs to the console :

    &#xA;

    ffmpeg version 7.0-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers&#xA;  built with gcc 13.2.0 (Rev5, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;[mjpeg @ 0000026201ae9fc0] unable to decode APP fields: Invalid data found when processing input&#xA;Input #0, dshow, from &#x27;video=HD Camera&#x27;:&#xA;  Duration: N/A, start: 1285415.793302, bitrate: N/A&#xA;  Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 320x240, 30 fps, 30 tbr, 10000k tbn&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (mjpeg (native) -> mpeg4 (native))&#xA;Press [q] to stop, [?] for help&#xA;[mjpeg @ 0000026201afe9c0] unable to decode APP fields: Invalid data found when processing input&#xA;[swscaler @ 0000026201b5cc40] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 00000262068c57c0] deprecated pixel format used, make sure you did set range correctly&#xA;[swscaler @ 0000026201b5cc40] deprecated pixel format used, make sure you did set range correctly&#xA;    Last message repeated 1 times&#xA;[mjpeg @ 0000026201afe9c0] unable to decode APP fields: Invalid data found when processing input&#xA;    Last message repeated 8 times&#xA;

    &#xA;

    I tried opening rtsp://localhost:8554/mystream but it shows VLC is unable to open the MRL &#x27;rtsp://localhost:8554/mystream&#x27;. Check the log for details.

    &#xA;

    Killing the running process outputs these additional logs

    &#xA;

    [out#0/rtsp @ 0000026201aeaf80] Could not write header (incorrect codec parameters ?): Immediate exit requested&#xA;[vf#0:0 @ 0000026201af4100] Error sending frames to consumers: Immediate exit requested&#xA;[vf#0:0 @ 0000026201af4100] Task finished with error code: -1414092869 (Immediate exit requested)&#xA;[vf#0:0 @ 0000026201af4100] Terminating thread with return code -1414092869 (Immediate exit requested)&#xA;[out#0/rtsp @ 0000026201aeaf80] Nothing was written into output file, because at least one of its streams received no packets.&#xA;frame=    0 fps=0.0 q=0.0 Lsize=       0KiB time=N/A bitrate=N/A speed=N/A&#xA;Exiting normally, received signal 2.&#xA;

    &#xA;

    Output of the command ffmpeg -list_devices true -f dshow -i dummy :

    &#xA;

      built with gcc 13.2.0 (Rev5, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;[dshow @ 00000140f18d4200] "HD Camera" (video)&#xA;[dshow @ 00000140f18d4200]   Alternative name "@device_pnp_\\?\usb#vid_05c8&amp;pid_03ea&amp;mi_00#6&amp;d0a8c55&amp;0&amp;0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"&#xA;[dshow @ 00000140f18d4200] "Microphone (Realtek(R) Audio)" (audio)&#xA;[dshow @ 00000140f18d4200]   Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{06840D8D-1151-4D9C-B865-2FE01BFB9FD2}"&#xA;[in#0 @ 00000140f18ba640] Error opening input: Immediate exit requested&#xA;Error opening input file dummy.&#xA;

    &#xA;

    Output of the command ffmpeg -f dshow -list_options true -i video="HD Camera" :

    &#xA;

      built with gcc 13.2.0 (Rev5, Built by MSYS2 project)&#xA;  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint&#xA;  libavutil      59.  8.100 / 59.  8.100&#xA;  libavcodec     61.  3.100 / 61.  3.100&#xA;  libavformat    61.  1.100 / 61.  1.100&#xA;  libavdevice    61.  1.100 / 61.  1.100&#xA;  libavfilter    10.  1.100 / 10.  1.100&#xA;  libswscale      8.  1.100 /  8.  1.100&#xA;  libswresample   5.  1.100 /  5.  1.100&#xA;  libpostproc    58.  1.100 / 58.  1.100&#xA;[dshow @ 000002670b4c12c0] DirectShow video device options (from video devices)&#xA;[dshow @ 000002670b4c12c0]  Pin "Capture" (alternative pin name "Capture")&#xA;[dshow @ 000002670b4c12c0]   vcodec=mjpeg  min s=1280x720 fps=30 max s=1280x720 fps=30&#xA;[dshow @ 000002670b4c12c0]   vcodec=mjpeg  min s=640x480 fps=30 max s=640x480 fps=30&#xA;[dshow @ 000002670b4c12c0]   vcodec=mjpeg  min s=640x360 fps=30 max s=640x360 fps=30&#xA;[dshow @ 000002670b4c12c0]   vcodec=mjpeg  min s=352x288 fps=30 max s=352x288 fps=30&#xA;[dshow @ 000002670b4c12c0]   vcodec=mjpeg  min s=320x240 fps=30 max s=320x240 fps=30&#xA;[dshow @ 000002670b4c12c0]   vcodec=mjpeg  min s=176x144 fps=30 max s=176x144 fps=30&#xA;[dshow @ 000002670b4c12c0]   pixel_format=yuyv422  min s=1280x720 fps=10 max s=1280x720 fps=10&#xA;[dshow @ 000002670b4c12c0]   pixel_format=yuyv422  min s=640x480 fps=30 max s=640x480 fps=30&#xA;[dshow @ 000002670b4c12c0]   pixel_format=yuyv422  min s=640x360 fps=30 max s=640x360 fps=30&#xA;[dshow @ 000002670b4c12c0]   pixel_format=yuyv422  min s=352x288 fps=30 max s=352x288 fps=30&#xA;[dshow @ 000002670b4c12c0]   pixel_format=yuyv422  min s=320x240 fps=30 max s=320x240 fps=30&#xA;[dshow @ 000002670b4c12c0]   pixel_format=yuyv422  min s=176x144 fps=30 max s=176x144 fps=30&#xA;[in#0 @ 000002670b4aa200] Error opening input: Immediate exit requested&#xA;Error opening input file video=HD Camera.&#xA;

    &#xA;

    Please help me solve the issue or suggest a better approach.

    &#xA;