Recherche avancée

Médias (91)

Autres articles (86)

  • Encoding and processing into web-friendly formats

    13 avril 2011, par

    MediaSPIP automatically converts uploaded files to internet-compatible formats.
    Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
    Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
    Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
    All uploaded files are stored online in their original format, so you can (...)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

Sur d’autres sites (12316)

  • Why PyAudio doesn't read 'mp3' ?

    22 octobre 2020, par freshITmeat

    I tried to read file that I give with absolute path.
When I run my code first that I see is this message :

    


    D:\prog\datascience\anaconda\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work
  warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning)


    


    I tried this :

    


    PATH_TO_FFMPEG = 'D:\\prog\\ffmpeg-win-2.2.2\\ffmpeg.exe'
pydub.AudioSegment.converter = r'D:\\prog\\ffmpeg-win-2.2.2\\ffmpeg.exe'


    


    And I separately installed ffmpeg with pip. But it didn't help.
When I try this :

    


    raw_sound = pydub.AudioSegment.from_mp3(file=track_path)


    


    where track_path is correct absolute path generated automatically.
So I got this this error :

    


    Traceback (most recent call last):&#xA;  File "D:\prog\PyCharm Community Edition 2020.2.2\plugins\python-ce\helpers\pydev\pydevd.py", line 1448, in _exec&#xA;    pydev_imports.execfile(file, globals, locals)  # execute the script&#xA;  File "D:\prog\PyCharm Community Edition 2020.2.2\plugins\python-ce\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile&#xA;    exec(compile(contents&#x2B;"\n", file, &#x27;exec&#x27;), glob, loc)&#xA;  File "D:/testtask2/test_task/testtask/get_mffc.py", line 165, in <module>&#xA;    slice_all_in_a_dir(&#x27;May 27 2020 LNC/Hydrophone 1/raw_records&#x27;)&#xA;  File "D:/testtask2/test_task/testtask/get_mffc.py", line 70, in slice_all_in_a_dir&#xA;    slice_samples(track_path= [file],&#xA;  File "D:/testtask2/test_task/testtask/get_mffc.py", line 48, in slice_samples&#xA;    raw_sound = pydub.AudioSegment.from_mp3(file=track_path)&#xA;  File "D:\prog\datascience\anaconda\lib\site-packages\pydub\audio_segment.py", line 738, in from_mp3&#xA;    return cls.from_file(file, &#x27;mp3&#x27;, parameters=parameters)&#xA;  File "D:\prog\datascience\anaconda\lib\site-packages\pydub\audio_segment.py", line 680, in from_file&#xA;    stdin_data = file.read()&#xA;AttributeError: &#x27;list&#x27; object has no attribute &#x27;read&#x27;&#xA;python-BaseException&#xA;</module>

    &#xA;

  • How to combine/concatenate videos stored in AWS S3 bucket based on title of the file name

    9 juin 2020, par orangecube

    I am using a service that allows me to record videos that get automatically pushed to a folder (submissions) in an S3 bucket. There are multiple videos however they need to be grouped together and concatenated so the output is one video per group.

    &#xA;&#xA;

    So, basically, any tips on how I can take videos based on the title and stitch them together ?

    &#xA;&#xA;

    Example :

    &#xA;&#xA;

    Submissions folder will have :

    &#xA;&#xA;

    a-100-2.mp4&#xA;a-200-6.mp4&#xA;b-123-5.mp4&#xA;

    &#xA;&#xA;

    Expected output in processed folder :

    &#xA;&#xA;

    a.mp4     - (both &#x27;a&#x27; videos get stitched together)&#xA;b.mp4     - (only &#x27;b&#x27; gets sent over since there is only one video.)&#xA;

    &#xA;&#xA;

    Thanks in advance !

    &#xA;&#xA;

    Edit : Some additional and detailed information below if it helps.

    &#xA;&#xA;

    The files will be labeled with :&#xA;name-location-video_token-stream_token.mp4

    &#xA;&#xA;

    Need help creating a script or process that will concatenate the videos using the procedure outlined below :

    &#xA;&#xA;

    Processing rules (back end) :

    &#xA;&#xA;

      &#xA;
    1. Check if videos have same video_token in ‘submissions folder’. If so, keep the newest one and delete old ones.

    2. &#xA;

    3. Take all videos in ‘submissions folder’ with same name and location in title and concatenate the videos. Save output video to a new folder in the bucket labeled as the location for the folder name. &#xA;Output file name : &#xA;name-location-year.mp4.

    4. &#xA;

    &#xA;&#xA;

    EXAMPLE :

    &#xA;&#xA;

    Submissions folder :&#xA;joey-toronto-001-354.mp4

    &#xA;&#xA;

    joey-toronto-001-241.mp4 - this will be deleted

    &#xA;&#xA;

    joey-toronto-103-452.mp4

    &#xA;&#xA;

    alex-montreal-352-232.mp4

    &#xA;&#xA;

    alex-montreal-452-223.mp4

    &#xA;&#xA;

    Resulting output :

    &#xA;&#xA;

    Toronto folder :

    &#xA;&#xA;

    Joey-toronto-2020.mp4

    &#xA;&#xA;

    Montreal folder :

    &#xA;&#xA;

    Alex-montreal-2020.mp4

    &#xA;

  • MobileFFMPEG Output file #0 does not contain any stream

    30 septembre 2020, par Alhaj

    I am using implementation 'com.arthenica:mobile-ffmpeg-full:4.4'

    &#xA;

    I just want o crop audio file to 10 second to 20 second

    &#xA;

    '''&#xA;fun cropAudio(input :String)

    &#xA;

        val newFileName = UUID.randomUUID().toString()&#xA;&#xA;    val location: String = getBatchDirectoryName()!!&#xA;&#xA;    val output: String = location &#x2B; "/" &#x2B; newFileName &#x2B; ".mp3"&#xA;&#xA;    val temp=" -i $input -ss 60 -to 70 $output"&#xA;&#xA;    Log.e("alhaj", " a $s")&#xA;&#xA;    FFmpeg.execute(temp, object : ExecuteCallback {&#xA;&#xA;        fun onSuccess(message: String?) {&#xA;            uploadOnFirebase(output, title)&#xA;            mediaPlayer.stop()&#xA;            Log.e("alhaj", message!!)&#xA;        }&#xA;&#xA;        override fun apply(executionId: kotlin.Long, returnCode: Int) {&#xA;            if (returnCode == RETURN_CODE_SUCCESS) {&#xA;                Log.i("alhaj", "Async command execution completed successfully.");&#xA;            } else if (returnCode == RETURN_CODE_CANCEL) {&#xA;                Log.i("alhaj", "Async command execution cancelled by user.");&#xA;            } else {&#xA;                Log.i("alhaj", String.format("Async command execution failed with rc=%d.", returnCode));&#xA;            }&#xA;        }&#xA;    }.toString())&#xA;}&#xA;

    &#xA;

    '''

    &#xA;

    but i am getting error

    &#xA;

    '''

    &#xA;

    2020-09-30 03:13:41.079 10300-10410/com.example.touchmeadmin I/mobile-ffmpeg : Output #0, mp3, to ' -i /storage/emulated/0/AJ backup/songs/Maroon 5 - Memories (Official Video) ( 256kbps cbr ).mp3 -ss 60 -to 70 /storage/emulated/0/Android/data/com.example.touchmeadmin/files/Music/830350fd-5218-4ee0-bd99-0dd50b802930.mp3' :&#xA;2020-09-30 03:13:41.079 10300-10410/com.example.touchmeadmin E/mobile-ffmpeg : Output file #0 does not contain any stream

    &#xA;

    '''

    &#xA;