Recherche avancée

Médias (0)

Mot : - Tags -/organisation

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

Autres articles (85)

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

  • Support de tous types de médias

    10 avril 2011

    Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (11753)

  • ffmpeg yield different results when used in the application

    5 mai 2020, par xoail

    This is perplexing me. I am using ffmpeg to convert m4a to wav audio. When I use it with fluent-ffmpeg the output mime is audio/wave while when I do it using terminal I get audio/wav. For extactly same commands. The application I am trying to play these files is rejecting my audio/wave file.

    



    Using node (results in audio/wave) :

    



    const ffmpegPath = require('@ffmpeg-installer/ffmpeg')
const ffmpeg = require('fluent-ffmpeg');
ffmpeg()
.setFfmpegPath(ffmpegPath)
.input('source.m4a')
.outputOptions(['-ac 1','-ar 16000'])
.save('out.wav')


    



    Using terminal (results in audio/wav) :

    



    /same/path/to/static-ffmpeg-as-in-node-program/ffmpeg -i source.m4a -ac 1 -ar 16000 out.wav


    



    I've both of their encoding as, PCM S16 LE (s16l), 16 bits/sample, mono and 16khz samplerate audio files. I've tried adding other flags and got same results on both scenarios : -vn -acodec pcm_s16le -ar 16000 -ac 1 -f wav. Just that one doesnt work. And I have no idea why.

    



    I've also tried not using fluent-ffmpeg but using spawn and got same audio/wave file.

    



    Any insight ?

    


  • Strange results when converting rgb yuv using ffmpeg in python

    20 avril 2020, par user3569998

    I have JPG images and I am trying to do the following :

    



      

    1. resize the input and save the result into PNG
    2. 


    3. convert PNG images to YUV (for instance yuv444p10le) in AVI container
    4. 


    5. convert AVI back to PNG image.
    6. 


    



    I am using python 3 and ffmpeg Linux version installed on Colab

    



    I printed the difference between resized_png and restored_png. I have values of 255 which doesn't make sense at all.

    



     [[[  0 255   1]
  [  0   0   1]
  [  0 255   1]
  ...
  [  1   0   0]
  [  1   0   0]
  [  2   0   1]]

 [[  0 255   1]
  [  0 255   1]
  [  1   0   0]
  ...
  [  1   0   0]
  [  1   0   0]
  [  1   0   0]]

 [[  0   0   1]
  [  0   0   1]
  [  0   0   1]
  ...
  [  1 255   0]
  [  1 255   1]
  [  1   0   0]]

 ...

 [[255   0   0]
  [255   0   1]
  [255   0   1]
  ...
  [  0   0   0]
  [  0   0   1]
  [255   0   1]]

 [[255   0   1]
  [255   0   1]
  [255   0   1]
  ...
  [  0   0   1]
  [  0   0   1]
  [  0   0   0]]

 [[255   0   1]
  [255   0   1]
  [255   0   1]
  ...
  [255   1   0]
  [255   0   0]
  [255   0   1]]]


    



    input_image = '/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2.jpg'
output_resized = '/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2.png'
folder_path = '/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/'

