
Recherche avancée
Autres articles (56)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Submit bugs and patches
13 avril 2011Unfortunately a software is never perfect.
If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
You may also (...)
Sur d’autres sites (6132)
-
how to download sample-aes m3u8 with ffmpeg ? [hls prompts : Unable to open key file skd:xxxxxxx]
18 octobre 2024, par Mam GhaghI am newbie in programming and need help.

Story and Question -> I have a m3u8 manifest like :

#EXTM3U
#EXT-X-VERSION:5
#EXT-X-TARGETDURATION:7
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-KEY:METHOD=SAMPLE-AES,URI="skd://xxxxxx",IV=yyyyyyy,KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1"
#EXTINF:6,
https://someurl.com/index_1_0.ts
#EXTINF:6,
https://someurl.com/index_2_0.ts
...



which is available on https://someurl.com/my.m3u8

So, When I executed ffmpeg command

ffmpeg -i "https://someurl.com/my.m3u8" -c copy out.mp4

the following message appeared

[hls @ 000002de75f89bc0] Unable to open key file skd://xxxxxx

Now the question is, How should I address the key ? Should I save the key into a file and address it in the m3u8 manifest ? or any other answer ?

-
Download m3u8 video from web page with authorization
31 août 2024, par maya_solovevaI try download m3u8 video from webpage with access by authorization.


I use ffmpeg command.
I get headers from network tab.


ffmpeg -y -loglevel verbose -headers "$(cat headers.txt)" -i "https://apps.foxford.ru/webinar-foxford/storage/api/v2/backends/yandex/sets/hls.webinar.foxford.ru::420e27e1-1c7d-43e9-9195-fc8b99e6f50a/objects/long.v2.yandex.video.360p.master.m3u8" output2.mp4 -c copy -f mp4 file:foxford_01.mp4.part



headers.txt content :


Host: apps.foxford.ru
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br, zstd
Referer: https://apps.foxford.ru/webinar/?audience=foxford.ru&brand=foxford&embedded_origin=https%3A%2F%2Ffoxford.ru&external_id=5aefae2d-e810-49ef-8344-d3807535fd9e&lesson_id=250799&scope=Z2lkOi8vc3RvZWdlL1VsbXM6OlJvb21zOjpXZWJpbmFyLzUwNDcwMA&utm_referrer=https%3A%2F%2Ffoxford.ru%2Fcourses%2F9193%2Flessons%2F250799&backurl=https%253A%252F%252Fapps%252Efoxford%252Eru%252Fapi%252Fv1%252Fredirs%252Faudiences%252Ffoxford%252Eru%252Fapps%252Fwebinar
DNT: 1
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
authorization: Bearer eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE3MjUwODU1MzUsImlzcyI6InN2Yy5mb3hmb3JkLnJ1IiwiYXVkIjoidXNyLmZveGZvcmQucnUiLCJzdWIiOiJaMmxrT2k4dmMzUnZaV2RsTDFWelpYSTZPbEIxY0dsc0x6RXdPRFU0TXpJeSJ9.NE9IsraTHFKicr3lkjzTTEkGLoGP-bL74nlX1umcPjC62h9MGXjPUFXL53jsnixd7b-WPtIc8N2WhsC6Ipt8IQ
Connection: keep-alive
Cookie: _csrf_token=%2Ba0goi1UnpRzFxpPOIbnZBaxtY0YUlZyBnyGohC5NbfBaVzLvwpEtM0x%2BjEPvJqJrcvsy2qMZHTStvusdxeUmQ%3D%3D; advcake_trackid=4b724357-eb38-b2f0-6919-4a4363aef58a; _tm_lt_sid=1720871531732.305536; client_timezone=Europe/Moscow; _ga=GA1.2.506102438.1720871532; tmr_lvid=7b674da8235ea642c3bfacf244eeae53; tmr_lvidTS=1720871533984; _ym_uid=1720871534834198811; _ym_d=1720871534; _tt_enable_cookie=1; _ttp=El4ZowXxQWdsnA31_DDrCt_AT_4; popmechanic_sbjs_migrations=popmechanic_1418474375998%3D1%7C%7C%7C1471519752600%3D1%7C%7C%7C1471519752605%3D1; _foxford_cookie_consent=yes; advcake_session_id=2fb2830e-9b68-2529-f9e4-2dec39973ef9; adtech_uid=ba6ca4c8-055a-4f46-b06c-6df09c20e8a4%3Afoxford.ru; top100_id=t1.7729862.2001929594.1723667001899; t3_sid_7729862=s1.1788907302.1725084603508.1725085234295.9.11; _ym_isad=2; mindboxDeviceUUID=9d785862-f8db-4ba8-b7bc-ccd9dbba98e1; directCrm-session=%7B%22deviceGuid%22%3A%229d785862-f8db-4ba8-b7bc-ccd9dbba98e1%22%7D; qrator_jsid=1725084559.622.G14rJEU37yUAYfzF-0l4eiu40m3uudgv95tu3faluhe7up6nv; mindboxSessionIsOpen=true
Priority: u=4
Pragma: no-cache
Cache-Control: no-cache
TE: trailers



