Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (53)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Les notifications de la ferme

    1er décembre 2010, par

    Afin d’assurer une gestion correcte de la ferme, il est nécessaire de notifier plusieurs choses lors d’actions spécifiques à la fois à l’utilisateur mais également à l’ensemble des administrateurs de la ferme.
    Les notifications de changement de statut
    Lors d’un changement de statut d’une instance, l’ensemble des administrateurs de la ferme doivent être notifiés de cette modification ainsi que l’utilisateur administrateur de l’instance.
    À la demande d’un canal
    Passage au statut "publie"
    Passage au (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

Sur d’autres sites (6575)

  • FFMPEG API : How to connect to RTSP stream using av_open_input_file ?

    10 novembre 2011, par Alex

    I'm trying to connect to some RTSP stream using av_open_input_file() like this :

    AVFormatContext* ic;
    avcodec_register_all();
    av_register_all();
    av_open_input_file(&ic, "rtsp://login:password@xxx.xxx.xxx.xxx/videoinput_1/mjpeg/media.stm", NULL, 4096, NULL);

    It always returns 'file not found'. The same url, though, I can see in, say, VLC player. Do I do something wrong in my code ?

    I'm using FFMPEG 0.6, shall I use the latest instead ?

  • Copy live stream without overwrite previous file

    2 février 2020, par Panagiotis

    When I login I automatically start a script, that downloads a radio stream with ffmpeg.

    ffmpeg -i \
    http://139.162.14.151:9090 \
    -c copy output.mp3

    But each time it is asking me to overwrite the file. I want it to automatically create a new file without overwriting the previous one.

  • Encoded Video's path gets changed in database after encoding with ffmpeg and celery and works as normal without celery

    16 novembre 2020, par Danny

    I have this code to transcode video and it works well without celery. With celery, the path of the file in the database shows a different path and the video cannot be played in the browser, but it saves the file in the correct location in the pc.

    


    If I don't use celery, then the file path in database is media/videos/videos/<filename>.mp4</filename> and file also gets saved here. This way the template is able to play the video. But if I use celery, the output gets saved in media/videos/videos/<filename>.mp4</filename> but the path in database will be media/<filename>.mp4</filename> somehow and thus template can't play the video.

    &#xA;

    Is it because my page gets updated before the task ? and not getting saved properly ?

    &#xA;

    views.py

    &#xA;

    def post(self, *args, **kwargs):&#xA;    form = VideoPostForm(self.request.POST or None, self.request.FILES or None)&#xA;    if form.is_valid():&#xA;        video = form.save(commit=False)&#xA;        video.user = self.request.user&#xA;        video.save()&#xA;        form.save_m2m()&#xA;        # task_video_encoding(video.id)&#xA;        task_video_encoding.delay(video.id)&#xA;        return redirect(&#x27;videos:my_video_home&#x27;)&#xA;    else:&#xA;        raise ValidationError(&#x27;Check all form fields.&#x27;)&#xA;

    &#xA;

    encoding.py

    &#xA;

    def encode_video(video_id):&#xA;    video = VideoPost.objects.get(id = video_id)&#xA;    input_file_path = video.temp_file.path&#xA;    # print(input_file_path)&#xA;    input_file_name = video.title&#xA;    #get the filename (without extension)&#xA;    filename = os.path.basename(input_file_path)&#xA;    # print(filename)&#xA;    # path to the new file, change it according to where you want to put it&#xA;    output_file_name = os.path.join(&#x27;{}.mp4&#x27;.format(filename))&#xA;    # print(output_file_name)&#xA;    # output_file_path = os.path.join(settings.MEDIA_ROOT, output_file_name)&#xA;    output_file_path = os.path.join(settings.MEDIA_ROOT, &#x27;videos&#x27;, &#x27;videos&#x27;, output_file_name)&#xA;    # print(output_file_path)&#xA;&#xA;    for i in range(1):&#xA;        subprocess.call([settings.VIDEO_ENCODING_FFMPEG_PATH, &#x27;-i&#x27;, input_file_path, &#x27;-codec:v&#x27;, &#x27;libx264&#x27;, &#x27;-crf&#x27;, &#x27;-preset&#x27;,&#xA;                    &#x27;-b:v&#x27;, &#x27;3000k&#x27;, &#x27;-maxrate&#x27;, &#x27;-bufsize&#x27;, &#x27;6000k&#x27;, &#x27;-vf&#x27;, &#x27;scale=-2:720&#x27;,&#xA;                    &#x27;-codec:a&#x27;, &#x27;aac&#x27;, &#x27;128k&#x27;, &#x27;-strict&#x27;, &#x27;-2&#x27;, output_file_path])&#xA;    # Save the new file in the database&#xA;    video.file = output_file_name&#xA;    video.save(update_fields=[&#x27;file&#x27;])&#xA;    print(video.file)&#xA;    video.temp_file.delete()&#xA;

    &#xA;

    models

    &#xA;

    class VideoPost(models.Model):&#xA;    user                = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, blank=True, null=True)&#xA;    title               = models.TextField(max_length=1000)&#xA;    temp_file           = models.FileField(upload_to=&#x27;videos/temp_videos/&#x27;, validators=[validate_file_extension], null=True)&#xA;    file                = models.FileField(upload_to=&#x27;videos/videos/&#x27;, validators=[validate_file_extension], blank=True, max_length=255)&#xA;    post_date           = models.DateTimeField(auto_now_add=True, verbose_name="Date Posted")&#xA;    updated             = models.DateTimeField(auto_now_add=True, verbose_name="Date Updated")&#xA;    slug                = models.SlugField(blank=True, unique=True, max_length=255)&#xA;

    &#xA;

    Can anyone help me how to change this code in a way to show the converted video properly in the template.

    &#xA;