Recherche avancée

Médias (0)

Mot : - Tags -/interaction

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

Autres articles (59)

  • Pas question de marché, de cloud etc...

    10 avril 2011

    Le vocabulaire utilisé sur ce site essaie d’éviter toute référence à la mode qui fleurit allègrement
    sur le web 2.0 et dans les entreprises qui en vivent.
    Vous êtes donc invité à bannir l’utilisation des termes "Brand", "Cloud", "Marché" etc...
    Notre motivation est avant tout de créer un outil simple, accessible à pour tout le monde, favorisant
    le partage de créations sur Internet et permettant aux auteurs de garder une autonomie optimale.
    Aucun "contrat Gold ou Premium" n’est donc prévu, aucun (...)

  • Contribute to documentation

    13 avril 2011

    Documentation is vital to the development of improved technical capabilities.
    MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
    To contribute, register to the project users’ mailing (...)

  • Selection of projects using MediaSPIP

    2 mai 2011, par

    The examples below are representative elements of MediaSPIP specific uses for specific projects.
    MediaSPIP farm @ Infini
    The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)

Sur d’autres sites (6777)

  • ffmpeg : stream copy from .mxf into NLE-compatible format

    9 juin 2013, par David

    Because my NLE software does not support the .mxf-files from Canon XF100 I need to convert them into a supported format.

    As far as I know, mxf-files are just another container format for mpeg2 streams, so it would be really nice to extract the streams and place them into another container (without reencoding).

    I think ffmpeg can do this – correct me if I'm wrong – by running the following command :

    ffmpeg -i in.mxf -vcodec copy out.m2ts (or .ts, .mts, ...)

    ffmpeg finishes without errors after about 2 seconds (in.mxf is abut 170mb) :

    c:\video>c:\ffmpeg\bin\ffmpeg -i in.MXF -vcodec copy out.m2ts
    ffmpeg version N-53680-g0ab9362 Copyright (c) 2000-2013 the FFmpeg developers
     built on May 30 2013 12:14:03 with gcc 4.7.3 (GCC)
     configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
    isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
    le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
    e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
    ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
    ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
    eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
    amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
    enable-libxvid --enable-zlib
     libavutil      52. 34.100 / 52. 34.100
     libavcodec     55. 12.102 / 55. 12.102
     libavformat    55.  8.100 / 55.  8.100
     libavdevice    55.  2.100 / 55.  2.100
     libavfilter     3. 73.100 /  3. 73.100
     libswscale      2.  3.100 /  2.  3.100
     libswresample   0. 17.102 /  0. 17.102
     libpostproc    52.  3.100 / 52.  3.100
    Guessed Channel Layout for  Input Stream #0.1 : mono
    Guessed Channel Layout for  Input Stream #0.2 : mono
    Input #0, mxf, from 'in.MXF':
     Metadata:
       uid             : 1bb23c97-6205-4800-80a2-e00002244ba7
       generation_uid  : 1bb23c97-6205-4800-8122-e00002244ba7
       company_name    : CANON
       product_name    : XF100
       product_version : 1.00
       product_uid     : 060e2b34-0401-010d-0e15-005658460100
       modification_date: 2013-01-06 11:05:02
       timecode        : 01:42:14:22
     Duration: 00:00:28.32, start: 0.000000, bitrate: 51811 kb/s
       Stream #0:0: Video: mpeg2video (4:2:2), yuv422p, 1920x1080 [SAR 1:1 DAR 16:9
    ], 25 fps, 25 tbr, 25 tbn, 50 tbc
       Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
       Stream #0:2: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
    Output #0, mpegts, to 'out.m2ts':
     Metadata:
       uid             : 1bb23c97-6205-4800-80a2-e00002244ba7
       generation_uid  : 1bb23c97-6205-4800-8122-e00002244ba7
       company_name    : CANON
       product_name    : XF100
       product_version : 1.00
       product_uid     : 060e2b34-0401-010d-0e15-005658460100
       modification_date: 2013-01-06 11:05:02
       timecode        : 01:42:14:22
       encoder         : Lavf55.8.100
       Stream #0:0: Video: mpeg2video, yuv422p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-3
    1, 25 fps, 90k tbn, 25 tbc
       Stream #0:1: Audio: mp2, 48000 Hz, mono, s16, 128 kb/s
    Stream mapping:
     Stream #0:0 -> #0:0 (copy)
     Stream #0:1 -> #0:1 (pcm_s16le -> mp2)
    Press [q] to stop, [?] for help
    frame=  532 fps=0.0 q=-1.0 size=  143511kB time=00:00:21.25 bitrate=55314.1kbits
    frame=  561 fps=435 q=-1.0 size=  151254kB time=00:00:22.42 bitrate=55242.0kbits
    frame=  586 fps=314 q=-1.0 size=  158021kB time=00:00:23.41 bitrate=55288.0kbits
    frame=  609 fps=255 q=-1.0 size=  164182kB time=00:00:24.34 bitrate=55235.4kbits
    frame=  636 fps=217 q=-1.0 size=  171463kB time=00:00:25.42 bitrate=55235.1kbits
    frame=  669 fps=194 q=-1.0 size=  180133kB time=00:00:26.72 bitrate=55226.3kbits
    frame=  699 fps=173 q=-1.0 size=  188326kB time=00:00:27.92 bitrate=55256.6kbits
    frame=  708 fps=169 q=-1.0 Lsize=  190877kB time=00:00:28.30 bitrate=55233.6kbit
    s/s
    video:172852kB audio:442kB subtitle:0 global headers:0kB muxing overhead 10.1461
    18%

    Unfortunately the output file turns out to be displayed correctly only by vlc player.
    My NLE-software (Cyberlink Power Director) is able to open the file but most of the picture is green. Only a few pixels on the left edge show the original video :

    output file

    Any ideas how to solve that problem ? Is there a better way to use .mxf-files in NLE-software without native support ?

    thanks in advance

  • How to batch process a series of video files with powershell and other-transcode/ffmpeg

    7 juin 2022, par DarkDiamond

    TL ;DR

    


    What did I do wrong in the following PowerShell-Script ? It does not work as expected.

    



    


    I am recording some of my lectures in my university with a photo camera. This works pretty well although I have to split the single lecture into three to four parts because the camera can only record 29 minutes of video in one take. I know that this is a common issue related to some licensensing problem that most photo cameras simply don't have the right license to record longer videos. But it confronts me with the problem that I later have to edit the files together after I did some post processing on them.

    


    With the camera I produce up to four video files with sizes around 3.5 GB which is way to big in order to be of any use because our IT department understandably doesn't want to host so much data, as I produce around 22 GB of video material each week.

    


    Some time ago I came across a very useful tool called "other-video-transcoding" by Don Melton over on GitHub, written in ruby, that allows me to compress the files to a reasonable file size without any visual loss. In addition I crop the videos to remove the part of each frame that is neither the board nor a place where my professor stands in order to decrease the filesize even further and do some privacy protection by cutting out most of the students.

    


    As the tools are accessable via the command line, it is relatively easy to configure and does not cost additional computational power to render a nice gui, so I can edit one of the 29 minute clips in less than 10 minutes.

    


    Now I wanted to optimize my workflow by writing a PowerShell script that only takes the parameters what to crop and which files to work on and then does the rest on its own so I can just start the script and then do something else while my laptop renders the new files.

    


    So far I have the following :

    


    $video_path = Get-ChildItem ..\ -Directory | findstr "SoSe"

