Recherche avancée

Médias (91)

Autres articles (18)

  • 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 (...)

  • Création définitive du canal

    12 mars 2010, par

    Lorsque votre demande est validée, vous pouvez alors procéder à la création proprement dite du canal. Chaque canal est un site à part entière placé sous votre responsabilité. Les administrateurs de la plateforme n’y ont aucun accès.
    A la validation, vous recevez un email vous invitant donc à créer votre canal.
    Pour ce faire il vous suffit de vous rendre à son adresse, dans notre exemple "http://votre_sous_domaine.mediaspip.net".
    A ce moment là un mot de passe vous est demandé, il vous suffit d’y (...)

  • Les tâches Cron régulières de la ferme

    1er décembre 2010, par

    La gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
    Le super Cron (gestion_mutu_super_cron)
    Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)

Sur d’autres sites (3305)

  • FFMPEG failing to convert to ogv [closed]

    25 juillet 2012, par Todd R

    I have several videos I'm trying to convert to mp4, swf and ogv. I've got the mp4 and swf's working, but ogv is failing and I'm not sure why. I understand all the arguments you can pass to ffmpeg, but feel like getting the correct ones is a huge guessing game. Any suggestions on what I can change to get this to work would be much appreciated.

    Here's the command I'm using :

    ffmpeg -i /private/var/tmp/phpU5KPR7 -y -s 330X240 -acodec libvorbis -vcodec libtheora outputpath/Videos/1.ogv 2>&1

    And here are the results :

    2012-07-24T19:05:11-07:00 INFO (6): Creating ogv for 1 returned 1:
    2012-07-24T19:05:11-07:00 INFO (6): Array
    (
       [0] => ffmpeg version 0.8.6, Copyright (c) 2000-2011 the FFmpeg developers
       [1] =>   built on Nov 16 2011 19:56:59 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
       [2] =>   configuration: --enable-libmp3lame --enable-libfaac --enable-libtheora --enable-libvorbis --enable-nonfree --disable-yasm
       [3] =>   libavutil    51.  9. 1 / 51.  9. 1
       [4] =>   libavcodec   53.  7. 0 / 53.  7. 0
       [5] =>   libavformat  53.  4. 0 / 53.  4. 0
       [6] =>   libavdevice  53.  1. 1 / 53.  1. 1
       [7] =>   libavfilter   2. 23. 0 /  2. 23. 0
       [8] =>   libswscale    2.  0. 0 /  2.  0. 0
       [9] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/private/var/tmp/phpU5KPR7':
       [10] =>   Metadata:
       [11] =>     major_brand     : 3gp4
       [12] =>     minor_version   : 768
       [13] =>     compatible_brands: 3gp43gp6
       [14] =>   Duration: 00:00:03.17, start: 0.000000, bitrate: 433 kb/s
       [15] =>     Stream #0.0(eng): Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s
       [16] =>     Stream #0.1(eng): Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 411 kb/s, 13.87 fps, 15 tbr, 15k tbn, 15 tbc
       [17] => WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s
       [18] => Incompatible sample format 'flt' for codec 'libfaac', auto-selecting format 's16'
       [19] => [buffer @ 0x101001480] w:352 h:288 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
       [20] => [scale @ 0x101002560] w:352 h:288 fmt:yuv420p -> w:330 h:240 fmt:yuv420p flags:0x4
       [21] => Output #0, mp4, to 'outputpath/Videos/1.mp4':
       [22] =>   Metadata:
       [23] =>     major_brand     : 3gp4
       [24] =>     minor_version   : 768
       [25] =>     compatible_brands: 3gp43gp6
       [26] =>     encoder         : Lavf53.4.0
       [27] =>     Stream #0.0(eng): Video: mpeg4, yuv420p, 330x240 [PAR 8:9 DAR 11:9], q=2-31, 300 kb/s, 20 tbn, 20 tbc
       [28] =>     Stream #0.1(eng): Audio: libfaac, 44100 Hz, 1 channels, s16, 0 kb/s
       [29] => Stream mapping:
       [30] =>   Stream #0.1 -> #0.0
       [31] =>   Stream #0.0 -> #0.1
       [32] => Press [q] to stop, [?] for help
       [33] => Warning, using s16 intermediate sample format for resampling
       [34] => frame=   62 fps=  0 q=6.4 Lsize=     253kB time=00:00:03.08 bitrate= 670.6kbits/s dup=18 drop=0
       [35] => video:238kB audio:12kB global headers:0kB muxing overhead 1.096923%
       [36] => ffmpeg version 0.8.6, Copyright (c) 2000-2011 the FFmpeg developers
       [37] =>   built on Nov 16 2011 19:56:59 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
       [38] =>   configuration: --enable-libmp3lame --enable-libfaac --enable-libtheora --enable-libvorbis --enable-nonfree --disable-yasm
       [39] =>   libavutil    51.  9. 1 / 51.  9. 1
       [40] =>   libavcodec   53.  7. 0 / 53.  7. 0
       [41] =>   libavformat  53.  4. 0 / 53.  4. 0
       [42] =>   libavdevice  53.  1. 1 / 53.  1. 1
       [43] =>   libavfilter   2. 23. 0 /  2. 23. 0
       [44] =>   libswscale    2.  0. 0 /  2.  0. 0
       [45] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/private/var/tmp/phpU5KPR7':
       [46] =>   Metadata:
       [47] =>     major_brand     : 3gp4
       [48] =>     minor_version   : 768
       [49] =>     compatible_brands: 3gp43gp6
       [50] =>   Duration: 00:00:03.17, start: 0.000000, bitrate: 433 kb/s
       [51] =>     Stream #0.0(eng): Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s
       [52] =>     Stream #0.1(eng): Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 411 kb/s, 13.87 fps, 15 tbr, 15k tbn, 15 tbc
       [53] => Incompatible sample format 'flt' for codec 'libvorbis', auto-selecting format 's16'
       [54] => [buffer @ 0x1010021a0] w:352 h:288 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
       [55] => [scale @ 0x101002520] w:352 h:288 fmt:yuv420p -> w:330 h:240 fmt:yuv420p flags:0x4
       [56] => [libvorbis @ 0x101801e00] oggvorbis_encode_init: init_encoder failed
       [57] => Output #0, ogg, to 'outputpath/Videos/1.ogv':
       [58] =>     Stream #0.0(eng): Video: libtheora, yuv420p, 330x240 [PAR 8:9 DAR 11:9], q=2-31, 200 kb/s, 90k tbn, 15 tbc
       [59] =>     Stream #0.1(eng): Audio: libvorbis, 8000 Hz, 1 channels, s16, 64 kb/s
       [60] => Stream mapping:
       [61] =>   Stream #0.1 -> #0.0
       [62] =>   Stream #0.0 -> #0.1
       [63] => Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
    )
  • FFMPEG:Merging Audio(.mp3) and single image convert them into a Video

    5 juin 2013, par Nitish Singla

    I want to merge IMAGE + AUDIO and convert them into video using FFMPEG library,i compiled the library successfully,and got libfmpeg.so.but getting problem to execute the ffmpeg command through java code.This is command which i am using...
    "ffmpeg -i image8.jpg -i file.m4a -acodec copy test.mp4"
    if i execute this ffmpeg command through CMD,my video.mp4 file is successfully created,but if exceute same command through my Activity,it doesnot create any file.

    MY CODE IS :

    public class Mpeg extends Activity

    static {

       System.loadLibrary("ffmpeg");

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_mpeg);

    File mf = Environment.getExternalStorageDirectory() ;

       String livestream = mf.getAbsoluteFile()+"smile.png";

       String folderpth = mf.getAbsoluteFile()+"RABBA.MP3";

       //String output="/home/saicomputer/game.mp4";

       String output = new File(Environment.getExternalStorageDirectory(), "video.mp4").getAbsolutePath();
       Log.i("Test", "Let's set output to " + output);

       String cmd="ffmpeg -i "+ livestream +" -i "+ folderpth +" -acodec copy "+ output;

        Log.e("chck plzzzzz", "after "+ cmd);

       //String jaiho="ffmpeg -i image8.jpg -i file.m4a -acodec copy test.mp4";

       try{

       Process p = Runtime.getRuntime().exec(cmd);

       }
    catch(Exception e)
    {
       System.out.println("exception"+e);
    }
    enter code here
    CONSOLE OUTPUT-
    06-05 17:58:11.466: E/image(1189): imageeeeeeeee /mnt/sdcard/smile.png
    06-05 17:58:11.466: E/Test(1189): songggggggggg /mnt/sdcard/RABBA.MP3
    06-05 17:58:11.476: E/Test(1189): outputttttt /mnt/sdcard/video.mp4
    06-05 17:58:11.476: E/chck plzzzzz(1189): after ffmpeg -i /mnt/sdcard/smile.png -i      /mnt/sdcard/RABBA.MP3 -acodec copy /mnt/sdcard/video.mp4

    enter code here
    06-05 17:58:10.686: D/dalvikvm(1189): Trying to load lib /data/data/com.example.myfmpeg /lib/libffmpeg.so 0x412a5cf0
    06-05 17:58:10.756: I/dalvikvm(1189): threadid=3: reacting to signal 3
    06-05 17:58:10.955: D/dalvikvm(1189): Added shared lib /data/data/com.example.myfmpeg/lib/libffmpeg.so 0x412a5cf0
    06-05 17:58:10.955: D/dalvikvm(1189): No JNI_OnLoad found in /data/data/com.example.myfmpeg/lib/libffmpeg.so 0x412a5cf0, skipping init
    06-05 17:58:11.024: I/dalvikvm(1189): Wrote stack traces to '/data/anr/traces.txt'
    06-05 17:58:11.215: I/dalvikvm(1189): threadid=3: reacting to signal 3
    06-05 17:58:11.326: I/dalvikvm(1189): Wrote stack traces to '/data/anr/traces.txt'
    06-05 17:58:11.466: E/image(1189): imageeeeeeeee /mnt/sdcard/smile.png
    06-05 17:58:11.466: E/Test(1189): songggggggggg /mnt/sdcard/RABBA.MP3
    06-05 17:58:11.476: E/Test(1189): outputttttt /mnt/sdcard/video.mp4
    06-05 17:58:11.476: E/chck plzzzzz(1189): after ffmpeg -i /mnt/sdcard/smile.png -i /mnt/sdcard/RABBA.MP3 -acodec copy /mnt/sdcard/video.mp4
    0 6-05 17:58:11.896: E/AndroidRuntime(1189): FATAL EXCEPTION: main
    06-05 17:58:11.896: E/AndroidRuntime(1189): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myfmpeg/com.example.myfmpeg.Mpeg}: java.lang.RuntimeException: java.io.IOException: Error running exec(). Command: [ffmpeg, -i, /mnt/sdcard/smile.png, -i, /mnt/sdcard/RABBA.MP3, -acodec, copy, /mnt/sdcard/video.mp4] Working Directory: null Environment: null
    06-05 17:58:11.896: E/AndroidRuntime(1189):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
    06-05 17:58:11.896: E/AndroidRuntime(1189):     at
    06-05 17:58:11.896: E/AndroidRuntime(1189): Caused by: java.lang.RuntimeException: java.io.IOException: Error running exec(). Command: [ffmpeg, -i, /mnt/sdcard/smile.png, -i, /mnt/sdcard/RABBA.MP3, -acodec, copy, /mnt/sdcard/video.mp4] Working Directory: null       Environment: null
  • Merge video with ffmpeg(or alternatives) with extra properties(an overlay)

    28 juin 2021, par dconixDev

    I'll be scraping clips from twitch and merging them to create a single video file.
