Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (80)

  • Gestion générale des documents

    13 mai 2011, par

    MédiaSPIP ne modifie jamais le document original mis en ligne.
    Pour chaque document mis en ligne il effectue deux opérations successives : la création d’une version supplémentaire qui peut être facilement consultée en ligne tout en laissant l’original téléchargeable dans le cas où le document original ne peut être lu dans un navigateur Internet ; la récupération des métadonnées du document original pour illustrer textuellement le fichier ;
    Les tableaux ci-dessous expliquent ce que peut faire MédiaSPIP (...)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

Sur d’autres sites (8224)

  • Command is running different from expected when i use it trought Python

    17 septembre 2021, par Gustavo Marinho

    I have a code where i download a youtube video as 3gpp and convert it to a mp3, i need to use FFmpeg to do this, and it work well when using both cmd and powershell, but, when i tried to run the same command in Python, it didin't work at all.

    


    This is my command :

    


    ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3

    


    I tried :

    


    subprocess.call(r'%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3', shell=True)

    


    subprocess.run(["ffmpeg","-i","C:\YTDownloads\CurrentAudio.3gpp","C:\YTDownloads\CurrentAudio.mp3]")


    


    os.system('powershell ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3')


    


    subprocess.run([
    'ffmpeg',
    '-i', os.path.join(parent_dir, f"{newname}.3gpp"),
    os.path.join(parent_dir, f"{newname}.mp3")
]) 


    


    subprocess.call('C:\Windows\System32\powershell.exe ffmpeg -i  C:\YTDownloads\CurrentAudio.3gpp C:\YTDownloads\CurrentAudio.mp3', shell=True)


    


    all of them return some type of error, in some of them it returns that ffmpeg isn't a recognized as a internal command, in others it says that the system can't find the specified path, but none of them works, even thought it works perfectly when i use the exactly same command on cmd/powershell.

    


    sorry for my bad english :3

    


  • Basic to use FFMPEG in Python (Django Rest Framework)

    31 juillet 2018, par Feed Git

    I’m writing a viewset in Django Rest Framework to convert images sequence into video by using FFMPEG but I don’t understand how I can do it. I tried but not success. Please help me with my code.

    My code :

    class VideoRenderSerializer(ModelSerializer):
       imageSequence = ListField(required=False, child=FileField(max_length=100000, allow_empty_file=False, use_url=False))
       class Meta:
           model = Video
           fields = [
               'imageSequence',
           ]

    class VideoRenderView(ModelViewSet):
       queryset = Video.objects.all()
       serializer_class = VideoRenderSerializer

       def render_video(self, request):
           imgSequences = request.FILES.getlist('imageSequence')
           render_from_img_sequences_cmd = 'ffmpeg -loop 1 -i image.png -vf format=yuv420p -t 30 C:\output.mp4'
           ffmpegresult = subprocess.call(render_from_img_sequences_cmd, shell=True, stdout=open(os.devnull, "w"), stderr=subprocess.STDOUT)
           return Response(ffmpegresult, status=200)

    Output is : 1 and I cant find where is output file !

  • ffmpeg php video basic uses and types [theoritical]

    15 mai 2014, par HackerManiac

    Can anyone give a code on how do i covert a video using ffmpeg.

    As thought currently i have only uploading system.

    vu.php(only a part is shown)

    define('UPLOAD','../../videos/');
       $fileName = time().$file['name'];
       $target = UPLOAD.$fileName;

     if(move_uploaded_file($file['tmp_name'],$target)){                
         exec("ffmpeg -i ".UPLOAD." ".UPLOAD.$filename.".flv");
     }

    This pice of code block just uploads the video on video folder but does not converts it to .flv.
    I am not sure how to use ffmpeg.

    My diretory looks like this

    www[localhost]->videos[videos folder]
    www[localhost]->pictures[pictures folder]
    www[localhost]->resources[folder]->php[folder]->vu.php

    I also want to return a .jpg image of any frame of video through json by converting via ffmpeg and uploading it to pictures folder.

    return json_encode(array("thumbnail"=>$image_src));

    UPDATE 1

    The above stuff was solved but now i have a question regarding video conversion.
    Suppose i have a file.avi and i want to convert it in 3 sizes of .flv format -> Low(320p) ,Medium (720p)and HD(1080p)

    what commands will i have to send to shell_exec(); and will that be fast enough ?
    CUrrently what i have is

    $vidSize = "640x480";
    $ffmpeg -i $videoFile -ar 22050 -ab 32 -f flv -s $vidSize $vidFile

    And i am not sure what -ar and -ab means and what value will be good for all those 3 sized videos ?