Get-ChildItem $video_path -name | findstr ".MP4" | Out-File temp.txt -Append 
Get-Content temp.txt | ForEach-Object {"file " + $_} >> .\files.txt

Get-ChildItem $video_path |
Foreach-Object {
other-transcode --hevc --mp4 --target 3000 --crop 1920:780:0:0 $_.FullName
}

#other-transcode --hevc --mp4 --crop 1920:720:60:0 ..\SoSe22_Theo1_videos_v14_RAW\
ffmpeg -f concat -i files.txt -c copy merged.mp4
Remove-Item .\temp.txt


    


    but it does not quite do what I it expect to do.
This is my file system :

    


    sciebo/
└── SoSe22_Theo1_videos/
    ├── SoSe22_Theo1_videos_v16/
    │   ├── SoSe22_Theo1_videos_v16_KOMPR/
    │   │   ├── C0001.mp4
    │   │   ├── C0002.mp4
    │   │   ├── C0003.mp4
    │   │   ├── C0004.mp4
    │   │   ├── temp.txt
    │   │   ├── files.txt
    │   │   └── merged.mp4
    │   └── SoSe22_Theo1_videos_v16_RAW/
    │       ├── C0001.mp4
    │       ├── C0002.mp4
    │       ├── C0003.mp4
    │       └── C0004.mp4
    └── SoSe22_Theo1_videos_v17/
        ├── SoSe22_Theo1_videos_v17_KOMPR
        └── SoSe22_Theo1_videos_v17_RAW/
            ├── C0006.mp4
            ├── C0007.mp4
            ├── C0008.mp4
            └── C0009.mp4


    


    where the 16th lecture is already processed and the 17th is not. I always have the raw video data in the folders ending on RAW and the edited/compressed output files in the one ending on KOMPR. Note that the video files in the KOMPR folder are the output files of the other-transcode tool.

    


    The real work happens in the line where it says

    


    other-transcode --hevc --mp4 --target 3000 --crop 1920:780:0:0 $_.FullName


    


    and in the line

    


    ffmpeg -f concat -i files.txt -c copy merged.mp4


    


    where I concat the output files into the final version I can upload to our online learning platform.
What is wrong with my script ? In the end I'd like to pass the --crop parameter just to my script, but that is not the primary problem.

    



    


    A little information on the transcoding script so you don't have to look into the documentation :
    
