Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (103)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-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

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP 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 (7571)

  • Download a part of youtube video using a powershell script

    26 octobre 2024, par Nguyễn Đức Minh

    I'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.

    &#xA;

  • ffmpeg download mp3 in chunks slower than whole file

    6 août 2021, par loretoparisi

    I'm programmatically downloading in Python mp3 file's as wav chunks, seeking at position with ss and t with ffmpeg resulting in a sequence of ffmpeg commands

    &#xA;

    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&#xA;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&#xA;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&#xA;...&#xA;

    &#xA;

    executed via concurrent.futures.ThreadPoolExecutor in this way :

    &#xA;

    with concurrent.futures.ThreadPoolExecutor(max_workers=NTHREADS) as executor:&#xA;        for i,cmd in enumerate(process_list):&#xA;            futures.append(executor.submit(downloader.chunk_download,(cmd,i)))&#xA;&#xA;        for future in concurrent.futures.as_completed(futures):&#xA;            try:&#xA;                completed.append(future.result())&#xA;            except Exception as e:print(e)&#xA;    completed.sort() &#xA;    for k,c in enumerate(completed):&#xA;        if not k:&#xA;            waveform = c[1]&#xA;        else:&#xA;            waveform = np.append(waveform,c[1])&#xA;

    &#xA;

    where chunk_download is concat the chunks into the whole waveform

    &#xA;

    def chunk_download(self,args):&#xA;        cmd=args[0]&#xA;        i=args[1]&#xA;        print(&#x27;Downloading chunk n&#xB0; %i&#x27; % i)&#xA;&#xA;        print( &#x27; &#x27;.join(cmd))&#xA;        process = subprocess.run(cmd,&#xA;                            stdout=subprocess.PIPE,&#xA;                            stderr=subprocess.PIPE,&#xA;                            bufsize=10**8)&#xA;        #buffer, stderr = process.communicate()&#xA;        buffer = process.stdout&#xA;        stderr = process.stderr&#xA;        print(&#x27;chunk n&#xB0; %i DOWNLOADED&#x27; % i)&#xA;        # convert to signal&#xA;        chunk_waveform = np.frombuffer(buffer=buffer, dtype=np.uint16, offset=8*44)&#xA;        chunk_waveform = chunk_waveform.astype(self.dtype)  &#xA;        print(len(chunk_waveform)/44100) &#xA;&#xA;        return i,chunk_waveform&#xA;

    &#xA;

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

    &#xA;

    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&#xA;

    &#xA;

    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 ?

    &#xA;

  • When downloading HLS video with FFMPEG it does not download the audio

    3 août 2021, par Thiago Franklin

    I 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.

    &#xA;

    I'm running the following command :

    &#xA;

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

    &#xA;

    Displays the following error when trying to download the audio :

    &#xA;

    [hls @ 0000021b5d9ad940] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0000021b5d9ad940] Skip (&#x27;#EXT-X-INDEPENDENT-SEGMENTS&#x27;)&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-1080p.m3u8&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[https @ 0000021b5e10ee00] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-720p.m3u8&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[https @ 0000021b5e10ee00] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-540p.m3u8&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[https @ 0000021b5e10ee00] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-360p.m3u8&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Skip (&#x27;#EXT-X-VERSION:3&#x27;)&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-1080p_00001.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-1080p_00002.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-720p_00001.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-720p_00002.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-540p_00001.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-540p_00002.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-360p_00001.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Opening &#x27;https://appsetv.b-cdn.net/hls/437602/437602-360p_00002.ts&#x27; for reading&#xA;[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 1 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 3 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 5 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;[hls @ 0000021b5d9ad940] Could not find codec parameters for stream 7 (Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp): unspecified sample rate&#xA;Consider increasing the value for the &#x27;analyzeduration&#x27; and &#x27;probesize&#x27; options&#xA;Input #0, hls, from &#x27;https://appsetv.b-cdn.net/hls/437602/437602.m3u8&#x27;:&#xA;  Duration: 00:01:41.00, start: 2.083333, bitrate: 0 kb/s&#xA;  Program 0&#xA;    Metadata:&#xA;      variant_bitrate : 2509173&#xA;    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&#xA;    Metadata:&#xA;      variant_bitrate : 2509173&#xA;    Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp&#xA;    Metadata:&#xA;      variant_bitrate : 2509173&#xA;  Program 1&#xA;    Metadata:&#xA;      variant_bitrate : 1205957&#xA;    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&#xA;    Metadata:&#xA;      variant_bitrate : 1205957&#xA;    Stream #0:3: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp&#xA;    Metadata:&#xA;      variant_bitrate : 1205957&#xA;  Program 2&#xA;    Metadata:&#xA;      variant_bitrate : 1165600&#xA;    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&#xA;    Metadata:&#xA;      variant_bitrate : 1165600&#xA;    Stream #0:5: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp&#xA;    Metadata:&#xA;      variant_bitrate : 1165600&#xA;  Program 3&#xA;    Metadata:&#xA;      variant_bitrate : 656245&#xA;    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&#xA;    Metadata:&#xA;      variant_bitrate : 656245&#xA;    Stream #0:7: Audio: aac ([15][0][0][0] / 0x000F), 0 channels, fltp&#xA;    Metadata:&#xA;      variant_bitrate : 656245&#xA;Output #0, mp3, to &#x27;teste-hls.mp3&#x27;:&#xA;Output file #0 does not contain any stream&#xA;

    &#xA;