Recherche avancée

Médias (0)

Mot : - Tags -/page unique

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

Autres articles (20)

  • Les formats acceptés

    28 janvier 2010, par

    Les commandes suivantes permettent d’avoir des informations sur les formats et codecs gérés par l’installation local de ffmpeg :
    ffmpeg -codecs ffmpeg -formats
    Les format videos acceptés en entrée
    Cette liste est non exhaustive, elle met en exergue les principaux formats utilisés : h264 : H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 m4v : raw MPEG-4 video format flv : Flash Video (FLV) / Sorenson Spark / Sorenson H.263 Theora wmv :
    Les formats vidéos de sortie possibles
    Dans un premier temps on (...)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (1988)

  • youtube stream from ffmpeg is buffering

    1er juin 2020, par Bartonsen

    I'm using ffmpeg running on a Raspberry Pi 3B with 1GB RAM to stream live video on youtube.
In the beginning the audio+video stream is excellent, but after some minutes I see error messages in YT studio, and video starts buffering.
After some more time (could be 30 mins or 1 hr) the youtube stream is gone, although ffmpeg is still running.

    



    ffmpeg is configured like this :

    



    ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-omx-rpi


    



    Running ffmpeg :

    



    pi@raspberrypi:~ $ ffmpeg -thread_queue_size 512 -rtsp_transport udp -i "rtsp://10.x.x.x:554/user=user&password=password&channel=1&stream=0.sdp?real_stream" -c:v copy -c:a aac -f flv rtmp://a.rtmp.youtube.com/live2/mykey
ffmpeg version git-2020-05-01-3c740f2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 6.3.0 (Raspbian 6.3.0-18+rpi1+deb9u1) 20170516
  configuration: --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-omx-rpi
  libavutil      56. 43.100 / 56. 43.100
  libavcodec     58. 82.100 / 58. 82.100
  libavformat    58. 42.102 / 58. 42.102
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 80.100 /  7. 80.100
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[udp @ 0x3a8c370] attempted to set receive buffer to size 393216 but it only ended up set as 327680
[udp @ 0x3a9ea80] attempted to set receive buffer to size 393216 but it only ended up set as 327680
[udp @ 0x3a8c3e0] attempted to set receive buffer to size 393216 but it only ended up set as 327680
[udp @ 0x3abf4d0] attempted to set receive buffer to size 393216 but it only ended up set as 327680
Guessed Channel Layout for Input Stream #0.1 : mono
Input #0, rtsp, from 'rtsp://10.x.x.x:554/user=user&password=password&channel=1&stream=0.sdp?real_stream':
  Metadata:
    title           : RTSP Session
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080, 20 fps, 20 tbr, 90k tbn, 180k tbc
    Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (pcm_alaw (native) -> aac (native))
Press [q] to stop, [?] for help
[aac @ 0x3ae9f00] Too many bits 8832.000000 > 6144 per frame requested, clamping to max
Output #0, flv, to 'rtmp://a.rtmp.youtube.com/live2/mykey':
  Metadata:
    title           : RTSP Session
    encoder         : Lavf58.42.102
    Stream #0:0: Video: h264 (Main) ([7][0][0][0] / 0x0007), yuvj420p(pc, bt709, progressive), 1920x1080, q=2-31, 20 fps, 20 tbr, 1k tbn, 90k tbc
    Stream #0:1: Audio: aac (LC) ([10][0][0][0] / 0x000A), 8000 Hz, mono, fltp, 48 kb/s
    Metadata:
      encoder         : Lavc58.82.100 aac


    



    In youtube studio I see this :

    



    19:36 Good transmission. The quality is excellent.