#do resize
# code = subprocess.call('cd /usr/bin/ffmpeg',  shell=True)
# print(code)
cmd_resize = ['ffmpeg', '-y', '-i',  input_image,'-vf', 'scale=224:224', output_resized]
process = subprocess.Popen(cmd_resize, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = process.communicate()
print(out)
print(err)

fmt = ['yuv420p', 'yuv420p10le', 'yuv444p', 'yuv444p10le']
for f in fmt:
  cmd2YUV = ['ffmpeg', '-y', '-i', output_resized, '-c:v', 'libx264', '-preset', 'placebo',\
             '-qp', '0', '-x264-params', "keyint=15:no-deblock=1", '-pix_fmt', f, \
             '-sws_flags', 'spline+accurate_rnd+full_chroma_int', \
             '-vf', "colorspace=bt709:iall=bt601-6-625:fast=1", '-color_range', '1', '-colorspace', '1', 
             '-color_primaries', '1', '-color_trc', '1', folder_path+'im2_'+f+'.avi']
  process = subprocess.Popen(cmd2YUV, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  out, err = process.communicate()
  print(out)
  print(err)

  cmd2PNG = ['ffmpeg', '-y', '-i',  folder_path+'im2_'+f+'.avi', '-compression_level', '10', '-pred', 'mixed', \
             '-pix_fmt', 'rgb24', '-sws_flags', '+accurate_rnd+full_chroma_int', \
             folder_path+'im2_'+f+'.png']
  process = subprocess.Popen(cmd2PNG, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  out, err = process.communicate()
  print(out)
  print(err)

im1=pilim.open('/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2.png')
im2=pilim.open('/content/drive/My Drive/Colab Notebooks/adv_dnn/datasets/im2_yuv444p10le.png')
im1_2d = np.asarray(im1)
im2_2d = np.asarray(im2)
print(im2_2d-im1_2d)


    


  • Removing one audio track from a movie results in audio desync when copying, but not when reencoding --- why ?

    18 avril 2020, par chsk

    I'm trying to remove a superfluous audio track from a movie file. Specifically, this movie on archive.org has the original audio as track 2, and what appears to be a slavic (Russian ?) voiceover in track 1. I'd like to get rid of the latter.

    



    I found this question that suggested I should do the following :

    



    ffmpeg -i Benjamín\ dúfa.avi -map 0 -map -0:a:0 -c copy Benjamín\ dúfa\ \(aðeins\ íslenskt\ tal\).avi

    



    But this doesn't work : after removing the first audio track, audio and video are not in sync in the resulting file anymore (when played in VLC). Now, I was able to overcome this problem by also reencoding the remaining audio track along the way, using

    



    ffmpeg -i Benjamín\ dúfa.avi -map 0 -map -0:a:0 -c:v copy Benjamín\ dúfa\ \(aðeins\ íslenskt\ tal\).avi

    



    But while this works, I'd like to understand why copying the audio track instead does not. I suppose it's a somewhat philosophical question --- consider it a matter of intellectual curiosity, combined with an aversion to needless lossy re-encoding.

    



    So if anyone can explain this to me, I'd very grateful. Thanks !

    



    EDIT : as per Gyan's request, here's ffmpeg's output for the first command :

    



    ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, avi, from 'Benjam├¡n d├║fa.avi':
  Metadata:
    encoder         : VirtualDubModRus 1.5.10.2 (build 2542/release)
    IAS1            : Islenska
  Duration: 01:27:37.00, start: 0.000000, bitrate: 1313 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
Output #0, avi, to 'b.avi':
  Metadata:
    IAS1            : Islenska
    ISFT            : Lavf58.29.100
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], q=2-31, 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (copy)
Press [q] to stop, [?] for help
[avi @ 0000000002bf00c0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=131425 fps=7616 q=-1.0 Lsize=  718952kB time=01:27:37.00 bitrate=1120.3kbits/s speed= 305x
video:628523kB audio:82141kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.166227%


    



    And also for the second, for comparison :

    



    ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190807
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
Input #0, avi, from 'Benjam├¡n d├║fa.avi':
  Metadata:
    encoder         : VirtualDubModRus 1.5.10.2 (build 2542/release)
    IAS1            : Islenska
  Duration: 01:27:37.00, start: 0.000000, bitrate: 1313 kb/s
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:2: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:2 -> #0:1 (mp3 (mp3float) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, avi, to 'b2.avi':
  Metadata:
    IAS1            : Islenska
    ISFT            : Lavf58.29.100
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x400 [SAR 1:1 DAR 9:5], q=2-31, 979 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp
    Metadata:
      encoder         : Lavc58.54.100 libmp3lame
[avi @ 00000000004b7440] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
frame=131425 fps=1090 q=-1.0 Lsize=  718952kB time=01:27:37.00 bitrate=1120.3kbits/s speed=43.6x
video:628523kB audio:82141kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.166233%