
Recherche avancée
Autres articles (23)
-
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 -
Les statuts des instances de mutualisation
13 mars 2010, parPour des raisons de compatibilité générale du plugin de gestion de mutualisations avec les fonctions originales de SPIP, les statuts des instances sont les mêmes que pour tout autre objets (articles...), seuls leurs noms dans l’interface change quelque peu.
Les différents statuts possibles sont : prepa (demandé) qui correspond à une instance demandée par un utilisateur. Si le site a déjà été créé par le passé, il est passé en mode désactivé. publie (validé) qui correspond à une instance validée par un (...) -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (6092)
-
vulkan_h264 : send scaling lists in zig-zag order
21 août 2023, par Benjamin Cheng -
How to calculate the "Range" header for mp4 file to play/download a part of it ? [youtube-dl]
5 décembre 2016, par supersanI’m using youtube-dl to download videos from YouTube. Unfortunately, sometimes I just need to download a part of the video like 10 seconds of a 3 hour video and here is how I see I can do it.
Step 1 : Get the URL of the mp4 file from youtube-dl.
youtube-dl -g -f "[ext=mp4]" https://www.youtube.com/watch?v=qOZ1u9VpoMk
This returns
$url
: the full URL of mp4 file on server.Step 2 : Download part of the video using curl
curl -r $startBytes-$endBytes $url
But how to calculate
$startBytes
and$endBytes
. What is the formula for that ?P.S I was thinking could be something as simple but this isn’t it..
$startBytes
= (total_size_of_video / total_length_of_video_secs) * start_secondsP.P.S. When I play the mp4 video in Chrome and use the scrub bar to jump around in the video, Chrome too send the Range header to the same URL (as I can see in fiddler)
-
Python code to download hls stream to mp4
2 décembre 2024, par Maad A.GalilI wrote the following code to download a video from a website. Chrome extensions can detect the video and download it. However, my code gets the following errors. Any help ?


from bs4 import BeautifulSoup
import requests
from subprocess import check_output

video_url = 'https://www.dimakids.com/ab6al-aldigetal-s3-1415387355-21011.html#sets'
headers = {'User-Agent': 'Mozilla/5.0'}

url = requests.get(video_url, headers=headers)
page = url.content
soup = BeautifulSoup(page, "html.parser")

result = str(soup.find_all('video')[0])
result = result.split('src="')[1].split('" type=')[0] 
print(result)

# seg = requests.get(result)
# """
# Error: requests.exceptions.SSLError: HTTPSConnectionPool(host='stream.foupix.com', port=443): Max retries exceeded with url: /animeios/1415387355/ab6al_aldigetal_s3_01.mp4/index.m3u8?tkn=jja4Czj-AzbJx1JmvDvQeA&tms=1733079050 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)')))
# """
# print(seg)


print(check_output(f'ffmpeg -i "{result}" -codec copy file.mp4', shell=True))
"""
Error: https://stream.foupix.com/animeios/1415387355/ab6al_aldigetal_s3_01.mp4/index.m3u8?tkn=SWf7n3qH8MwFLlq18wngIQ&tms=1733079103: Server returned 403 Forbidden (access denied)
"""



The link works as any hls downloader can capture the video and download it as seen here (of course token and timestamp values change everytime it captures the video) :


Page URL https://www.dimakids.com/ab6al-aldigetal-s3-1415387355-21011.html#sets


Thumbnail https://www.dimakids.com/images/anime/cat_1415387355.jpg




video component https://stream.foupix.com/animeios/1415387355/ab6al_aldigetal_s3_01.mp4/index.m3u8?tkn=6nyEskSbHBI713sG0uhZJQ&tms=1733171604