Recherche avancée

Médias (0)

Mot : - Tags -/utilisateurs

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (106)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (8459)

  • Anomalie #3299 : Génération d’urls en boucle avec noms d’objets longs

    16 octobre 2014, par Guillaume Fahrner

    Je pense que c’est plus un soucis d’implémentation qu’autre chose. J’ai réglé mon problème de la manière suivante :

    1) implémenter le pipeline objet_compte_enfants pour l’objet concerné, dans mon cas

    /**
     * Compte intégrant les challenge dans le nombre d’objet d’une rubrique
     */
    function ctf_alltheday_objet_compte_enfants($flux) 
    

    if ($flux[’args’][’objet’] == ’rubrique’)
    $flux[’data’][’machines_virtuelles’] = sql_countsel(
    ’spip_machines_virtuelles’,
    array(
    ’id_rubrique = ’.intval($flux[’args’][’id_objet’])
    )
    ) ;

    return $flux ;

    2) ajouter la configuration adéquate a la configuration des URLs choisi, dans mon cas :

    $GLOBALS[’url_arbo_parents’]=array(’challenge’=>array(’id_rubrique’,’rubrique’)) ;
    $GLOBALS[’url_arbo_types’]=array_merge($GLOBALS[’url_arbo_types’], array(’challenge’=>’’, ’solution’=>’’)) ;

    Une fois la "configuration" mise en place correctement : plus aucun soucis ,-)

  • FFmpeg error while converting from MP4 to MP3 in Python

    4 février 2024, par Jack142

    When I try to convert videos from a YouTube playlist, it gives me an error :

    


    


    File "C :\Users\fonti\AppData\Local\Programs\Python\Python310\lib\site-packages\ffmpy.py", line 106, in run
raise FFRuntimeError(self.cmd, self.process.returncode, out[0], out[1])
ffmpy.FFRuntimeError : C:/ffmpeg/bin/ffmpeg.exe -i "Nightcore - To Be Human // lyrics.mp4" "Nightcore - To Be Human // lyrics.mp3" exited with status 1

    


    


    The code I'm using :

    


    from pytube import Playlist
import ffmpy
from ffmpy import FFmpeg

playlistLink = input("Introduz o link da Playlist: ")
playlist = Playlist(playlistLink)   

diretório = 'E'
while diretório != 'M' and diretório != 'V':
    diretório = input("Vais baixar música ou vídeos? (M/V)")
    if diretório == 'M':
        downloadDirectory = "C:/Users/fonti/Documents/Projetos Python/Youtube/Músicas"
    elif diretório == 'V':
        downloadDirectory = "C:/Users/fonti/Documents/Projetos Python/Youtube/Vídeos"

print("Número total de vídeos a baixar: ", len(playlist.video_urls))    

print("\n\n Links dos vídeos:\n")

for url in playlist.video_urls:
    print(url) 

def MP3():
    for video in playlist.videos:

        audio = video.streams.get_audio_only()
    
        audio.download(downloadDirectory)

        videoTitle = video.title
    
        new_filename = videoTitle + '.mp3'
        default_filename = videoTitle + '.mp4'
    
        print(default_filename+'\n\n'+new_filename)

        ff = ffmpy.FFmpeg(
            executable = 'C:/ffmpeg/bin/ffmpeg.exe',
            inputs={default_filename : None},
            outputs={new_filename : None}
        )
        ff.run()


def MP4():
    for video in playlist.videos:
        print('Downloading : {} with url : {}'.format(video.title, video.watch_url))
        video.streams.\
            filter(type='video', progressive=True, file_extension='mp4').\
            order_by('resolution').\
            desc().\
            first().\
            download(downloadDirectory)

escolha = 'E'
while escolha != 'V' and escolha != 'A':
    escolha = input("Queres formato de vídeo ou áudio (V/A)? ")
    if escolha == 'V':
        MP4()
    elif escolha == 'A':
        MP3()
    else:
        print("Escolha inválida")


    


    If I try to download the videos from the playlist, it works fine. But when I try to download the audios, it gives me the error.

    


  • ffmpeg -master_pl_name grabbing the correct codec

    10 juin 2020, par user1503606

    I am using the following ffmpeg command to generate my hls playlist with the FFmpeg option -master_pl_name set.

    



    ffmpeg -i becky.mov \
-i becky.mov \
-i becky.mov \
-i becky.mov \
-s:v:0 1920x1080 -c:v:0 libx264 -b:v:0 4000k \
-s:v:1 1280x720 -c:v:1 libx264 -b:v:1 2000k \
-s:v:2 854x480 -c:v:2 libx264 -b:v:2 1000k \
-s:v:3 640x360 -c:v:3 libx264 -b:v:3 600k \
-c:a:0 copy \
-map 0:a -map 0:v -map 1:v -map 2:v -map 3:v \
-var_stream_map "a:0,agroup:audio v:0,agroup:audio v:1,agroup:audio v:2,agroup:audio v:3,agroup:audio" \
-threads 0 -f hls -movflags frag_keyframe -hls_flags single_file+independent_segments \
-hls_segment_type fmp4 -hls_list_size 0 -hls_time 10 -hls_allow_cache 1 \
-master_pl_name master.m3u8 -y burnt/demo2/list_%v/master.m3u8


    



    This is fine and will give me a master.m3u8 file that looks like this.

    



    #EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=1047200,RESOLUTION=640x272,CODECS="avc1.4d4815,mp4a.40.2"