19:39 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
19:39 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.
19:39 Warning: The current bit rate (1974.24 kbps) is lower than the recommended bit rate. We recommend using a 4500 Kbps bitrate for the stream.
19:41 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
19:41 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.
19:41 Warning: The current bit rate (2151.41 kbps) is lower than the recommended bit rate. We recommend using a 4500 Kbps bitrate for the stream.
19:43 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
19:43 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.
19:45 Suggestion: The current sampling rate is 0. Recommended sampling rates are 44.1 kHz and 48 kHz.
19:45 Suggestion: The current bitrate (0) of the audio stream is lower than the recommended bitrate. We recommend using a 128 Kbps bitrate for the audio stream.
19:45 Warning: The current bit rate (1737.61 kbps) is lower than the recommended bit rate. We recommend using a 4500 Kbps bitrate for the stream.
...
19:54: Error: YouTube does not receive enough video to maintain consistent streaming. Viewers will therefore experience buffering.


    



    What is the problem ? How can I get rid of the buffering ?
I've also tried the below two commands, but found the output to be worse...

    



    ffmpeg -i rtsp://... -c:v libx264  -b:v 4000k -maxrate 4000k -bufsize 8000k -g 40 -preset ultrafast -vf format=yuv420p -c:a aac -f flv output
ffmpeg -i rtsp://... -c:v h264_omx -b:v 4000k -maxrate 4000k -bufsize 8000k -g 40 -preset ultrafast -vf format=yuv420p -c:a aac -f flv output


    


  • what is the meaning of the v4l2-ctl —list-device ?

    26 janvier 2021, par mcgregor94086

    The High level Problem :

    


    I have a custom multi-camera array that I have attached to a Raspberry Pi via some USB hubs, and I need a way to quickly identify which camera needs attention when any camera fails to respond to an image capture request.

    


    Can "v4l2-ctl —list_devices" help me ?

    


    I am trying to determine if
"v4l2-ctl —list_devices" can help me more quickly identify which one is missing. My thought was to look at which cameras are reporting, and then notice which one is NOT reporting, and investigate the missing one.

    


    My question is can I identify each reporting camera either for the v4l2-ctl output, or from "FFmpeg -list_formats"

    


    Here is the output I get from v4l2-ctl :

    


    $ v4l2-ctl --list-device            
bcm2835-codec-decode (platform:bcm2835-codec):
    /dev/video10
    /dev/video11
    /dev/video12

bcm2835-isp (platform:bcm2835-isp):
    /dev/video13
    /dev/video14
    /dev/video15
    /dev/video16

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.1):
    /dev/video4
    /dev/video5

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.2):
    /dev/video6
    /dev/video7

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.3):
    /dev/video8
    /dev/video9

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.1.4):
    /dev/video17
    /dev/video18

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.2):
    /dev/video0
    /dev/video1

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.2.3):
    /dev/video2
    /dev/video3

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.1.1):
    /dev/video21
    /dev/video22

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.1.2):
    /dev/video25
    /dev/video26

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.1.4):
    /dev/video29
    /dev/video30

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.2):
    /dev/video19
    /dev/video20

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.3):
    /dev/video23
    /dev/video24

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.1.3.4):
    /dev/video27
    /dev/video28

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.1.2):
    /dev/video35
    /dev/video36

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.1.3):
    /dev/video39
    /dev/video40

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.1.4):
    /dev/video41
    /dev/video42

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.2):
    /dev/video31
    /dev/video32

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.3):
    /dev/video33
    /dev/video34

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.2.4):
    /dev/video37
    /dev/video38

FHD Camera: FHD Camera (usb-0000:01:00.0-1.2.4.2):
    /dev/video43
    /dev/video44


    


    All the USB cameras in my array each report the same first field (in this case "FHD Camera") so I can't use the name as a unique identifier.

    


    Each "FHD Camera" is assigned two different /dev/videoNN ids (one will be assigned for the mpeg format, and the other for the UYV format). However these /dev/videoNN assignments change each time the computer reboots.

    


    The sequence that cameras are listed in the output also changes each time the v4l2-ctl command runs. So that also is of no help

    


    v4l2-ctl also reports another field, beginning "usb-0000 :" followed by a series numbers (e.g. "01:00.0-1.2.2.4").

    


    I am wondering if this number string ties in any way to the physical USB bus, and would remain permanent across reboots.

    


    The v4l2-ctl help documentation merely says that the —list-devices flag will list the video devices, but these additional fields and their meaning is not explained.

    


    Alternatively, for each camera that is responding, I can query the device with
