Recherche avancée

Médias (1)

Mot : - Tags -/wave

Autres articles (45)

  • Supporting all media types

    13 avril 2011, par

    Unlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)

  • Contribute to translation

    13 avril 2011

    You can help us to improve the language used in the software interface to make MediaSPIP more accessible and user-friendly. You can also translate the interface into any language that allows it to spread to new linguistic communities.
    To do this, we use the translation interface of SPIP where the all the language modules of MediaSPIP are available. Just subscribe to the mailing list and request further informantion on translation.
    MediaSPIP is currently available in French and English (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (3131)

  • Is there problem with 'read' command in Bash, or in Bash itself when using multiprocessing, or may be I make some mistake ? [duplicate]

    27 janvier 2023, par myQs

    First to mention that I do not have lot of experiences with Bash scripting.
    
Here is the problem that I observe :

    
When I execute read command and inside the cycle I run background processes, the read command misses some of the arguments in some very rare cases.

    
For example : if I read the output of ls -la for big number of video files and on each of them I execute ffmpeg command in a different sub-process, then in some very rare cases there are missing some of the first parameters of read command.
    
In that case the rest of parameters of the ls are wrong (having partial of their real values or wrongly assigned).

    
I most of the cases I have an output like this (which is correct) :
    
p1: '-rwxr-x---.'; p2: '1'; p3: 'uman'; p4: 'uman'; p5: '1080519'; p6: 'Jan'; p7: '27'; p8: '05:49'; p9: 'origVideo_453.mp4'

    


    but for very few lines I have not correct output and it is like this :
    
p1: 'an'; p2: '1080519'; p3: 'Jan'; p4: '27'; p5: '05:49'; p6: 'origVideo_454.mp4'; p7: ''; p8: ''; p9: ''

    


    Here p1 and p2 are missing and p3 should be "uman" but is just "an". And p3 becomes p1, p4 becomes p2, etc, in this way p7, p8 and p9 remain without values.

    


    Here is my bash script :

    


    #!/bin/bash

#src_dir=/tmp/text_files
src_dir=/tmp/video_files

dest_dir=/tmp/video_files_dest

mkdir -p $dest_dir

handle_video() {
  echo "handling file: '$1'"
  ffmpeg -loglevel error -i $src_dir/$1  -acodec copy -vcodec copy $dest_dir/$1
}

generate_text() {
  str=''
  for k in {1..512}
  do
    random=$(openssl rand -hex 20)
    str="${str}${random} "

    if [ $(( $k % 4 )) -eq 0 ]; then
      str="${str} ${new_line}"
    fi
  done

  echo "${str}" > $src_dir/$1
}

while read p1 p2 p3 p4 p5 p6 p7 p8 p9; do
echo "p1: '$p1'; p2: '$p2'; p3: '$p3'; p4: '$p4'; p5: '$p5'; p6: '$p6'; p7: '$p7'; p8: '$p8'; p9: '$p9'"
  if test -f $src_dir/$p9; then
    handle_video $p9 &
#    generate_text $p9 &
  fi
done << EOF
$(ls -la $src_dir)
EOF


    

    
**When I run the `handle_video` not in background but in same thread** I do not have such problem (remove `&` from line 33).

    
First I thought the issue might be in the output of the command `la -ls` and I tried with other commands, but I saw the same kind of results - in most of the executions `read` has correct parameters but in very few cases they are wrong.

    


    I also tried the script instead with handle_video (which uses ffmpeg invocation) to run different function that is executed inside read cycle : the generate_text.
    
To do this I comment lines 3 and 33 and uncomment lines 4 and 34.
    
And the interesting thing is that when executing it with handle_video problem exists but when executing with generate_text there is no such problem at all. At least I have never observed it in all my tests.
    
When executing it with handle_video I put 1200 video .mp4 files (1.1 MB each) in directory /tmp/video_files and run bash script.

    
When executing it with generate_text I generate 1200 empty files in directory /tmp/text_files and run the bash script.

    


    I also tried to execute the read command with piping like this, but the result is the same :

    


    ls -la $src_dir | while read p1 p2 p3 p4 p5 p6 p7 p8 p9; do
  echo "p1: '$p1'; p2: '$p2'; p3: '$p3'; p4: '$p4'; p5: '$p5'; p6: '$p6'; p7: '$p7'; p8: '$p8'; p9: '$p9'"
  if test -f $src_dir/$p9; then
    handle_video $p9 &
#   generate_text $p9 &
  fi
done


    

    


    Bash version is : 5.2.15(1)-release
    
ffmpeg version 5.0.2
    
Guest OS : Fedora version : "36 (Workstation Edition)"
    
VirtualBox 7.0.2
    
Host OS : is Windows 10 version : 21H2
    


    


    Once again when I do not run the function handle_video in background (at line 33 remove the ampersand &) there are no problems.
    
And when I use instead of handle_video the function generate_text again there are no problems.

    
So I wonder is there problem in the read method and how it gets the arguments, or is there problem with bash how it is being executing multiple processes, or there is something that I do not understand.
    
Any help and tips are appreciated.

    


    Here is a snippet of real output :

    


    p1: '-rwxr-x---.'; p2: '1'; p3: 'uman'; p4: 'uman'; p5: '1080519'; p6: 'Jan'; p7: '27'; p8: '05:49'; p9: 'origVideo_453.mp4'
handling file: 'origVideo_448.mp4'
handling file: 'origVideo_449.mp4'
handling file: 'origVideo_44.mp4'
handling file: 'origVideo_450.mp4'
handling file: 'origVideo_451.mp4'
handling file: 'origVideo_452.mp4'
p1: 'an'; p2: '1080519'; p3: 'Jan'; p4: '27'; p5: '05:49'; p6: 'origVideo_454.mp4'; p7: ''; p8: ''; p9: ''
p1: '-rwxr-x---.'; p2: '1'; p3: 'uman'; p4: 'uman'; p5: '1080519'; p6: 'Jan'; p7: '27'; p8: '05:49'; p9: 'origVideo_455.mp4'
p1: '-rwxr-x---.'; p2: '1'; p3: 'uman'; p4: 'uman'; p5: '1080519'; p6: 'Jan'; p7: '27'; p8: '05:49'; p9: 'origVideo_456.mp4'


    


  • Jellyfin ffmpeg permission denied

    11 septembre 2022, par Steve

    I am running Jellyfin on a Raspberry Pi 4 in a docker container (https://hub.docker.com/r/linuxserver/jellyfin) and am trying to set up hardware accelerated video transcoding. I'm fairly certain I have set up the video devices & permissions correctly, but I am getting the following exception in the logs when trying to play a video through the web interface :

    


    

    

    /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -autorotate 0 -i file:"/data/tvshows/Ed, Edd n' Eddy/Season 1 (1999)/Ed, Edd n Eddy - S01 E01-E02 - The Ed-Touchables and Nagged to Ed (1080p - HMax Web-DL).mp4" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_v4l2m2m -b:v 2616000 -maxrate 2616000 -bufsize 5232000 -level 41 -force_key_frames:0 "expr:gte(t,0+n_forced*3)" -g:v:0 90 -keyint_min:v:0 90 -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,1280)/64)*64:trunc(ow/a/2)*2,format=yuv420p" -codec:a:0 libfdk_aac -ac 2 -ab 384000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/config/data/transcodes/575d44f8f0e15b3bc459c5289dfcdf9b%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/config/data/transcodes/575d44f8f0e15b3bc459c5289dfcdf9b.m3u8"