I already figured out the scraping of twitch clip links(but i only get 16-20 videos because i need to scroll with selenium but i dont really mind it, if you have a working solution then make an answer about it) and also the simple merging videos.

    


    I'm scraping links with :

    


    #!/usr/bin/python3.9
import bs4
import requests
import time
from datetime import datetime
from selenium import webdriver
from selenium.webdriver.firefox.options import Options

# Initialize driver and run it headless
options = Options()
options.headless = True
driver = webdriver.Firefox(options=options)

def extract_source(url):
     agent = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0"}
     source=requests.get(url, headers=agent).text
     return source

def extract_data(source):
     soup=bs4.BeautifulSoup(source, 'html.parser')
     names=soup.find_all('a', attrs={'data-a-target':'preview-card-image-link'})
     return names

driver.get('https://www.twitch.tv/directory/game/League%20of%20Legends/clips?range=24hr')

# I wait 3 seconds for the clips to get pulled in
# I'd like here to scroll down a bit so i can scrape more clips, but even after i tried some solutions my firefox(was debugging in GUI mode, not headless as it is now) wasnt scrolling
time.sleep(3)
extract_links=extract_data(driver.page_source)
for a in extract_links:
    print(a.get('href'))

driver.quit()

# I tried scrolling using this but didnt work, not sure why
# this script is supposed to scroll until youre at the end of the page
# SCROLL_PAUSE_TIME = 0.5