As the last argument the tool takes the location of the video files to work on, be it relative or absolute file paths. The output is placed in the folder the script is called in, so if I cd into one of the KOMPR directories and then call

    


    other-transcode --mp4 ../SoSe22_Theo1_videos_v16_RAW/C0001.mp4


    


    a new file C0001.mp4 is created in the KOMPR directory and the transcoded video and old audio are written to that new video file.

    


  • Recording usb cam on raspberry pi with ffmpeg - usb troubleshooting

    18 septembre 2017, par Hwy2Hell

    I want to save video from an external usb cam on the raspberry pi 3. In order to avoid voltage drop issues, I use the offical raspberry power supply (2.5 Amp) and connected all usb devices by a separetely powered usb hub :

    pi@raspi:~/appdev/ffmpeg $ lsusb
    Bus 001 Device 037: ID 046d:09a1 Logitech, Inc. QuickCam Communicate MP/S5500
    Bus 001 Device 036: ID 046d:c03f Logitech, Inc. M-BT85 [UltraX Optical Mouse]
    Bus 001 Device 035: ID 04d9:1503 Holtek Semiconductor, Inc. Shortboard Lefty
    Bus 001 Device 012: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
    Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

    When I try to test the functionality by running the following bash script (snippet) :

    function capture
    {
       capfile=$(date +%F_%Hh%Mm%Ss)
       echo saving to $wdir/$capfile.mp4
       echo $PATH
       ffmpeg -video_size 320x240 -i /dev/video0 \
       -vf drawtext="fontsize=18:x=10:y=220:fontcolor=red:\
       fontfile=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf:\
       text=%{localtime}" -t 10 $wdir/$capfile.mp4
       # change -t to 3600 = 1h
    }

    for i in $(seq 1 10)
    do
       echo
       echo Pass $i ...
       capture
    done

    After a few loop-runs I always see device errors :

    Pass 5 ...
    saving to /home/pi/appdev/ffmpeg/2017-09-16_13h31m00s.mp4
    /usr/local/bin:/usr/bin/ffmpeg:/usr/bin:/bin:/sbin
    ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
     built with gcc 4.9.2 (Raspbian 4.9.2-10)
     configuration: --arch=armhf --target-os=linux --enable-gpl --enable-libfreetype --enable-mmal --enable-nonfree --enable-omx --enable-omx-rpi
     libavutil      55. 58.100 / 55. 58.100
     libavcodec     57. 89.100 / 57. 89.100
     libavformat    57. 71.100 / 57. 71.100
     libavdevice    57.  6.100 / 57.  6.100
     libavfilter     6. 82.100 /  6. 82.100
     libswscale      4.  6.100 /  4.  6.100
     libswresample   2.  7.100 /  2.  7.100
     libpostproc    54.  5.100 / 54.  5.100
    /dev/video0: Input/output error

    The kernel message log shows that the usb cam has been resetted :

    pi@raspi:~/appdev/ffmpeg $ dmesg | grep usb
    [ 4497.358195] usb 1-1.2.4: new high-speed USB device number 37 using dwc_otg
    [ 4497.573440] usb 1-1.2.4: New USB device found, idVendor=046d, idProduct=09a1
    [ 4497.573466] usb 1-1.2.4: New USB device strings: Mfr=0, Product=0, SerialNumber=2
    [ 4497.573481] usb 1-1.2.4: SerialNumber: A032D310
    [ 4497.605698] input: UVC Camera (046d:09a1) as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2.4/1-1.2.4:1.0/input/input15
    [ 4497.625582] usb 1-1.2.4: Warning! Unlikely big volume range (=3072), cval->res is probably wrong.
    [ 4497.625606] usb 1-1.2.4: [5] FU [Mic Capture Volume] ch = 1, val = 4608/7680/1
    [ 5268.123764] usb 1-1.2.4: reset high-speed USB device number 37 using dwc_otg

    Next time I start the script, the usb cam gets disconnected and /dev/viedo0 disappears :

    pi@raspi:~/appdev/ffmpeg $ dmesg | grep usb
    [ 5621.216896] usb 1-1.2.4: USB disconnect, device number 37
    [ 5621.586804] usb 1-1.2.4: new full-speed USB device number 38 using dwc_otg
    [ 5621.686694] usb 1-1.2.4: device descriptor read/64, error -32
    [ 5621.896583] usb 1-1.2.4: device descriptor read/64, error -32
    [ 5622.106572] usb 1-1.2.4: new full-speed USB device number 39 using dwc_otg
    [ 5622.206574] usb 1-1.2.4: device descriptor read/64, error -32
    [ 5622.416577] usb 1-1.2.4: device descriptor read/64, error -32
    [ 5622.626586] usb 1-1.2.4: new full-speed USB device number 40 using dwc_otg
    [ 5623.046583] usb 1-1.2.4: device not accepting address 40, error -32
    [ 5623.146583] usb 1-1.2.4: new full-speed USB device number 41 using dwc_otg
    [ 5623.566603] usb 1-1.2.4: device not accepting address 41, error -32
    [ 5623.566670] usb 1-1.2-port4: unable to enumerate USB device

    Has anybody experienced similar problems and can provide a fix for it ?

    What tools can I use to troubleshoot the usb communication on the pi ?