
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (95)
-
List of compatible distributions
26 avril 2011, parThe table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
Organiser par catégorie
17 mai 2013, parDans MédiaSPIP, une rubrique a 2 noms : catégorie et rubrique.
Les différents documents stockés dans MédiaSPIP peuvent être rangés dans différentes catégories. On peut créer une catégorie en cliquant sur "publier une catégorie" dans le menu publier en haut à droite ( après authentification ). Une catégorie peut être rangée dans une autre catégorie aussi ce qui fait qu’on peut construire une arborescence de catégories.
Lors de la publication prochaine d’un document, la nouvelle catégorie créée sera proposée (...)
Sur d’autres sites (5341)
-
Issue in CV_FOURCC('H', '2', '6', '4')
16 décembre 2014, par AshwinI am trying to use H264 encoding type for compressing the live streaming from Camera (which is supporting the H264 codec) am getting below -
[I am using OPENCV 3.0 beta version (latest)in windows 7 64 bit system .My camera is also supporting H264 codec (find more details below) ]
My ffmpeg code got built with h264 lib :
This build was compiled with the following external libraries :
x264 20140826-git-dd79a61 http://videolan.org/developers/x264.html**error :**
Frame size = 1280x720
Could not find encoder for codec id 28: Encoder not foundERROR: Failed to write the video
Press any key to continue . . .Below is my code :
int main(int argc, char *argv[])
{
// QApplication a(argc, argv);
VideoCapture cap(0); //capture webcam
if (!cap.isOpened()) //if not successful then exit
{
cout << "Cannot open webcam";
return -1;
}
namedWindow("Camera feed", 1); //create window
cap.set(3, 1280);
cap.set(4, 720);
double dWidth = cap.get(CV_CAP_PROP_FRAME_WIDTH); //get width of frames of video
double dHeight = cap.get(CV_CAP_PROP_FRAME_HEIGHT); //get height of frames of video
Size frameSize(static_cast<int>(dWidth), static_cast<int>(dHeight));
cout << "Frame size = " << dWidth << "x" << dHeight << endl;
VideoWriter oVideoWriter("video.avi", CV_FOURCC('X', '2', '6', '4'), 30, frameSize);
if(!oVideoWriter.isOpened())
{
cout << "ERROR: Failed to write the video" << endl;
return -1;
}
while(1)
{
Mat frame;
bool bSuccess = cap.read(frame); //read a new frame from video
if(!bSuccess) //if unsuccessful, break loop
{
cout << "Cannot read frame from video file" << endl;
break;
}
oVideoWriter.write(frame); //write the frame into the file
imshow("Camera feed", frame); //show the frame in "Live Feed" window
cout << "Recording" << endl;
if (waitKey(30) == 27)
{
cout<< "Esc key is pressed by user" << endl;
break;
}
}
return 0;
}
</int></int>Here is the proof that my camera is supporting the H264 :
C:\Users>ffmpeg -f dshow -list_options true -i video="Logitech HD Pro Webcam C920"
ffmpeg version N-66116-g720c21d Copyright (c) 2000-2014 the FFmpeg developers
built on Sep 4 2014 22:09:48 with gcc 4.8.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 1.100 / 56. 1.100
libavformat 56. 4.100 / 56. 4.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
[dshow @ 0000000002faf680] DirectShow video device options
[dshow @ 0000000002faf680] Pin "Capture"
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=1920x1080 fps=5 max s=1920x1080 fps=30
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=2304x1296 fps=2 max s=2304x1296 fps=2
[dshow @ 0000000002faf680] pixel_format=bgr24 min s=2304x1536 fps=2 max s=2304x1536 fps=2
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=1920x1080 fps=5 max s=1920x1080 fps=30
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=2304x1296 fps=2 max s=2304x1296 fps=2
[dshow @ 0000000002faf680] pixel_format=yuv420p min s=2304x1536 fps=2 max s=2304x1536 fps=2
[dshow @ 0000000002faf680] vcodec=mjpeg min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] vcodec=mjpeg min s=1920x1080 fps=5 max s=1920x1080 fps=30
[dshow @ 0000000002faf680] Pin "Capture"
[dshow @ 0000000002faf680] vcodec=h264 min s=640x480 fps=5 max s=640x480 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=160x90 fps=5 max s=160x90 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=160x120 fps=5 max s=160x120 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=176x144 fps=5 max s=176x144 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=320x180 fps=5 max s=320x180 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=320x240 fps=5 max s=320x240 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=352x288 fps=5 max s=352x288 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=432x240 fps=5 max s=432x240 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=640x360 fps=5 max s=640x360 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=800x448 fps=5 max s=800x448 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=800x600 fps=5 max s=800x600 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=864x480 fps=5 max s=864x480 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=960x720 fps=5 max s=960x720 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1024x576 fps=5 max s=1024x576 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1280x720 fps=5 max s=1280x720 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1600x896 fps=5 max s=1600x896 fps=30
[dshow @ 0000000002faf680] vcodec=h264 min s=1920x1080 fps=5 max s=1920x1080 fps=30
video=Logitech HD Pro Webcam C920: Immediate exit requested -
Evolution #4749 (Nouveau) : [UX] Comportement des labels : quoi par défaut, quoi ponctuel ?
27 avril 2021, par RastaPopoulos ♥Ce ticket sert à réfléchir et possiblement reconcevoir les choix par défaut pour les labels des formulaires.
État des lieux¶
On le sait, l’ergo c’est normalement beaucoup d’objectif : certains placements, certaines tailles, épaisseurs, etc fonctionnent mieux que d’autres, et ceci est prouvable par tests utilisateurs.
Or cela fait des années que les tests par eye-tracking montrent que les formulaires sont
1) lu plus rapidement
2) avec une meilleure compréhension
lorsque les labels sont au-dessus des champs.Ça ne veut pas dire qu’il faut totalement interdire autrement mais : ça veut clairement dire que ça devrait être le comportement par défaut. Et seulement ponctuellement, par choix explicite, pouvoir mettre les labels sur le côté.
Par ailleurs les pros de l’ergo (sur base des mêmes tests) préconisent tou⋅tes : dans les rares cas où on met les labels sur le côté, ça devrait être calé à droite sur le champ, pour les mêmes raisons de compréhension.
Les avantages des labels au-dessus :
- prouvé que c’est bien mieux compris par tout le monde
- lecture plus rapide
- fonctionne de base sur tous les écrans, pas d’adaptation à faire
- polyvalent et générique sur le contenu des labels : marche mieux quelque soit la longueur, et donc à prioriser dans un contexte multilingue
=> cela correspond bien au maximum de notre utilisation : un CMS multi-lingue, allant enfin vers le responsive, se souciant d’accessibilité.Le seul désavantage : allonge la hauteur des formulaires, mais ça n’a un impact surtout que pour les formulaires ayant vraiment vraiment beaucoup de champs, ce qui est rare !
Quand un formulaire est extrêmement long, il y a même plusieurs méthodes qui peuvent être utilisées sans pour autant passer les labels sur le côté :
1) placer certains champs sur le même ligne (prénom + nom, etc)
2) découper le formulaire en plusieurs étapes.Proposition pour le futur¶
- tous les labels doivent être au-dessus comme comportement par défaut
- pour certains cas, une classe permet de mettre sur le côté : valable uniquement en grand écran, ça reste au-dessus en mobile first
- si sur le côté : c’est mieux si aligné sur le champ (donc à droite en LTR)
- ex de rare formulaire candidat : changement des datesQuelques sources¶
Tests utilisateurs
https://www.uxmatters.com/mt/archives/2006/07/label-placement-in-forms.phpPlacing a label above an input field works better in most cases
Placing labels above input fields is preferable
In most cases, when placing labels to the left of input fields, using left-aligned labels imposes a heavy cognitive workload on users
if you choose to place them to the left of input fields, at least make them right alignedChez le très connu cabinet d’ergo Nielsen Group
https://www.nngroup.com/articles/form-design-white-space/We recommend placing field labels above the corresponding text fields [en gras chez eux !]
it makes the form easier to scan, because users can see the text field in the same fixation as the label. Top placement also allows for longer field labels
If the labels are too far to the left, it can be difficult to associate the correct label with its corresponding fieldChez Adobe, ils préconisent de suivre les recommandations de la première source
https://xd.adobe.com/ideas/principles/web-design/best-practices-form-design/Matteo Penzo’s 2006 article on label placement suggests that forms are completed faster if labels are on top of the fields. Top-aligned labels are good if you want users to scan the form as quickly as possible.
The biggest advantage of top-aligned labels is that different-sized labels and localized versions can more easily fit the UI.
Takeaway : If you want users to scan a form quickly, put labels above the fields. The layout will be easier to scan because the eye will move straight down the page. However, if you want users to read carefully, put labels to the left of the fields. This layout will slow down the reader and make them scan in a Z-shaped motion.Chez une appli de conception d’interface
https://phase.com/magazine/usability-of-forms/from a cognitive point of view, the association is powerful
Also, the eyes move only in one direction since the scanning is top down as compared to Z shape (left-right and top-bottom) for inline labels
Design is space efficient and hence adaptable to all resolutions ; in short, responsive in nature
We also get flexibility regarding the length of labels. This proves useful while working with variable label lengths like multilingual support for applications
One drawback of this approach is the increased height of the form. However, it can be solved with alternate designs like a grouping of fields or stepper forms -
Video streaming error : Uncaught (in promise) NotSupportedError : Failed to load because no supported source was found
18 septembre 2024, par AizenHere 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 = [];
 
 await this.createDirectories(tempDir); 
 outputFiles.push(await this.convertVideo(inputFile, '1280x720', '720p.mp4'));
 outputFiles.push(await this.convertVideo(inputFile, '854x480', '480p.mp4'));
 console.log('OUTUPT FILES SERVICE: ',outputFiles);
 
 return outputFiles;

 }catch(err){
 console.error('VideoFormatterService Error: ',err);
 
 }
}