# # Get scroll height
# last_height = driver.execute_script("return document.body.scrollHeight")

# for i in range(3):
    # # Scroll down to bottom
    # driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")

    # # Wait to load page
    # time.sleep(SCROLL_PAUSE_TIME)

    # # Calculate new scroll height and compare with last scroll height
    # new_height = driver.execute_script("return document.body.scrollHeight")
    # if new_height == last_height:
        # break
    # last_height = new_height


    


    I'm joining videos together after downloading(with youtube-dl) with ffmpeg :

    


    ffmpeg -safe 0 -f concat -segment_time_metadata 1 -i videos.txt -vf select=concatdec_select -af aselect=concatdec_select,aresample=async=1 out.mp4

    


    Where videos.txt is as follows :

    


    file 'video_file1.mp4'
file 'video_file2.mp4'
...


    


    I can't really find answers on how to add a watermark(different for each video, although i found this it doesnt explain how to add a unique watermark to individual videos but the same watermark to two videos) without having to render each and every video twice but doing so in one go.

    


    I think I stumbled upon some people who made their videos.txt as follows in purpose of adding extra options to each video :

    


    file 'video_file1.mp4'
option 1(for video_file1.mp4)
option 2(for video_file1.mp4)
file 'video_file2.mp4'
option 1(for video_file2.mp4)
option 2(for video_file2.mp4)
...


    


    Would this work for unique watermarks for each videos(lets suppose watermarks are named video_file1.png, ... meaning the same as the videos, also the watermark is transparent in case that needs more configuration)