Recherche avancée

Médias (91)

Autres articles (62)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

  • Participer à sa traduction

    10 avril 2011

    Vous pouvez nous aider à améliorer les locutions utilisées dans le logiciel ou à traduire celui-ci dans n’importe qu’elle nouvelle langue permettant sa diffusion à de nouvelles communautés linguistiques.
    Pour ce faire, on utilise l’interface de traduction de SPIP où l’ensemble des modules de langue de MediaSPIP sont à disposition. ll vous suffit de vous inscrire sur la liste de discussion des traducteurs pour demander plus d’informations.
    Actuellement MediaSPIP n’est disponible qu’en français et (...)

Sur d’autres sites (10174)

  • How does ffprobe determine duration ?

    10 janvier 2019, par jasongullickson

    I’m using ffprobe to analyze media files stored on a remote server. This seems to work well, but for some files the duration is missing or incorrect (usually longer than it should be). Other times it returns this information accurately, and it doesn’t seem to be related to the media type (codec, etc.).

    Here’s an example of a command that works :

    ffprobe -v quiet -print_format json -show_streams -show_format http://host.com/file.aiff

    {
    "streams": [
       {
           "index": 0,
           "codec_name": "pcm_s16be",
           "codec_long_name": "PCM signed 16-bit big-endian",
           "codec_type": "audio",
           "codec_time_base": "1/44100",
           "codec_tag_string": "[0][0][0][0]",
           "codec_tag": "0x0000",
           "sample_fmt": "s16",
           "sample_rate": "44100",
           "channels": 2,
           "bits_per_sample": 16,
           "r_frame_rate": "0/0",
           "avg_frame_rate": "0/0",
           "time_base": "1/44100",
           "start_pts": 0,
           "start_time": "0.000000",
           "duration_ts": 8494248,
           "duration": "192.613333",
           "bit_rate": "1411200",
           "nb_frames": "8494248",
           "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
           }
       }
    ],
    "format": {
       "filename": "http://host.com/file.aiff",
       "nb_streams": 1,
       "nb_programs": 0,
       "format_name": "aiff",
       "format_long_name": "Audio IFF",
       "start_time": "0.000000",
       "duration": "192.613333",
       "probe_score": 100
    }
    }

    Here’s an example of one that doesn’t :

    ffprobe -v quiet -print_format json -show_streams -show_format "http://host.com/file.wav"

    Which generates this result :

    {
    "streams": [
       {
           "index": 0,
           "codec_name": "pcm_s16le",
           "codec_long_name": "PCM signed 16-bit little-endian",
           "codec_type": "audio",
           "codec_time_base": "1/44100",
           "codec_tag_string": "[1][0][0][0]",
           "codec_tag": "0x0001",
           "sample_fmt": "s16",
           "sample_rate": "44100",
           "channels": 2,
           "bits_per_sample": 16,
           "r_frame_rate": "0/0",
           "avg_frame_rate": "0/0",
           "time_base": "1/44100",
           "bit_rate": "1411200",
           "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
           }
       }
    ],
    "format": {
       "filename": "http://host.com/file.wav",
       "nb_streams": 1,
       "nb_programs": 0,
       "format_name": "wav",
       "format_long_name": "WAV / WAVE (Waveform Audio)",
       "bit_rate": "1411200",
       "probe_score": 99
    }
    }

    These two examples are different formats, but I’ve seen it work and not work when the format is the same, I just don’t have an example handy.

    What I’d like to know is if there is something I can change about the parameters I’m using with ffprobe to allow the duration to be determined consistently and accurate, or any information I can find as to how ffprobe works so I figure out how I might change the input files, etc. so they work correctly.

    Alternatively, if there is a different tool that works more reliably (it would need to be an open-source Linux tool) any suggestions or recommendations are welcome.

  • 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 produces "is_avc" = false with h264_nvenc & tee muxer

    14 août 2018, par Areeb111

    I am using ffmpeg for encoding MKV (Matroska Video files) to 2x MP4 (H264 - 720p Main@L4) & (H264 - 360p Baseline@L3.1).

    Having really strange problem when using -c:v h264_nvenc and tee muxer then the produced output file is having is_avc=false even i have checked the same input matroska file with another server running with Intel QuickSync -c:v h264_qsv with the same command then the produced output file is is_avc=true.

    The main goal that i want the is_avc=true is because the files must be played using nginx-vod-module which requires the AVC video format to be streamed.

    Steps to reproduce the problem :

    • Custom ffmpeg build with NVENC support ffmpeg version N-91182-gbdf1bbd Copyright (c) 2000-2018 the FFmpeg developers   built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
    • ffprobe version 4.0.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2018 the FFmpeg developers
    • Running ffmpeg command line with NVENC and tee muxer
      /root/ffmpeg  -y -t 00:00:50 -i "testinput.mkv" -filter_complex "[0:v]split=2[s0][s1];[s0]scale=-2:720[v0];[s1]scale=-2:360[v1]" -map "[v0]" -map "[v1]" -map 0:a -c:v h264_nvenc -b:v:0 1100k -b:v:1 600k -profile:v:0 main -profile:v:1 baseline -level:v:0 4 -level:v:1 3.1 -ac 2 -c:a aac -b:a 128k -af "aresample=async=1000:first_pts=0"  -f tee "[select=\'v:0,a\']testoutput.mp4|[select=\'v:1,a\']testoutput-360.mp4"
    • Running ffprobe for the output file to check "is_avc" :
      ./ffprobe -v quiet -print_format json -show_format -show_streams testoutput.mp4
    • My current ffprobe output results are :

      ./ffprobe -v quiet -print_format json -show_format -show_streams testoutput.mp4
      {
         "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": "avc1",
                 "codec_tag": "0x31637661",
                 "width": 1280,
                 "height": 720,
                 "coded_width": 1280,
                 "coded_height": 720,
                 "has_b_frames": 0,
                 "sample_aspect_ratio": "1:1",
                 "display_aspect_ratio": "16:9",
                 "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/24000",
                 "start_pts": 984,
                 "start_time": "0.041000",
                 "duration_ts": 1201200,
                 "duration": "50.050000",
                 "bit_rate": "845035",
                 "bits_per_raw_sample": "8",
                 "nb_frames": "1199",
                 "disposition": {
                     "default": 1,
                     "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": {
                     "language": "und",
                     "handler_name": "VideoHandler"
                 }
             },
             {
                 "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": "mp4a",
                 "codec_tag": "0x6134706d",
                 "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/48000",
                 "start_pts": 0,
                 "start_time": "0.000000",
                 "duration_ts": 2401488,
                 "duration": "50.031000",
                 "bit_rate": "129153",
                 "max_bit_rate": "129153",
                 "nb_frames": "2346",
                 "disposition": {
                     "default": 1,
                     "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": {
                     "language": "ger",
                     "handler_name": "SoundHandler"
                 }
             }
         ],
         "format": {
             "filename": "Leonmusssterben20171080p.mp4",
             "nb_streams": 2,
             "nb_programs": 0,
             "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
             "format_long_name": "QuickTime / MOV",
             "start_time": "0.000000",
             "duration": "50.031000",
             "size": "6116472",
             "bit_rate": "978029",
             "probe_score": 100,
             "tags": {
                 "major_brand": "isom",
                 "minor_version": "512",
                 "compatible_brands": "isomiso2avc1mp41",
                 "encoder": "Lavf58.17.100"
             }
         }
      }

    Please anyone can help me why is the output video file is getting "is_avc=false" ?

    Is there any option to force it ?

    Thank you