ffmpeg returns HTTP error Server returned 401 Unauthorized (authorization failed) :




Headers from network tab :



-
Firebase and FFmpeg : Download URL error for videos longer than one hour
11 août 2024, par braunlichSummary of the problem : I'm developing a video processing feature in a React application that uses Firebase as the backend. The video file uploads to Firebase Storage without issues. However, when attempting to use FFmpeg to extract the audio as a FLAC file, the process works for videos under an hour but fails for longer videos, producing the error : "Error : File could not be read ! Code=-1".


Code context : The issue occurs during the process of grabbing the video URL from Firebase Storage and extracting audio using FFmpeg. Here is the code snippet :


try {
const videoDownloadURL = await getDownloadURL(uploadTask.snapshot.ref);
console.log('Video file available at', videoDownloadURL);

await ffmpeg.load();
await ffmpeg.writeFile(file.name, await fetchFile(file));
await ffmpeg.exec(['-i', file.name, '-q:a', '0', '-map', 'a', '-ac', '1', 'output.flac']); // Ensuring mono channel
const audioData = await ffmpeg.readFile('output.flac');
const audioBlob = new Blob([audioData.buffer], { type: 'audio/flac' });
const audioStorageRef = ref(storage, `${user.uid}/${videoId}.flac`);
const audioUploadTask = uploadBytesResumable(audioStorageRef, audioBlob, {
 contentType: 'audio/flac',
 customMetadata: {
 uploadedBy: user.uid,
 videoId: videoId
 }
});

audioUploadTask.on('state_changed',
 (snapshot) => {
 const audioProgress = Math.round((snapshot.bytesTransferred / snapshot.totalBytes) * 100 * 0.1);
 setUploadProgress(Math.round(videoProgress + audioProgress));
 console.log(`Audio upload progress: ${Math.round(audioProgress)}%`);
 },
 (error) => {
 console.error("Audio upload error:", error);
 },
 async () => {
 try {
 const audioDownloadURL = await getDownloadURL(audioUploadTask.snapshot.ref);
 console.log('Audio file available at', audioDownloadURL);
 audioUploadComplete = true;
 } catch (error) {
 console.error("Audio download URL error:", error);
 }
 }
);

} catch (error) { console.error("Download URL error:", error); }



Issue description : The above code successfully extracts audio from videos shorter than one hour. However, for videos around two to three hours long, the code breaks with the following error message :
error code


I suspect this might be related to FFmpeg or Firebase's handling of larger files, but I'm not sure how to debug this further or what adjustments to make.


Research and attempts :


I've confirmed that the video files are successfully uploaded to Firebase Storage.


The issue appears to be related to either the FFmpeg processing or the retrieval of the download URL for larger files.


I've searched for similar issues but haven't found a solution specific to handling larger video files with FFmpeg and Firebase.


Request for help :


Any insights on why this error might be occurring for larger files ? Suggestions for debugging or modifying the code to handle larger videos efficiently.