
Recherche avancée
Médias (91)
-
Spoon - Revenge !
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
My Morning Jacket - One Big Holiday
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Zap Mama - Wadidyusay ?
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
David Byrne - My Fair Lady
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Beastie Boys - Now Get Busy
15 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Granite de l’Aber Ildut
9 septembre 2011, par
Mis à jour : Septembre 2011
Langue : français
Type : Texte
Autres articles (30)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne 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 (...) -
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 -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...)
Sur d’autres sites (7078)
-
Download a part of youtube video using a powershell script
26 octobre 2024, par Nguyễn Đức MinhI'm writing this Powershell script :


$URL = "https://www.youtube.com/watch?v=KbuwueqEJL0"
$from = 00:06:15
$to = 00:09:17

$cmdOutput = (youtube-dl --get-url $URL) 

ffmpeg -ss $from -to $to -i -ss $from -to $to -i output.mkv



This script's purpose is to download a part of a Youtube video. I've set the variable $URL to specify the Youtube URL, while
$from
and$to
is the start and end time of the part I want to download.

$cmdOutput
is used to output the stream URL. The output would have two lines : the first one is the URL for the video stream, while the second one is the audio stream URL.

Currently, I don't know how to use the output as a variable and specify the line number of $cmdOutput to put it into the correct stream. I guess
and
would be replaced by something like
$cmdOutput[line 1]
, and$cmdOutput[line 2]
, though I know that those are incorrect.

I've consulted this answer, and it is handy for me to write this script. I've also read Boris Lipschitz's answer on how to do the same thing with Python, but his answer does not work.


In that script, the
-ss
flag inputs the seeking point, and the-t <duration></duration>
flag tells FFmpeg to stop encoding after the specified duration. For example, if the start time is 00:02:00 and the duration is 00:03:00, FFmpeg would download from 00:02:00 to 00:05:00, which is not the expected outcome. For some reason, his Python script skips the first 5 seconds of output, even if I replace the-t
flag with-to
. I've tried to edit his script, but it does not work unless you explicitly specify the time for both video and audio stream, as well as their respective stream URL.

-
ffmpeg download mp3 in chunks slower than whole file
6 août 2021, par loretoparisiI'm programmatically downloading in Python mp3 file's as
wav
chunks, seeking at position withss
andt
withffmpeg
resulting in a sequence offfmpeg
commands

ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss 0:08:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss 0:09:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -ss -ss -ss 0:10:55.780000 -t 0:01:00.000000 -sn -vn -y -f wav pipe:1
...



executed via
concurrent.futures.ThreadPoolExecutor
in this way :

with concurrent.futures.ThreadPoolExecutor(max_workers=NTHREADS) as executor:
 for i,cmd in enumerate(process_list):
 futures.append(executor.submit(downloader.chunk_download,(cmd,i)))

 for future in concurrent.futures.as_completed(futures):
 try:
 completed.append(future.result())
 except Exception as e:print(e)
 completed.sort() 
 for k,c in enumerate(completed):
 if not k:
 waveform = c[1]
 else:
 waveform = np.append(waveform,c[1])



where
chunk_download
is concat the chunks into the whole waveform

def chunk_download(self,args):
 cmd=args[0]
 i=args[1]
 print('Downloading chunk n° %i' % i)

 print( ' '.join(cmd))
 process = subprocess.run(cmd,
 stdout=subprocess.PIPE,
 stderr=subprocess.PIPE,
 bufsize=10**8)
 #buffer, stderr = process.communicate()
 buffer = process.stdout
 stderr = process.stderr
 print('chunk n° %i DOWNLOADED' % i)
 # convert to signal
 chunk_waveform = np.frombuffer(buffer=buffer, dtype=np.uint16, offset=8*44)
 chunk_waveform = chunk_waveform.astype(self.dtype) 
 print(len(chunk_waveform)/44100) 

 return i,chunk_waveform



this works ok, but if I download the whole mp3, executing the command in
cmd
like :

ffmpeg -i https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_5MG.mp3 -acodec pcm_s16le -ac 1 -ar 44100 -sn -vn -y -f wav pipe:1



It will take less time than the concurrent chunks download for the same file length, while I would expect the opposite. Could be this related to
ffmpeg
threading option (param--thread
?). If not, why the concurrent chunks download operation is slower ?

-
When downloading HLS video with FFMPEG it does not download the audio
3 août 2021, par Thiago FranklinI have a problem, when I try to download an HLS video with FFMPEG, it downloads the video track, but it doesn't find the AUDIO. When running the HLS .m3u8 file in a player, it plays normally, audio and video, but when trying to download, it shows an error message saying that the audio cannot be found.


I'm running the following command :


ffmpeg.exe -i "https://teste-etv.espiritismo.tv/437602.m3u8" -codec:a libmp3lame -b:a 96k teste-hls.mp3


Displays the following error when trying to download the audio :


[hls @ 0000021b5d9ad940] Skip ('#EXT-X-VERSION:3')
[hls @ 0000021b5d9ad940] Skip ('#EXT-X-INDEPENDENT-SEGMENTS')
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-1080p.m3u8' for reading
[hls @ 0000021b5d9ad940] Skip ('#EXT-X-VERSION:3')
[https @ 0000021b5e10ee00] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-720p.m3u8' for reading
[hls @ 0000021b5d9ad940] Skip ('#EXT-X-VERSION:3')
[https @ 0000021b5e10ee00] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-540p.m3u8' for reading
[hls @ 0000021b5d9ad940] Skip ('#EXT-X-VERSION:3')
[https @ 0000021b5e10ee00] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-360p.m3u8' for reading
[hls @ 0000021b5d9ad940] Skip ('#EXT-X-VERSION:3')
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-1080p_00001.ts' for reading
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-1080p_00002.ts' for reading
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-720p_00001.ts' for reading
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-720p_00002.ts' for reading
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-540p_00001.ts' for reading
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-540p_00002.ts' for reading
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-360p_00001.ts' for reading
[hls @ 0000021b5d9ad940] Opening 'https://appsetv.b-cdn.net/hls/437602/437602-360p_00002.ts' for reading
[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 3 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 5 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 7 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, hls, from 'https://appsetv.b-cdn.net/hls/437602/437602.m3u8':
 Duration: 00:01:41.00, start: 2.083333, bitrate: 0 kb/s
 Program 0
 Metadata:
 variant_bitrate : 2509173
 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
 Metadata:
 variant_bitrate : 2509173
 Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp
 Metadata:
 variant_bitrate : 2509173
 Program 1
 Metadata:
 variant_bitrate : 1205957
 Stream #0:2: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
 Metadata:
 variant_bitrate : 1205957
 Stream #0:3: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp
 Metadata:
 variant_bitrate : 1205957
 Program 2
 Metadata:
 variant_bitrate : 1165600
 Stream #0:4: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 960x540 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
 Metadata:
 variant_bitrate : 1165600
 Stream #0:5: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp
 Metadata:
 variant_bitrate : 1165600
 Program 3
 Metadata:
 variant_bitrate : 656245
 Stream #0:6: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 24 fps, 24 tbr, 90k tbn, 48 tbc
 Metadata:
 variant_bitrate : 656245
 Stream #0:7: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp
 Metadata:
 variant_bitrate : 656245
Output #0, mp3, to 'teste-hls.mp3':
Output file #0 does not contain any stream