private convertVideo(inputPath:string,resolution:string,outputFileName:string):Promise<string>{
 const temp = `C:/Users/arMori/Desktop/RedditClone/reddit_back/src/video/temp`;
 return new Promise(async(resolve,reject)=>{
 const height = resolution.split('x')[1];
 console.log('HIEGHT: ',height);
 
 const outputDir = `C:/Users/arMori/Desktop/RedditClone/reddit_back/src/video/temp/${height}p`;
 const outputPath = join(outputDir, outputFileName);
 const isExists = await fs.access(outputPath).then(() => true).catch(() => false);
 if(isExists){ 
 console.log(`File already exists: ${outputPath}`);
 return resolve(outputPath)
 };
 ffmpeg(inputPath)
 .size(`${resolution}`)
 .videoCodec('libx264') // Кодек H.264
 .audioCodec('aac') 
 .output(outputPath)
 .on('end',()=>resolve(outputPath))
 .on('error',(err)=>reject(err))
 .run()
 
 })
}

private async createDirectories(temp:string){
 try{
 const dir720p = `${temp}/720p`;
 const dir480p = `${temp}/480p`;
 const dir720pExists = await fs.access(dir720p).then(() => true).catch(() => false);
 const dir480pExists = await fs.access(dir480p).then(() => true).catch(() => false);
 if(dir720pExists && dir480pExists){
 console.log('FILES ALIVE');
 return;
 }
 if (!dir720pExists) {
 await fs.mkdir(dir720p, { recursive: true });
 console.log('Папка 720p создана');
 }
 
 if (!dir480pExists) {
 await fs.mkdir(dir480p, { recursive: true });
 console.log('Папка 480p создана');
 }
 } catch (err) {
 console.error('Ошибка при создании директорий:', err);
 }
}
</string>


