Recherche avancée

Médias (91)

Autres articles (45)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4044)

  • Rails using stremio-ffmpeg gem to watermark a movie while uploading

    16 juin 2016, par Felix

    I am using carrierwave to upload a movie to amazon s3 that works perfect.

    Now I want to add a watermark to the movie while uploading or after uploading, I don’t know, what’s the best way ?

    I tried this :

    movie_controller.rb action uploadVideo

    movie = FFMPEG::Movie.new(@vid.video.url)

    puts "........................................"
    puts movie.inspect

    if @vid.save

    Just to find out if the video is catched from stremio.

    But then I got the error that the movie is not found, the problem is that it doesn’t look in the amazon s3 bucket, it looks on my local server

    No such file or directory - the file '/uploads/tmp/1462954331-3471-8766/VID-20160424-WA0013.mp4' does not exist

    What could be the solution ? or should I do this in carrierwave uploader ?

    UPDATE :

    When I do this after the .save action it looks at amazon s3 bucket .. but also says that the movie isn’t there. But if I call it directly in browser it’s displayed.

    UPDATE Code :

    #Laedt ein Video hoch
    def uploadMovie
     @user = User.find_by_id session[:user_id]
     #Holt alle Channels für die er eine Berechtigung hat (Eingeloggter user)
     @user = User.find_by_id session[:user_id]
     @knowledgeproviderList = @user.knowledgeprovider
     @channels = Channel.where(knowledgeprovider_id:     @knowledgeproviderList.pluck(:id))
     @vid = Movie.new(movies_params)
     @channel = Channel.find(params[:vid][:channel_id])
     @vid.channel = @channel

     #Fügt dem Movie einen Tag hinzu
     createTag params
     createCategory params



     if @vid.save
       flash[:notice] = t("flash.saved")

       #movie = FFMPEG::Movie.new(@vid.video.url)

       #puts "........................................"
       #puts movie.inspect

       redirect_to :action => :add
      else
        redirect_to :action => :add
     end
    end

    Update error :

    movie = FFMPEG::Movie.new(@vid.video.current_path)

    options = {watermark: "mages/header.png", resolution: "640x360", watermark_filter: { position: "RT", padding_x: 10, padding_y: 10 } }
    movie.transcode("movie.flv", options)

    enter image description here

    Update :
    Added the code in the uploader :

     process :watermark_movie

        def watermark_movie
          if self.file.path
                options = {watermark: "images/header.png", resolution: "640x360", watermark_filter: { position: "RT", padding_x: 10, padding_y: 10 } }
                self.model.file = FFMPEG::Movie.new(self.file.path).transcode("#{root}/#{cache_dir}/#{self.cache_id}/file.mp4", options)
           end
         end

    Error :

    multi_json (1.12.0) lib/multi_json/adapter.rb:19:in `load'
    multi_json (1.12.0) lib/multi_json.rb:122:in `load'
    streamio-ffmpeg (2.0.0) lib/ffmpeg/movie.rb:28:in `initialize'
    app/uploaders/movie_uploader.rb:40:in `new'
    app/uploaders/movie_uploader.rb:40:in `watermark_movie'
    carrierwave (0.11.2) lib/carrierwave/uploader/processing.rb:84:in `block in process!'
    carrierwave (0.11.2) lib/carrierwave/uploader/processing.rb:76:in `each'
    carrierwave (0.11.2) lib/carrierwave/uploader/processing.rb:76:in `process!'
    carrierwave_backgrounder (0.4.2) lib/backgrounder/delay.rb:14:in `process!'
    carrierwave (0.11.2) lib/carrierwave/uploader/callbacks.rb:18:in `block in with_callbacks'
    carrierwave (0.11.2) lib/carrierwave/uploader/callbacks.rb:18:in `each'
    carrierwave (0.11.2) lib/carrierwave/uploader/callbacks.rb:18:in `with_callbacks'
    carrierwave (0.11.2) lib/carrierwave/uploader/cache.rb:134:in `cache!'
    carrierwave (0.11.2) lib/carrierwave/mount.rb:329:in `cache'
    carrierwave (0.11.2) lib/carrierwave/mount.rb:163:in `video='
    carrierwave (0.11.2) lib/carrierwave/orm/activerecord.rb:39:in `video='
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:54:in `public_send'
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:54:in `_assign_attribute'
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:41:in `block in assign_attributes'
    actionpack (4.2.1) lib/action_controller/metal/strong_parameters.rb:183:in `each_pair'
    actionpack (4.2.1) lib/action_controller/metal/strong_parameters.rb:183:in `each_pair'
    activerecord (4.2.1) lib/active_record/attribute_assignment.rb:35:in `assign_attributes'
    activerecord (4.2.1) lib/active_record/core.rb:559:in `init_attributes'
    activerecord (4.2.1) lib/active_record/core.rb:281:in `initialize'
    activerecord (4.2.1) lib/active_record/inheritance.rb:61:in `new'
    activerecord (4.2.1) lib/active_record/inheritance.rb:61:in `new'
    app/controllers/movies_controller.rb:71:in `uploadMovie'
    actionpack (4.2.1) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
    actionpack (4.2.1) lib/abstract_controller/base.rb:198:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/rendering.rb:10:in `process_action'
    actionpack (4.2.1) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
    activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:117:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
    activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:505:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:92:in `_run_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
    actionpack (4.2.1) lib/abstract_controller/callbacks.rb:19:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/rescue.rb:29:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
    activesupport (4.2.1) lib/active_support/notifications.rb:164:in `block in instrument'
    activesupport (4.2.1) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
    activesupport (4.2.1) lib/active_support/notifications.rb:164:in `instrument'
    actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
    actionpack (4.2.1) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
    activerecord (4.2.1) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
    actionpack (4.2.1) lib/abstract_controller/base.rb:137:in `process'
    actionview (4.2.1) lib/action_view/rendering.rb:30:in `process'
    actionpack (4.2.1) lib/action_controller/metal.rb:196:in `dispatch'
    actionpack (4.2.1) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
    actionpack (4.2.1) lib/action_controller/metal.rb:237:in `block in action'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `call'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in `dispatch'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:43:in `serve'
    actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in `block in serve'
    actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `each'
    actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in `serve'
    actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819:in `call'
    rack (1.6.4) lib/rack/etag.rb:24:in `call'
    rack (1.6.4) lib/rack/conditionalget.rb:38:in `call'
    rack (1.6.4) lib/rack/head.rb:13:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:in `call'
    rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
    rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in `call'
    activerecord (4.2.1) lib/active_record/query_cache.rb:36:in `call'
    activerecord (4.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in `call'
    activerecord (4.2.1) lib/active_record/migration.rb:378:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `call'
    activesupport (4.2.1) lib/active_support/callbacks.rb:88:in `_run_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:776:in `_run_call_callbacks'
    activesupport (4.2.1) lib/active_support/callbacks.rb:81:in `run_callbacks'
    actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/reloader.rb:73:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
    web-console (2.3.0) lib/web_console/middleware.rb:20:in `block in call'
    web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
    web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
    railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app'
    railties (4.2.1) lib/rails/rack/logger.rb:20:in `block in call'
    activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `block in tagged'
    activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in `tagged'
    activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `tagged'
    railties (4.2.1) lib/rails/rack/logger.rb:20:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in `call'
    rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
    rack (1.6.4) lib/rack/runtime.rb:18:in `call'
    activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
    rack (1.6.4) lib/rack/lock.rb:17:in `call'
    actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in `call'
    rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
    railties (4.2.1) lib/rails/engine.rb:518:in `call'
    railties (4.2.1) lib/rails/application.rb:164:in `call'
    rack (1.6.4) lib/rack/lock.rb:17:in `call'
    rack (1.6.4) lib/rack/content_length.rb:15:in `call'
    rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
    /home/felix/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
    /home/felix/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
    /home/felix/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

    UPDATE — Movie Uploader

    # encoding: utf-8
    class MovieUploader < CarrierWave::Uploader::Base

     # Include RMagick or MiniMagick support:
     # include CarrierWave::RMagick
     include CarrierWave::MiniMagick
     include CarrierWave::Video
     include CarrierWave::Video::Thumbnailer
     include CarrierWave::Backgrounder::Delay

     require 'rubygems'
     require 'streamio-ffmpeg'

     # Choose what kind of storage to use for this uploader:
     storage :fog

     # Override the directory where uploaded files will be stored.
     # This is a sensible default for uploaders that are meant to be mounted:
     def store_dir
       "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
     end

     process :watermark_movie

     def watermark_movie
       puts "ssssssssssssssssssssssssssssssssss"
       puts self.file.inspect

       if self.file.path
         options = {watermark: "http://felix-hohlwegler.de/holz-soft/include/designs/design13/images/header.png", resolution: "640x360", watermark_filter: { position: "RT", padding_x: 10, padding_y: 10 } }
         self.model.file = FFMPEG::Movie.new(self.file.path).transcode("#{root}/#{cache_dir}/#{self.cache_id}/file.mp4", options)
       end
     end

     version :thumb do
       process thumbnail: [{format: 'png', quality: 10, size: 1200, strip: false, seek: 10, logger: Rails.logger}]
       def full_filename for_file
         png_name for_file, version_name
       end
     end

     def png_name for_file, version_name
       %Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.png}
     end


     # Add a white list of extensions which are allowed to be uploaded.
     # For images you might use something like this:
      def extension_white_list
        %w(mov avi mkv mpeg mpeg2 mp4 3gp)
      end
    end
  • compile ffmpeg on ec2 linux instance - no libfdk-acc available

    11 mai 2022, par byc

    I’m compiling the ffmpeg on an ec2 amazon linux instance, but it threw me an error ERROR: libfdk_aac not found.

    


    I'm following this guide http://trac.ffmpeg.org/wiki/CompilationGuide/Centos to first install the dependencies and compile the package.

    


    yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make pkgconfig zlib-devel