"ffmpeg -hide_banner -f v4l2 -list_formats all -i /dev/videoNN", yielding a response like this :

    


    $ ffmpeg -hide_banner -f v4l2 -list_formats all -i /dev/video8
[video4linux2,v4l2 @ 0x1a391c0] Compressed:       mjpeg :          Motion-JPEG : 640x480 1280x720 640x360 320x240 1920x1080
[video4linux2,v4l2 @ 0x1a391c0] Raw       :     yuyv422 :           YUYV 4:2:2 : 640x480 1280x720 640x360 320x240 1920x1080
/dev/video8: Immediate exit requested


    


    This ffmpeg query shows me that the device is also registered as "0x1a391c0". I am not yet sure whether these identifiers are stable across reboots, and if they are, whether they are stable with the physical camera, or if they are just a stable identifier to the USB Hub location of the camera.

    


    My request :

    


    Can someone explain to me how the "device name", /dev/videoNN identifier, usb-0000:01:00.0-1.2.2.4 identifier, and 0x1a391c0 are assigned ?

    


    The responding order of the items listed in v4l2-ctl changes each time it runs.

    


    Is this reflecting that all cameras are polled simultaneously, but acquisition of the bus for response transmission is random ?

    


    Addendum

    


    Further investigation shows me that the "0x-------" identifiers do not seem to be stable across reboots either.

    


    The "usb-0000:01:00.0-1.2.2.2" identifier DOES seem to have a somewhat stable meaning. I have (5) 7-port usb hubs attached to my RPi 400. 4 of these are branch hubs that feed into a master hub, and the master hub feeds into the RPi.

    


    After the 0-1. in the identifier there is either 3 or 4 digits. If there are only 3, the last digit is a port identifier 2, 3, or 4.

    


    If there are 4 digits, then the 2nd to last digit will be a 1, and 1.1, 1.2, 1.3, and 1.4 will represent the last 4 physical ports on that hub.

    


    Ironically, while the same port identifiers are always used in the same order on each of my (identical brand/model) hubs, they are NOT in ascending or descending sequence in terms of their physical sequence on the hubs.

    


    I have deduced from this that each of my hubs actually uses two USB 4 port chips. So the first chip is getting the single digits, while the 1st port on that 1st chip is feeding the 2nd chip.

    


    The 2nd digit in my identifiers is identifying which branch hub the device is on, 1,2,3 or 4. The first digit is 1, which seems to be identifying that all the branches are children of the master hub.

    


    These addresses seem to be stable across reboots as long as all of the USB hubs are already connected at boot up. If not all are connected, those that are connected first will get the lowest hub number identifiers.

    


    I don't know if this tree address identifier behavior would be the same on other hubs, but perhaps these observations will be of some use to anyone else trying to find stable identifiers in their own multi hub and multi-device architecture.

    


  • electron ffmpeg mas build "Illegal instruction : 4"

    8 mars 2021, par Martin

    I am trying to release an electron app on the Mac Apple Store (mas), my electron app uses ffmpeg to render videos. In order to release my app on the mac apple store, It needs to be sandboxed, and by default ffmpeg makes calls to external libraries so I need to statically build ffmpeg and package it with my app. My code is on the 'mas-ffmpeg-fix' branch : https://github.com/MartinBarker/digify/tree/mas-ffmpeg-fix

    


    My static ffmpeg build works before I build my app, but after running electron-builder build --mac, the ffmpeg executable now fails with Illegal instruction: 4

    


    This is the full timeline of building/packaging/submitting my app to the mac apple store and where the error first appears :

    


      

    • In Digify repo :

      


    • 


    • clone, configure, and build static ffpmeg : “sudo rm -rf ffmpeg-mac/ && npm run download-ffmpeg”

      


    • 


    • download-ffmpeg command is inside package.json and runs this :
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg-mac && cd ffmpeg-mac && ./configure pkg_config='pkg-config --static' --pkg-config-flags='--static' --libdir=/usr/local/lib --extra-version=ntd_20150128 --disable-shared --disable-lzma --enable-gpl --enable-pthreads --enable-nonfree --enable-libass --enable-libfdk-aac  --enable-libmp3lame  --enable-libx264 --enable-static --enable-filters --enable-runtime-cpudetect && make && cd ..

      


    • 


    • Check if any dylibb files in the static ffmpeg build with command : “otool -L ffmpeg-mac/ffmpeg | grep /usr/local”

      


    • 


    • If there are any, move them to folder in desktop, run ‘otool’ again to ensure there are no dynamic libraries, rebuild static ffmpeg.

      


    • 


    • there will now be a folder 'ffmpeg-mac' which contains static versions of ffmpeg and ffprobe

      


    • 


    


    Using ffmpeg with electron UI : works
