Recherche avancée

Médias (1)

Mot : - Tags -/swfupload

Autres articles (111)

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

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

Sur d’autres sites (12514)

  • FFMPEG : i need audio channels 7 & 8 to be the main audio track for a video

    10 avril 2013, par lo_fye

    I have a video with 8 channels of audio.

    I need tracks 7 (Left Stereo) and 8 (Right Stereo) to be the audio for the video (which I'm converting to flv).

    I've tried playing with -filter_complex and the join, amix, and amerge filters, as well as the -map parameter, but I can't seem to find the right combination of values :-/

    Output :

    /usr/local/bin/ffmpeg-1.0/bin/ffmpeg -i '/folder/video_name.mov' -f 'flv' \
    -s '320x240' -b '250k' -aspect '4:3' -ac 1 -ab '64k' -ar '22050' -y \
    /folder/video_name.flv

    ffmpeg version N-46241-g09ea482 Copyright (c) 2000-2012 the FFmpeg developers
     built on Nov  5 2012 07:33:09 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-46)
     configuration: --prefix=/usr/local/bin/ffmpeg-1.0
     libavutil      52.  1.100 / 52.  1.100
     libavcodec     54. 70.100 / 54. 70.100
     libavformat    54. 35.100 / 54. 35.100
     libavdevice    54.  3.100 / 54.  3.100
     libavfilter     3. 21.105 /  3. 21.105
     libswscale      2.  1.101 /  2.  1.101
     libswresample   0. 16.100 /  0. 16.100
    Guessed Channel Layout for  Input Stream #0.1 : mono
    Guessed Channel Layout for  Input Stream #0.2 : mono
    Guessed Channel Layout for  Input Stream #0.3 : mono
    Guessed Channel Layout for  Input Stream #0.4 : mono
    Guessed Channel Layout for  Input Stream #0.5 : mono
    Guessed Channel Layout for  Input Stream #0.6 : mono
    Guessed Channel Layout for  Input Stream #0.7 : mono
    Guessed Channel Layout for  Input Stream #0.8 : mono
    Guessed Channel Layout for  Input Stream #0.9 : mono
    Guessed Channel Layout for  Input Stream #0.10 : mono
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/folder/video_name.mov':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       creation_time   : 2013-04-03 19:45:26
     Duration: 00:00:39.03, start: 0.000000, bitrate: 122149 kb/s
       Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080, 110585 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 23976 tbn, 23976 tbc
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
         timecode        : 00:59:53:00
       Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:2(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:3(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:4(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:5(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:6(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:7(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:8(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:9(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:10(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, mono, s32, 1152 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
       Stream #0:11(eng): Data: none (tmcd / 0x64636D74)
       Metadata:
         creation_time   : 2013-04-03 19:45:30
         handler_name    : Apple Alias Data Handler
         timecode        : 00:59:53:00
    Please use -b:a or -b:v, -b is ambiguous
    Output #0, flv, to '/folder/video_name.flv':
     Metadata:
       major_brand     : qt
       minor_version   : 537199360
       compatible_brands: qt
       encoder         : Lavf54.35.100
       Stream #0:0(eng): Video: flv1 ([2][0][0][0] / 0x0002), yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=2-31, 250 kb/s, 1k tbn, 23.98 tbc
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
         timecode        : 00:59:53:00
       Stream #0:1(eng): Audio: adpcm_swf ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 88 kb/s
       Metadata:
         creation_time   : 2013-04-03 19:45:26
         handler_name    : Apple Alias Data Handler
    Stream mapping:
     Stream #0:0 -> #0:0 (prores -> flv)
     Stream #0:1 -> #0:1 (pcm_s24le -> adpcm_swf)
    Press [q] to stop, [?] for help
    frame=   33 fps=0.0 q=2.0 size=     108kB time=00:00:01.99 bitrate= 442.4kbits/s    
    frame=   66 fps= 65 q=2.0 size=     225kB time=00:00:02.97 bitrate= 619.0kbits/s    
    frame=   99 fps= 65 q=2.0 size=     341kB time=00:00:04.96 bitrate= 561.8kbits/s    
    frame=  136 fps= 67 q=2.0 size=     400kB time=00:00:05.99 bitrate= 547.5kbits/s    
    frame=  177 fps= 70 q=3.0 size=     482kB time=00:00:07.98 bitrate= 494.3kbits/s    
    frame=  210 fps= 69 q=3.7 size=     590kB time=00:00:08.96 bitrate= 539.7kbits/s    
    frame=  240 fps= 68 q=6.3 size=     660kB time=00:00:10.01 bitrate= 539.7kbits/s    
    frame=  264 fps= 65 q=6.7 size=     719kB time=00:00:11.01 bitrate= 535.2kbits/s    
    frame=  288 fps= 63 q=8.4 size=     772kB time=00:00:12.02 bitrate= 526.1kbits/s    
    frame=  312 fps= 62 q=15.4 size=     829kB time=00:00:13.65 bitrate= 497.4kbits/s    
    frame=  336 fps= 60 q=10.4 size=     875kB time=00:00:14.02 bitrate= 511.1kbits/s    
    frame=  360 fps= 59 q=10.6 size=     916kB time=00:00:15.01 bitrate= 499.9kbits/s    
    frame=  383 fps= 58 q=17.8 size=     957kB time=00:00:15.97 bitrate= 490.6kbits/s    
    frame=  411 fps= 58 q=6.5 size=    1008kB time=00:00:17.97 bitrate= 459.3kbits/s    
    frame=  437 fps= 57 q=9.7 size=    1046kB time=00:00:18.99 bitrate= 451.3kbits/s    
    frame=  460 fps= 57 q=7.7 size=    1086kB time=00:00:20.01 bitrate= 444.6kbits/s    
    frame=  489 fps= 57 q=11.3 size=    1144kB time=00:00:20.99 bitrate= 446.3kbits/s    
    frame=  512 fps= 56 q=10.3 size=    1182kB time=00:00:22.01 bitrate= 439.8kbits/s    
    frame=  535 fps= 55 q=21.5 size=    1225kB time=00:00:22.98 bitrate= 436.7kbits/s    
    frame=  564 fps= 55 q=18.3 size=    1280kB time=00:00:24.00 bitrate= 436.8kbits/s    
    frame=  587 fps= 55 q=8.5 size=    1311kB time=00:00:24.98 bitrate= 429.7kbits/s    
    frame=  610 fps= 54 q=11.9 size=    1349kB time=00:00:26.00 bitrate= 424.9kbits/s    
    frame=  636 fps= 54 q=7.5 size=    1383kB time=00:00:26.98 bitrate= 419.8kbits/s    
    frame=  659 fps= 54 q=9.6 size=    1421kB time=00:00:28.00 bitrate= 415.6kbits/s    
    frame=  683 fps= 54 q=20.0 size=    1471kB time=00:00:29.02 bitrate= 415.1kbits/s    
    frame=  711 fps= 54 q=6.4 size=    1518kB time=00:00:30.00 bitrate= 414.5kbits/s    
    frame=  742 fps= 54 q=6.2 size=    1558kB time=00:00:31.02 bitrate= 411.5kbits/s    
    frame=  774 fps= 54 q=2.5 size=    1601kB time=00:00:33.01 bitrate= 397.1kbits/s    
    frame=  816 fps= 55 q=2.0 size=    1632kB time=00:00:34.50 bitrate= 387.6kbits/s    
    frame=  861 fps= 56 q=2.0 size=    1670kB time=00:00:35.99 bitrate= 380.1kbits/s    
    frame=  905 fps= 57 q=2.0 size=    1706kB time=00:00:38.03 bitrate= 367.4kbits/s    
    frame=  936 fps= 58 q=2.0 Lsize=    1730kB time=00:00:39.05 bitrate= 362.8kbits/s
    video:1278kB audio:423kB subtitle:0 global headers:0kB muxing overhead 1.654557%
  • Reading file stream from Google Cloud Storage to ffmpeg (using fluent-ffmpeg)

    27 juillet 2018, par ekuusi

    I’m trying to run ffmpeg on a NodeJS backend with fluent-ffmpeg, reading input files from Google Cloud Storage. Everything works fine if I download the file first :

    const file = storage
       .bucket('example_bucket')
       .file('examplefile.mp4');

    file.download({destination: 'test.mp4'}, (err) => {

       let command = ffmpeg()
       .input('test.mp4')
       .duration(10)
       .format('mp4');

       command.save('test_out.mp4');

    });

    res.json([{
       message: 'Command sent!'
    }]);

    But if I try to use a readable stream as the input, it fails :

    const file = storage
       .bucket('example_bucket')
       .file('examplefile.mp4');


    var filestream = file.createReadStream()

    let command = ffmpeg()
       .input(filestream)
       .duration(10)
       .format('mp4');


    command.save('test_out.mp4');
    });

    res.json([{
       message: 'Command sent!'
    }]);

    Here is the full output of ffmpeg when trying to do the conversion. It seems to read the details of the file fine but for some reason it fails, saying "Cannot process video : ffmpeg exited with code 1 : pipe:0 : Invalid data found when processing input"

    Spawned Ffmpeg with command: ffmpeg -i pipe:0 -y -t 10 -f mp4 test_out.mp4
    Stderr output: ffmpeg version 4.0.1 Copyright (c) 2000-2018 the FFmpeg developers
    Stderr output:   built with Apple LLVM version 9.1.0 (clang-902.0.39.2)
    Stderr output:   configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-librsvg --enable-libtheora --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-libjack --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --enable-opencl --disable-outdev=xv --enable-audiotoolbox --enable-videotoolbox --enable-sdl2 --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-x86asm --enable-libx265 --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
    Stderr output:   libavutil      56. 14.100 / 56. 14.100
    Stderr output:   libavcodec     58. 18.100 / 58. 18.100
    Stderr output:   libavformat    58. 12.100 / 58. 12.100
    Stderr output:   libavdevice    58.  3.100 / 58.  3.100
    Stderr output:   libavfilter     7. 16.100 /  7. 16.100
    Stderr output:   libavresample   4.  0.  0 /  4.  0.  0
    Stderr output:   libswscale      5.  1.100 /  5.  1.100
    Stderr output:   libswresample   3.  1.100 /  3.  1.100
    Stderr output:   libpostproc    55.  1.100 / 55.  1.100
    Stderr output: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb6db80a200] stream 2, offset 0x30: partial file
    Stderr output: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb6db80a200] Could not find codec parameters for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080, 4647 kb/s): unspecified pixel format
    Stderr output: Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Stderr output: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'pipe:0':
    Stderr output:   Metadata:
    Stderr output:     major_brand     : isom
    Stderr output:     minor_version   : 512
    Stderr output:     compatible_brands: isomiso2avc1mp41
    Stderr output:     encoder         : Lavf58.12.100
    Stderr output:     location-eng    : +60.2121+024.8754/
    Stderr output:     location        : +60.2121+024.8754/
    Stderr output:   Duration: 00:02:23.13, bitrate: N/A
    Stderr output:     Stream #0:0(eng): Video: h264 (avc1 / 0x31637661), none, 1920x1080, 4647 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 60k tbn, 120k tbc (default)
    Stderr output:     Metadata:
    Stderr output:       handler_name    : VideoHandler
    Stderr output:     Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Stderr output:     Metadata:
    Stderr output:       handler_name    : SoundHandler
    Stderr output:     Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
    Stderr output:     Metadata:
    Stderr output:       handler_name    : TimeCodeHandler
    Stderr output: Stream mapping:
    Input is aac (mp4a / 0x6134706D) audio with h264 (avc1 / 0x31637661) video
    Stderr output:   Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Stderr output:   Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Stderr output: [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fb6db80a200] stream 0, offset 0x34: partial file
    Stderr output: pipe:0: Invalid data found when processing input
    Stderr output: Cannot determine format of input stream 0:0 after EOF
    Stderr output: Error marking filters as finished
    Stderr output: Conversion failed!
    Stderr output:
    Cannot process video: ffmpeg exited with code 1: pipe:0: Invalid data found when processing input
    Cannot determine format of input stream 0:0 after EOF
    Error marking filters as finished
    Conversion failed!
  • First input link main timebase (1/15360) do not match the corresponding second input link xfade timebase (1/90000)

    14 novembre 2023, par Rino

    coders

    


    I am new to ffmpeg and i am facing this error for more then 2 days.
This ffmpeg command :
!ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "xfade=transition={chosenTransition}:duration={transitionDuration}:offset=-1.5" -c:v libx264 -crf 18 -preset veryfast "{outPath}"
I run that previous command 3 times in row where output of the previous command is input that is getting produced as 15360 timebase video i guess.

    


    is giving me this error : "First input link main timebase (1/15360) do not match the corresponding second input link xfade timebase (1/90000)"

    


    So when i merge two of my videos the output is video with (1/15360) timebase. Original videos has (1/90000) timebase.

    


    Pls help what i wana archive is basicly multiple videos inside a folder called "clips" merge together using a random transition from xfade/ffmpeg.

    


    On colab i tried all this ways :

    


    !rm -rf chunks
!mkdir chunks
time.sleep(1)
folderPath = '/content/clips'
videoOutput = '/content/test.mp4'
transitionDuration = 6

videoFiles = [f"{folderPath}/{f}" for f in os.listdir(folderPath) if f.endswith('.mp4')]
random.shuffle(videoFiles)
fromPath = videoFiles[0]
toPath = ''
outPath = ''
transitions = ['fade', 'wipeup', 'slidedown', 'circleclose', 'radial' , 'hrslice', 'hblur', 'smoothleft', 'smoothright']

for videoIndex, videoName in enumerate(videoFiles):
    if videoIndex == 0:
        continue
    toPath = videoName
    chosenTransition = random.choice(transitions)
    print('chosenTransition', chosenTransition)
    clipDuration = int((imageio.get_reader(fromPath)).get_meta_data()['duration']) - transitionDuration
    # !echo -i /content/clips/clip0.mp4 -i /content/clips/clip1.mp4 -filter_complex xfade=transition={chosenTransition}:duration=3:offset={clipDuration} dissolveVideo.mp4

    if videoIndex == len(videoFiles) - 1:
        outPath = videoOutput
    else:
        outPath = f'/content/chunks/chunk{videoIndex}.mp4'
    time.sleep(2)
    
    # !echo -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]xfade=transition={chosenTransition}:duration=3:offset={clipDuration},settb=1/19000[v0];[0:a][1:a]acrossfade=d=3[aout]" -map "[v0]" -map "[aout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
    !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "xfade=transition={chosenTransition}:duration={transitionDuration}:offset=-1.5,settb=1/15360" -c:v libx264 -crf 18 -preset veryfast "{outPath}"
    # !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]settb=1/15360,setpts=PTS-STARTPTS[v0];[1:v]settb=1/15360,setpts=PTS-STARTPTS[v1];[v0][v1]xfade=transition={chosenTransition}:duration={transitionDuration}:offset=-1.5[vout]" -map "[vout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
    # !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "[0]settb=AVTB [0v]; [1]settb=AVTB [1v]; [0v] [1v]xfade=transition={chosenTransition}:duration={transitionDuration}:offset=1" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
    # !ffmpeg -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]xfade=transition={chosenTransition}:duration=3:offset={clipDuration},settb=1/15360[v0];[0:a][1:a]acrossfade=d=3[aout]" -map "[v0]" -map "[aout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"
    # !ffmpeg -y -progress .progressinfo.dat -i "{fromPath}" -i "{toPath}" -filter_complex "[0:v]settb=AVTB,setpts=PTS-STARTPTS[v0];[1:v]settb=AVTB,setpts=PTS-STARTPTS[v1];[v0][v1]xfade=transition={chosenTransition}:duration={transitionDuration}:offset={clipDuration}[vout];[0:a]asettb=AVTB,asetpts=PTS-STARTPTS[a0];[1:a]asettb=AVTB,asetpts=PTS-STARTPTS[a1];[a0][a1]acrossfade=d=3[aout]" -map "[vout]" -map "[aout]" -c:v libx264 -crf 18 -preset ultrafast "{outPath}"