Recherche avancée

Médias (0)

Mot : - Tags -/signalement

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

Autres articles (57)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Des sites réalisés avec MediaSPIP

    2 mai 2011, par

    Cette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
    Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

Sur d’autres sites (5902)

  • Mac terminal command to list files and sort by date to use in ffmpeg

    22 septembre 2020, par Jeff

    I am using a gopro to film a bunch of videos. I want to then take those videos directly from the SD card folder and concatenate them into a single video (bypass an editor) by using FFMPEG.

    


    I'm currently able to stitch together "chaptered" videos with the following example command on my Mac (10.13) :

    


    ffmpeg -f concat -safe 0 -i <(for f in /sdcardfolder/100GOPRO/GH*488.MP4; do echo "file '$f'"; done) -c copy /folder/video.mp4

    


    The reason for this is that the ffmpeg command requires a text file that looks like this :

    


    


    file '/folder/GH016992.MP4'

    
file '/folder/GH036990.MP4'

    
...

    


    


    The real command is this, which generates the list of files in the right format with file in front of each one and can be embedded into the ffmpeg command :

    


    for f in /Volumes/GoPro8/DCIM/100GOPRO/GH0*71*.MP4; do echo "file '$f'"; done

    


    I want to add 2 changes to this :

    


      

    1. List the files in date order (ascending) : I want the list of files to be in date order. But I can't figure out how to add a -sort or something to the for f in command.

      


    2. 


    3. Allow a more robust set of file matching/filtering : Right now I can add basic regex like GH*488.MP4 or, with chapters which increments the first number, something like GH0[123]488.MP4 would work to just get the first few. But when I change it to be more flexible like GH0[0-9]71[0-9][0-9].MP4 - which would be necessary to match all files that were recorded yesterday, but nothing before then, the command doesn't like this regex. It seems to only accept a *.

      


    4. 


    


    I looked at a few examples like https://opensource.com/article/19/6/how-write-loop-bash but there wasn't much more than just listing files.

    


    This boils down to a terminal command and isn't really related to FFMPEG but I hope it's helpful context.

    


    I imagined it would be something like this, but this definitely doesn't work :

    


    for f in (find /Volumes/GoPro8/DCIM/100GOPRO/GH0[0-9]71[0-9][0-9].MP4 -type f | sort); do echo "file '$f'"; done

    


    I'd appreciate any help ! Thanks !

    


    Update

    


    It looks like sorting isn't easy with Mac tools so I gave up and wrote a much simpler Ruby script that could execute everything for me. This is not really an answer to my question above but it is a solution.

    


    Here I can easily write the text file necessary for ffmpeg and I can also filter files with a regex on the name, filter for a particular date, and size. Then, via the script, simply execute the ffmpeg command with args to concat files. I can also have it immediately resample the file to compress it (gopro videos are giant and I'm ok with a much lower bitrate if I want to save raw footage).

    


    I got lucky with this Dir.entries in Ruby - it seems to automatically sort by date ? I don't know how to sort it otherwise.

    


    PATH = '/Volumes/GoPro8/DCIM/100GOPRO/'
NEW_FILENAME = '/folder/new-file.mp4'
video_list = '/folder/ffmpeg-list.txt'

# create the text file
File.delete(video_list) if File.exist?(video_list)
i = 1
Dir.entries(PATH).each do |f|
    d = File.mtime(PATH + f)
    size = File.size(PATH + f)
    if f.match(/GH0.*.MP4/) && d.to_s.match(/2020-07-30/) && size.to_i < 1000000000
        puts "#{i}\t#{f}\t#{d}\t#{size}"
        File.write(video_list, "file #{PATH + f}\n", mode: "a")
        i= i+1
    end
end

command = "ffmpeg -f concat -safe 0 -i #{video_list} -c copy #{NEW_FILENAME}"

puts "executing concatenate..."
puts command
system(command)


    


  • Android ffmpeg Issue :- : No such file or directory

    15 février 2014, par Nirav Dangi

    I am using FFMPEG tool to merge IMAGE & AUDIO files. Its working only in SAMSUNG GALAXY TAB II.
    I had tried in many android devices & emulators but unfortunately it had not worked in any of them.

    Same issue is posted here also. But Its solutions has not worked for me.

    Following is error log of emulator,

    02-15 08:46:33.667: D/NIRAV(921): Shell Line : /data/data/org.ffmpeg.android/lib/libffmpeg.so -y -loop 1 -r 1 -i /mnt/sdcard/ffmpeg/img.jpg -i /mnt/sdcard/ffmpeg/myrecord.mp4 -acodec aac -vcodec mpeg4 -s 480x320 -strict experimental -b:a 32k -shortest -f mp4 -r 2 /mnt/sdcard/ffmpeg/out.mp4
    02-15 08:46:33.707: D/NIRAV(921): Shell Line : ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
    02-15 08:46:33.717: D/NIRAV(921): Shell Line :   built on Nov 15 2013 00:50:10 with gcc 4.6 20120106 (prerelease)
    02-15 08:46:33.717: D/NIRAV(921): Shell Line :   configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --enable-small --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk//platforms/android-3/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon' --extra-ldflags=-L../x264 --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --enable-muxer=md5
    02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavutil      51. 54.100 / 51. 54.100
    02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavcodec     54. 23.100 / 54. 23.100
    02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavformat    54.  6.100 / 54.  6.100
    02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavdevice    54.  0.100 / 54.  0.100
    02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libavfilter     2. 77.100 /  2. 77.100
    02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libswscale      2.  1.100 /  2.  1.100
    02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libswresample   0. 15.100 /  0. 15.100
    02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libpostproc    52.  0.100 / 52.  0.100
    02-15 08:46:33.747: D/NIRAV(921): Shell Line : /mnt/sdcard/ffmpeg/img.jpg: No such file or directory
    02-15 08:46:33.747: D/NIRAV(921): Exit Value : 1

    I had verified the path of img.jpg & myrecord.mp4 files.
    I am using android-ndk-r7 to build ffmpeg.

  • Android ffmpeg Issue :- : No such file or directory

    22 décembre 2020, par Nirav Dangi

    I am using FFMPEG tool to merge IMAGE & AUDIO files. Its working only in SAMSUNG GALAXY TAB II.
I had tried in many android devices & emulators but unfortunately it had not worked in any of them.

    



    Same issue is posted here also. But Its solutions has not worked for me.

    



    Following is error log of emulator,

    



    02-15 08:46:33.667: D/NIRAV(921): Shell Line : /data/data/org.ffmpeg.android/lib/libffmpeg.so -y -loop 1 -r 1 -i /mnt/sdcard/ffmpeg/img.jpg -i /mnt/sdcard/ffmpeg/myrecord.mp4 -acodec aac -vcodec mpeg4 -s 480x320 -strict experimental -b:a 32k -shortest -f mp4 -r 2 /mnt/sdcard/ffmpeg/out.mp4 
02-15 08:46:33.707: D/NIRAV(921): Shell Line : ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers
02-15 08:46:33.717: D/NIRAV(921): Shell Line :   built on Nov 15 2013 00:50:10 with gcc 4.6 20120106 (prerelease)
02-15 08:46:33.717: D/NIRAV(921): Shell Line :   configuration: --arch=arm --cpu=cortex-a8 --target-os=linux --enable-runtime-cpudetect --enable-small --prefix=/data/data/info.guardianproject.ffmpeg/app_opt --enable-pic --disable-shared --enable-static --cross-prefix=/home/n8fr8/dev/android/ndk//toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi- --sysroot=/home/n8fr8/dev/android/ndk//platforms/android-3/arch-arm --extra-cflags='-I../x264 -mfloat-abi=softfp -mfpu=neon' --extra-ldflags=-L../x264 --enable-version3 --enable-gpl --disable-doc --enable-yasm --enable-decoders --enable-encoders --enable-muxers --enable-demuxers --enable-parsers --enable-protocols --enable-filters --enable-avresample --enable-libfreetype --disable-indevs --enable-indev=lavfi --disable-outdevs --enable-hwaccels --enable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --enable-libx264 --enable-zlib --enable-muxer=md5
02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavutil      51. 54.100 / 51. 54.100
02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavcodec     54. 23.100 / 54. 23.100
02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavformat    54.  6.100 / 54.  6.100
02-15 08:46:33.717: D/NIRAV(921): Shell Line :   libavdevice    54.  0.100 / 54.  0.100
02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libavfilter     2. 77.100 /  2. 77.100
02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libswscale      2.  1.100 /  2.  1.100
02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libswresample   0. 15.100 /  0. 15.100
02-15 08:46:33.727: D/NIRAV(921): Shell Line :   libpostproc    52.  0.100 / 52.  0.100
02-15 08:46:33.747: D/NIRAV(921): Shell Line : /mnt/sdcard/ffmpeg/img.jpg: No such file or directory
02-15 08:46:33.747: D/NIRAV(921): Exit Value : 1


    



    I had verified the path of img.jpg & myrecord.mp4 files.
I am using android-ndk-r7 to build ffmpeg.