pl_0.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1788600,RESOLUTION=842x358,CODECS="avc1.4d481e,mp4a.40.2"
pl_1.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3436400,RESOLUTION=1280x544,CODECS="avc1.4d481f,mp4a.40.2"
pl_2.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=6096200,RESOLUTION=1920x816,CODECS="avc1.4d4828,mp4a.40.2"
pl_3.m3u8


    



    The problem that I have is I need to generate my master.m3u8 file manually as I am also generating subtitles and audio description groups. I am using ffprobe to do this.

    



    But I am not sure how to get the CODECS="avc1.4d4815,mp4a.40.2" value to then insert it into my master.m3u8 file.

    



    My ffprobe output doesn't seem to give any of that information here is the full output.

    



    {
    "streams": [{
            "index": 0,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Main",
            "codec_type": "video",
            "codec_time_base": "1001/48000",
            "codec_tag_string": "[27][0][0][0]",
            "codec_tag": "0x001b",
            "width": 640,
            "height": 272,
            "coded_width": 640,
            "coded_height": 272,
            "has_b_frames": 2,
            "pix_fmt": "yuv420p",
            "level": 21,
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "false",
            "nal_length_size": "0",
            "r_frame_rate": "24000/1001",
            "avg_frame_rate": "24000/1001",
            "time_base": "1/90000",
            "start_pts": 7508,
            "start_time": "0.083422",
            "bits_per_raw_sample": "8",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "800000"
            }
        },
        {
            "index": 1,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "[15][0][0][0]",
            "codec_tag": "0x000f",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/90000",
            "start_pts": 5588,
            "start_time": "0.062089",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "800000"
            }
        },
        {
            "index": 2,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Main",
            "codec_type": "video",
            "codec_time_base": "1001/48000",
            "codec_tag_string": "[27][0][0][0]",
            "codec_tag": "0x001b",
            "width": 842,
            "height": 358,
            "coded_width": 848,
            "coded_height": 368,
            "has_b_frames": 2,
            "pix_fmt": "yuv420p",
            "level": 30,
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "false",
            "nal_length_size": "0",
            "r_frame_rate": "24000/1001",
            "avg_frame_rate": "24000/1001",
            "time_base": "1/90000",
            "start_pts": 7508,
            "start_time": "0.083422",
            "bits_per_raw_sample": "8",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "1400000"
            }
        },
        {
            "index": 3,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "[15][0][0][0]",
            "codec_tag": "0x000f",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/90000",
            "start_pts": 5588,
            "start_time": "0.062089",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "1400000"
            }
        },
        {
            "index": 4,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Main",
            "codec_type": "video",
            "codec_time_base": "1001/48000",
            "codec_tag_string": "[27][0][0][0]",
            "codec_tag": "0x001b",
            "width": 1280,
            "height": 544,
            "coded_width": 1280,
            "coded_height": 544,
            "has_b_frames": 2,
            "pix_fmt": "yuv420p",
            "level": 31,
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "false",
            "nal_length_size": "0",
            "r_frame_rate": "24000/1001",
            "avg_frame_rate": "24000/1001",
            "time_base": "1/90000",
            "start_pts": 7508,
            "start_time": "0.083422",
            "bits_per_raw_sample": "8",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "2800000"
            }
        },
        {
            "index": 5,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "[15][0][0][0]",
            "codec_tag": "0x000f",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/90000",
            "start_pts": 5588,
            "start_time": "0.062089",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "2800000"
            }
        },
        {
            "index": 6,
            "codec_name": "h264",
            "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
            "profile": "Main",
            "codec_type": "video",
            "codec_time_base": "1001/48000",
            "codec_tag_string": "[27][0][0][0]",
            "codec_tag": "0x001b",
            "width": 1920,
            "height": 816,
            "coded_width": 1920,
            "coded_height": 816,
            "has_b_frames": 2,
            "pix_fmt": "yuv420p",
            "level": 40,
            "chroma_location": "left",
            "refs": 1,
            "is_avc": "false",
            "nal_length_size": "0",
            "r_frame_rate": "24000/1001",
            "avg_frame_rate": "24000/1001",
            "time_base": "1/90000",
            "start_pts": 7508,
            "start_time": "0.083422",
            "bits_per_raw_sample": "8",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "5000000"
            }
        },
        {
            "index": 7,
            "codec_name": "aac",
            "codec_long_name": "AAC (Advanced Audio Coding)",
            "profile": "LC",
            "codec_type": "audio",
            "codec_time_base": "1/48000",
            "codec_tag_string": "[15][0][0][0]",
            "codec_tag": "0x000f",
            "sample_fmt": "fltp",
            "sample_rate": "48000",
            "channels": 2,
            "channel_layout": "stereo",
            "bits_per_sample": 0,
            "r_frame_rate": "0/0",
            "avg_frame_rate": "0/0",
            "time_base": "1/90000",
            "start_pts": 5588,
            "start_time": "0.062089",
            "disposition": {
                "default": 0,
                "dub": 0,
                "original": 0,
                "comment": 0,
                "lyrics": 0,
                "karaoke": 0,
                "forced": 0,
                "hearing_impaired": 0,
                "visual_impaired": 0,
                "clean_effects": 0,
                "attached_pic": 0,
                "timed_thumbnails": 0
            },
            "tags": {
                "variant_bitrate": "5000000"
            }
        }
    ],
    "format": {
        "filename": "master.m3u8",
        "nb_streams": 8,
        "nb_programs": 4,
        "format_name": "hls",
        "format_long_name": "Apple HTTP Live Streaming",
        "start_time": "0.062089",
        "duration": "169.180238",
        "size": "575",
        "bit_rate": "27",
        "probe_score": 100
    }
}


    



    Can someone point me in the right direction ?

    



    Thanks