Using Ffmpeg with command-line command :
/Users/martinbarker/Documents/projects/digify-new/ffmpeg-mac/ffmpeg -h
Works

    


      

    • Build mac mass app with “npm run build-mas“
    • 


    • When this command finishes it will output two files inside the /dist/mas/ folder : Digify.app and Digify-01.20.pkg (or whatever version number it is)
Ffmpeg command-line check :
/Users/martinbarker/Documents/projects/digify-new/dist/mas/Digify.app/Contents/Resources/ffmpeg -h
Illegal instruction : 4
    • 


    


    This is the first place the error appears, after building my mac mac-apple-store app, ffmpeg fails with this err.

    


      

    • Sign built app with .sh file : “sh mas-sign-script.sh”
view .sh file here

        

      • the .sh file will output Digify-mac.pkg
      • 


      


    • 


    • Easier command to both build & sign : “sudo rm -rf dist/mas/ && npm run build-mas && sh mas-sign-script.sh”
    • 


    • Upload the outputted “Digify-mac.pkg” file & submit to apple for review
    • 


    


    Once this app gets published in the store, if you download it and try to run an ffmpeg command with the electron UI, it fails with this error :

    


    /Applications/Digify.app/Contents/Resources/app.asar/node_modules/execa/lib/error.js:59 Uncaught (in promise) Error: Command failed with exit code 1: /Applications/Digify.app/Contents/Resources/ffmpeg -i /Users/martinbarker/Downloads/Felix Lebarty - Bobo/01. Bobo.mp3 -y -filter_complex concat=n=1:v=0:a=1 -c:a libmp3lame -b:a 320k /Users/martinbarker/Downloads/Felix Lebarty - Bobo/output-064237.mp3
ffmpeg version N-101191-g51a9f487ae-ntd_20150128 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple LLVM version 10.0.1 (clang-1001.0.46.4)
  configuration: pkg_config='pkg-config --static' --pkg-config-flags=--static --libdir=/usr/local/lib --extra-version=ntd_20150128 --disable-shared --disable-lzma --enable-gpl --enable-pthreads --enable-nonfree --disable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libx264 --enable-static --enable-filters --enable-runtime-cpudetect
  libavutil      56. 65.100 / 56. 65.100
  libavcodec     58.125.100 / 58.125.100
  libavformat    58. 68.100 / 58. 68.100
  libavdevice    58. 12.100 / 58. 12.100
  libavfilter     7.107.100 /  7.107.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[mp3 @ 0x7feeae809c00] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '/Users/martinbarker/Downloads/Felix Lebarty - Bobo/01. Bobo.mp3':
  Metadata:
    comment         : 
    album           : Bobo
    artist          : Felix Lebarty
    title           : Funkytown Eklablog
    genre           : Boogie
    date            : 1984
  Duration: 00:05:19.53, start: 0.000000, bitrate: 320 kb/s
  Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 320 kb/s
/Users/martinbarker/Downloads/Felix Lebarty - Bobo/output-064237.mp3: Operation not permitted
    at makeError (/Applications/Digify.app/Contents/Resources/app.asar/node_modules/execa/lib/error.js:59)
    at handlePromise (/Applications/Digify.app/Contents/Resources/app.asar/node_modules/execa/index.js:114)
    at async file:/Applications/Digify.app/Contents/Resources/app.asar/src/js/newindex.js:1162


    


    Command failed with exit code 1: Operation not permitted