Continue frontentd code :


let videoPath;

if (quality === '720p') {
 videoPath = videoPaths[0];
} else if (quality === '480p') {
 videoPath = videoPaths[1];
}

if (!videoPath) {
 console.error('Video path not found!');
 return;
}

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



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 :


@Public()
 @Get('/getVideo')
 async getVideo(@Query('path') videoPath:string,@Req() req:Request,@Res() res:Response){
 try {
 console.log('PATH ARGUMENT: ',videoPath);
 console.log('VIDEOPATH IN SERVICE: ',videoPath);
 const videoSize = (await fs.stat(videoPath)).size;
 const CHUNK_SIZE = 10 ** 6;
 const range = req.headers['range'] as string | undefined;
 if (!range) {
 return new ForbiddenException('Range не найденно');
 }
 const start = Number(range.replace(/\D/g,""));
 const end = Math.min(start + CHUNK_SIZE,videoSize - 1);

 const contentLength = end - start + 1;
 const videoStream = fsSync.createReadStream(videoPath, { start, end });
 const headers = {
 'Content-Range':`bytes ${start}-${end}/${videoSize}`,
 'Accept-Ranges':'bytes',
 'Content-Length':contentLength,
 'Content-Type':'video/mp4'
 }
 
 res.writeHead(206,headers);

 // Передаем поток в ответ
 videoStream.pipe(res);
 

 // Если возникнет ошибка при стриминге, логируем ошибку
 videoStream.on('error', (error) => {
 console.error('Ошибка при чтении видео:', error);
 res.status(500).send('Ошибка при чтении видео');
 });
 } catch (error) {
 console.error('Ошибка при обработке запросов:', error);
 return res.status(400).json({ message: 'Ошибка при обработке getVideo запросов' });
 }
 }



Send to the frontend


res.writeHead(206,headers);



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


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



And assign src to the video :


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



But the problem is :




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




And I don't know why...


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