ffmpeg version 5.1.1-Jellyfin Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-libs=-lfftw3f --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-shared --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-static --enable-gmp --enable-gnutls --enable-chromaprint --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libdav1d --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --toolchain=hardened --enable-cross-compile --arch=arm64 --cross-prefix=/usr/bin/aarch64-linux-gnu-
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
file:/data/tvshows/Ed, Edd n' Eddy/Season 1 (1999)/Ed, Edd n Eddy - S01 E01-E02 - The Ed-Touchables and Nagged to Ed (1080p - HMax Web-DL).mp4: Permission denied

    


    


    



    The real head-scratcher is that if I log in to the docker container with docker exec -it  /bin/bash and paste the ffmpeg command from the logs and run it, it works fine.

    


    I'm running as the jellyfin user, which is in the video group, and has read/write access to the media directory.

    


    Any thoughts ?

    


    My docker-compose file is attached below, if any other system information is needed let me know.

    


    

    

    ---
version: "2.1"
services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1002
      - PGID=1002
      - TZ=America/Chicago
      - JELLYFIN_PublishedServerUrl=nas-server.local #optional
    volumes:
      - /mnt/raid/tv:/data/tvshows
      - /mnt/raid/movies:/data/movies
      - /mnt/raid/docker/linuxserver/jellyfin/config:/config
    ports:
      - 8096:8096
      - 8920:8920 #optional
      - 7359:7359/udp #optional
      - 1900:1900/udp #optional
    devices:
      - /dev/video10:/dev/video10
      - /dev/video11:/dev/video11
      - /dev/video12:/dev/video12
      - /dev/video13:/dev/video13
      - /dev/video14:/dev/video14
      - /dev/video15:/dev/video15
      - /dev/video16:/dev/video16
      - /dev/video18:/dev/video18
      - /dev/video19:/dev/video19
      - /dev/video20:/dev/video20
      - /dev/video21:/dev/video21
      - /dev/video22:/dev/video22
      - /dev/video23:/dev/video23
      - /dev/video31:/dev/video31
    restart: unless-stopped

    


    


    



  • tests/checkasm : add exclude_guest for non-x86 linux perf

    9 avril 2024, par J. Dekker
    tests/checkasm : add exclude_guest for non-x86 linux perf
    

    The exclude_guest option only has an effect on x86. Omitting
    'exclude_guest' defaults to zero which implies that you can count guest
    events should you run one. Some non-x86 kernels just ignore it, while
    others (e.g. the Asahi Linux kernels) require the user to explicitly set
    the option to 1, i.e. the only behaviour that makes sense when counting
    guest events isn't supported.

    Signed-off-by : J. Dekker <jdek@itanimul.li>

    • [DH] tests/checkasm/checkasm.c