mkdir ~/ffmpeg_sources

cd ~/ffmpeg_sources
curl -O -L https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
  --prefix="$HOME/ffmpeg_build" \
  --pkg-config-flags="--static" \
  --extra-cflags="-I$HOME/ffmpeg_build/include" \
  --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
  --extra-libs=-lpthread \
  --extra-libs=-lm \
  --bindir="$HOME/bin" \
  --enable-gpl \
  --enable-libfdk_aac \
  --enable-libfreetype \
  --enable-libmp3lame \
  --enable-libopus \
  --enable-libvpx \
  --enable-libx264 \
  --enable-libx265 \
  --enable-nonfree
make
make install
hash -d ffmpeg


    


    and this is the error message I've got

    


    ec2-user@ip-xx-xxx-xx-xx ffmpeg]$ PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure \
>   --prefix="$HOME/ffmpeg_build" \
>   --pkg-config-flags="--static" \
>   --extra-cflags="-I$HOME/ffmpeg_build/include" \
>   --extra-ldflags="-L$HOME/ffmpeg_build/lib" \
>   --extra-libs=-lpthread \
>   --extra-libs=-lm \
>   --bindir="$HOME/bin" \
>   --enable-gpl \
>   --enable-libfreetype \
>   --enable-libmp3lame \
>   --enable-libopus \
>   --enable-libvpx \
>   --enable-libx264 \
>   --enable-libx265 \
>   --enable-nonfree

ERROR: libfdk_aac >= 3.98.3 not found


    


    I tried installing libfdk_aac but there's no package found. I don't seem to come across any posts discussing this issue, or at least recently. Appreciate any pointers. thanks !

    


    [ec2-user@ip-xx-xxx-xx-xx ffmpeg]$ sudo yum install libfdk-aac
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package libfdk-aac available.
Error: Nothing to do


    


  • Video streamign with FFMpeg and Nest.js+Next.js

    17 septembre 2024, par Aizen

    Here is my problem : I have one video src 1080p (on the frontend). On the frontend, I send this video-route to the backend :

    


    const req = async()=>{try{const res = await axios.get('/catalog/item',{params:{SeriesName:seriesName}});return {data:res.data};}catch(err){console.log(err);return false;}}const fetchedData = await req();-On the backend i return seriesName.Now i can make a full path,what the video is,and where it is,code:


    


    const videoUrl = 'C:/Users/arMori/Desktop/RedditClone/reddit/public/videos';console.log('IT VideoURL',videoUrl);


    


    const selectedFile = `${videoUrl}/${fetchedData.data.VideoSource}/${seriesName}-1080p.mp4`
console.log(`ITS'S SELECTED FILE: ${selectedFile}`);


    


    Ok, I have my src 1080p, now is the time to send it to the backend :

    


    const response = await axios.post('/videoFormat', {videoUrl:selectedFile})console.log('Это консоль лог путей: ',response.data);const videoPaths = response.data;


    


    Backend takes it and FFMpqg makes two types of resolution,720p and 480p,save it to the temp storage on backend, and then returns two routes where these videos stores

    


    async videoUpload(videoUrl:string){try{const tempDir = C:/Users/arMori/Desktop/RedditClone/reddit_back/src/video/temp;const inputFile = videoUrl;console.log('VIDEOURL: ',videoUrl);


    


            const outputFiles = [];&#xA;        &#xA;        await this.createDirectories(tempDir);        &#xA;        outputFiles.push(await this.convertVideo(inputFile, &#x27;1280x720&#x27;, &#x27;720p.mp4&#x27;));&#xA;        outputFiles.push(await this.convertVideo(inputFile, &#x27;854x480&#x27;, &#x27;480p.mp4&#x27;));&#xA;        console.log(&#x27;OUTUPT FILES SERVICE: &#x27;,outputFiles);&#xA;        &#xA;        return outputFiles;&#xA;&#xA;    }catch(err){&#xA;        console.error(&#x27;VideoFormatterService Error: &#x27;,err);&#xA;        &#xA;    }&#xA;}&#xA;&#xA;private convertVideo(inputPath:string,resolution:string,outputFileName:string):Promise<string>{&#xA;    const temp = `C:/Users/arMori/Desktop/RedditClone/reddit_back/src/video/temp`;&#xA;    return new Promise(async(resolve,reject)=>{&#xA;        const height = resolution.split(&#x27;x&#x27;)[1];&#xA;        console.log(&#x27;HIEGHT: &#x27;,height);&#xA;        &#xA;        const outputDir = `C:/Users/arMori/Desktop/RedditClone/reddit_back/src/video/temp/${height}p`;&#xA;        const outputPath = join(outputDir, outputFileName);&#xA;        const isExists = await fs.access(outputPath).then(() => true).catch(() => false);&#xA;        if(isExists){ &#xA;            console.log(`File already exists: ${outputPath}`);&#xA;            return resolve(outputPath)&#xA;        };&#xA;        ffmpeg(inputPath)&#xA;        .size(`${resolution}`)&#xA;        .videoCodec(&#x27;libx264&#x27;) // Кодек H.264&#xA;        .audioCodec(&#x27;aac&#x27;) &#xA;        .output(outputPath)&#xA;        .on(&#x27;end&#x27;,()=>resolve(outputPath))&#xA;        .on(&#x27;error&#x27;,(err)=>reject(err))&#xA;        .run()&#xA;            &#xA;    })&#xA;}&#xA;&#xA;private async createDirectories(temp:string){&#xA;    try{&#xA;        const dir720p = `${temp}/720p`;&#xA;        const dir480p = `${temp}/480p`;&#xA;        const dir720pExists = await fs.access(dir720p).then(() => true).catch(() => false);&#xA;        const dir480pExists = await fs.access(dir480p).then(() => true).catch(() => false);&#xA;        if(dir720pExists &amp;&amp; dir480pExists){&#xA;            console.log(&#x27;FILES ALIVE&#x27;);&#xA;            return;&#xA;        }&#xA;        if (!dir720pExists) {&#xA;            await fs.mkdir(dir720p, { recursive: true });&#xA;            console.log(&#x27;Папка 720p создана&#x27;);&#xA;        }&#xA;        &#xA;        if (!dir480pExists) {&#xA;            await fs.mkdir(dir480p, { recursive: true });&#xA;            console.log(&#x27;Папка 480p создана&#x27;);&#xA;        }&#xA;    } catch (err) {&#xA;        console.error(&#x27;Ошибка при создании директорий:&#x27;, err);&#xA;    }&#xA;}&#xA;</string>

    &#xA;

    Continue frontentd code :

    &#xA;

    let videoPath;&#xA;&#xA;if (quality === &#x27;720p&#x27;) {&#xA;        videoPath = videoPaths[0];&#xA;} else if (quality === &#x27;480p&#x27;) {&#xA;        videoPath = videoPaths[1];&#xA;}&#xA;&#xA;if (!videoPath) {&#xA;        console.error(&#x27;Video path not found!&#x27;);&#xA;        return;&#xA;}&#xA;&#xA;// Получаем видео по его пути&#xA;console.log(&#x27;VIDEOPATH LOG: &#x27;,videoPath);&#xA;    &#xA;const videoRes = await axios.get(&#x27;/videoFormat/getVideo&#x27;, { &#xA;        params: { path: videoPath } ,&#xA;        headers: { Range: &#x27;bytes=0-&#x27; },&#xA;        responseType: &#x27;blob&#x27;&#xA;    });&#xA;    console.log(&#x27;Video fetched: &#x27;, videoRes);&#xA;    const videoBlob = new Blob([videoRes.data], { type: &#x27;video/mp4&#x27; });&#xA;    const videoURL = URL.createObjectURL(videoBlob);&#xA;    return videoURL;&#xA;    /* console.log(&#x27;Видео успешно загружено:&#x27;, response.data); */&#xA;    } catch (error) {&#xA;    console.error(&#x27;Ошибка при загрузке видео:&#x27;, error);&#xA;    }&#xA;}&#xA;

    &#xA;

    Here I just choose one of the route and make a new GET request (VideoRes), now in the controller in the backend, I'm trying to do a video streaming :

    &#xA;

    @Public()&#xA;    @Get(&#x27;/getVideo&#x27;)&#xA;    async getVideo(@Query(&#x27;path&#x27;) videoPath:string,@Req() req:Request,@Res() res:Response){&#xA;        try {&#xA;            console.log(&#x27;PATH ARGUMENT: &#x27;,videoPath);&#xA;            console.log(&#x27;VIDEOPATH IN SERVICE: &#x27;,videoPath);&#xA;        const videoSize = (await fs.stat(videoPath)).size;&#xA;        const CHUNK_SIZE = 10 ** 6;&#xA;        const range = req.headers[&#x27;range&#x27;] as string | undefined;&#xA;        if (!range) {&#xA;            return new ForbiddenException(&#x27;Range не найденно&#x27;);&#xA;        }&#xA;        const start = Number(range.replace(/\D/g,""));&#xA;        const end = Math.min(start &#x2B; CHUNK_SIZE,videoSize - 1);&#xA;&#xA;        const contentLength = end - start &#x2B; 1;&#xA;        const videoStream = fsSync.createReadStream(videoPath, { start, end });&#xA;        const headers = {&#xA;            &#x27;Content-Range&#x27;:`bytes ${start}-${end}/${videoSize}`,&#xA;            &#x27;Accept-Ranges&#x27;:&#x27;bytes&#x27;,&#xA;            &#x27;Content-Length&#x27;:contentLength,&#xA;            &#x27;Content-Type&#x27;:&#x27;video/mp4&#x27;&#xA;        }&#xA;        &#xA;        res.writeHead(206,headers);&#xA;&#xA;        // Передаем поток в ответ&#xA;        videoStream.pipe(res);&#xA;        &#xA;&#xA;        // Если возникнет ошибка при стриминге, логируем ошибку&#xA;        videoStream.on(&#x27;error&#x27;, (error) => {&#xA;            console.error(&#x27;Ошибка при чтении видео:&#x27;, error);&#xA;            res.status(500).send(&#x27;Ошибка при чтении видео&#x27;);&#xA;        });&#xA;        } catch (error) {&#xA;            console.error(&#x27;Ошибка при обработке запросов:&#x27;, error);&#xA;            return res.status(400).json({ message: &#x27;Ошибка при обработке getVideo запросов&#x27; });&#xA;        }&#xA;    }&#xA;

    &#xA;

    Send to the frontend

    &#xA;

    res.writeHead(206,headers);&#xA;

    &#xA;

    In the frontend, I make blob url for video src and return it

    &#xA;

    const videoBlob = new Blob([videoRes.data], { type: &#x27;video/mp4&#x27; });const videoURL = URL.createObjectURL(videoBlob);return videoURL;&#xA;

    &#xA;

    And assign src to the video :

    &#xA;

    useVideo(seriesName,quality).then(src => {&#xA;                if (src) {&#xA;                    console.log(&#x27;ITS VIDEOLOGISC GOIDA!&#x27;);&#xA;                    if(!playRef.current) return;&#xA;                    &#xA;                    const oldURL = playRef.current.src;&#xA;                    if (oldURL &amp;&amp; oldURL.startsWith(&#x27;blob:&#x27;)) {&#xA;                        URL.revokeObjectURL(oldURL);&#xA;                    }&#xA;                    playRef.current.pause();&#xA;                    playRef.current.src = &#x27;&#x27;;&#xA;                    setQuality(quality);&#xA;                    console.log(&#x27;SRC: &#x27;,src);&#xA;                    &#xA;                    playRef.current.src = src;&#xA;                    playRef.current.load();&#xA;                    console.log(&#x27;ITS VIDEOURL GOIDA!&#x27;);&#xA;                    togglePlayPause();&#xA;                }&#xA;            })&#xA;            .catch(err => console.error(&#x27;Failed to fetch video&#x27;, err));&#xA;

    &#xA;

    But the problem is :

    &#xA;

    &#xA;

    Vinland-Saga:1 Uncaught (in promise) NotSupportedError : Failed to load because no supported source was found

    &#xA;

    &#xA;

    And I don't know why...

    &#xA;

    I tried everything, but I don't understand why src is incorrect..

    &#xA;