Recherche avancée

Médias (2)

Mot : - Tags -/media

Autres articles (43)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

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

Sur d’autres sites (8574)

  • FFMPEG : Converting from raw audio to audio/mp4 (audio is being converted with slow speed)

    29 décembre 2017, par Valdir

    If I convert from mp3 to mp4 directly everything works perfectly. But if I try to convert from raw pcm, the audio speed is slowed down.

    I’ve tried the following (this works) :

    ffmpeg -i mp3/1.mp3 -strict -2 final.mp4

    This doesn’t work as expected :

    ffmpeg -f s16le -i final.raw -strict -2 -r 26 final.mp4

    With the following output :

    Input #0, s16le, from 'final.raw':
     Duration: 00:08:37.38, bitrate: 705 kb/s
       Stream #0:0: Audio: pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s
    File 'final.mp4' already exists. Overwrite ? [y/N] y
    Output #0, mp4, to 'final.mp4':
     Metadata:
       encoder         : Lavf56.40.101
       Stream #0:0: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, mono, fltp, 128 kb/s
       Metadata:
         encoder         : Lavc56.60.100 aac
    Stream mapping:
     Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
    Press [q] to stop, [?] for help
    size=    8273kB time=00:08:37.38 bitrate= 131.0kbits/s
    video:0kB audio:8185kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.073808%

    I’ve tried to set parameters like :

    ffmpeg -ar 44100 -f s16le -i final.raw -strict -2 -r 26 final.mp4

    With no luck.

    In order to get the PCM from mp3 I’m using nodejs lame decoder :

    var decoder = new lame.Decoder({
           channels: 2,
           bitDepth: 16,
           sampleRate: 44100,
           bitRate: 128,
           outSampleRate: 44100, // 22050
           mode: lame.STEREO
       });
  • Unable to split audio using easy_audio_trimmer

    27 juillet 2023, par Sana Wasim

    can we use the easy_audio_trimmer package to split an audio ? I tried using the ffmpeg but it is conflicting with the above package and not work.

    


    I tried splitting by using these functions and it gave an error at the FlutterFFmpeg() method and i cant find an alternative also the duration(filePath) in the command final durationResult = await flutterSound.duration(filePath) ; shows an error

    


    Future<void> _splitAudio() async {&#xA;    setState(() {&#xA;      _progressVisibility = true;&#xA;    });&#xA;&#xA;    // Get the application documents directory&#xA;    final appDocumentsDirectory = await getApplicationDocumentsDirectory();&#xA;&#xA;    // Get the input audio file path&#xA;    final inputAudioPath = widget.file.path;&#xA;&#xA;    // Get the output file names for the two parts&#xA;    final outputFileName1 = &#x27;split_audio_part1.mp3&#x27;;&#xA;    final outputFileName2 = &#x27;split_audio_part2.mp3&#x27;;&#xA;&#xA;    // Get the output file paths for the two parts&#xA;    final outputPath1 = &#x27;${appDocumentsDirectory.path}/$outputFileName1&#x27;;&#xA;    final outputPath2 = &#x27;${appDocumentsDirectory.path}/$outputFileName2&#x27;;&#xA;&#xA;    // Calculate the duration of the original audio&#xA;    final originalDuration = await _getAudioDuration(inputAudioPath);&#xA;&#xA;    // Calculate the durations of the two parts&#xA;    final part1Duration = _startValue;&#xA;    final part2Duration = originalDuration - _endValue;&#xA;&#xA;    // Construct the FFmpeg command to split the audio&#xA;    final ffmpeg = FlutterFFmpeg();&#xA;    final splitCommand = &#x27;-i $inputAudioPath -ss 0 -t $part1Duration -c copy $outputPath1 -ss $_endValue -t $part2Duration -c copy $outputPath2&#x27;;&#xA;&#xA;    try {&#xA;      // Execute the FFmpeg command to split the audio&#xA;      final int result = await ffmpeg.execute(splitCommand);&#xA;&#xA;      if (result == 0) {&#xA;        setState(() {&#xA;          _progressVisibility = false;&#xA;        });&#xA;        debugPrint(&#x27;Audio split successfully.&#x27;);&#xA;      } else {&#xA;        setState(() {&#xA;          _progressVisibility = false;&#xA;        });&#xA;        debugPrint(&#x27;Failed to split audio.&#x27;);&#xA;      }&#xA;    } catch (error) {&#xA;      setState(() {&#xA;        _progressVisibility = false;&#xA;      });&#xA;      debugPrint(&#x27;Error while splitting audio: $error&#x27;);&#xA;    }&#xA;  }&#xA;&#xA;  Future<int> _getAudioDuration(String filePath) async {&#xA;    final flutterSound = FlutterSound();&#xA;    final durationResult = await flutterSound.duration(filePath);&#xA;    return durationResult.inMilliseconds;&#xA;  }&#xA;</int></void>

    &#xA;

    Dependencies

    &#xA;

     path_provider: ^2.0.15&#xA;  ffmpeg_kit_flutter: ^5.1.0&#xA;  audioplayers: ^4.1.0&#xA;  flutter_sound: ^9.2.13&#xA;

    &#xA;

  • How to batch process a series of video files with powershell and other-transcode/ffmpeg

    7 juin 2022, par DarkDiamond

    TL ;DR

    &#xA;

    What did I do wrong in the following PowerShell-Script ? It does not work as expected.

    &#xA;


    &#xA;

    I am recording some of my lectures in my university with a photo camera. This works pretty well although I have to split the single lecture into three to four parts because the camera can only record 29 minutes of video in one take. I know that this is a common issue related to some licensensing problem that most photo cameras simply don't have the right license to record longer videos. But it confronts me with the problem that I later have to edit the files together after I did some post processing on them.

    &#xA;

    With the camera I produce up to four video files with sizes around 3.5 GB which is way to big in order to be of any use because our IT department understandably doesn't want to host so much data, as I produce around 22 GB of video material each week.

    &#xA;

    Some time ago I came across a very useful tool called "other-video-transcoding" by Don Melton over on GitHub, written in ruby, that allows me to compress the files to a reasonable file size without any visual loss. In addition I crop the videos to remove the part of each frame that is neither the board nor a place where my professor stands in order to decrease the filesize even further and do some privacy protection by cutting out most of the students.

    &#xA;

    As the tools are accessable via the command line, it is relatively easy to configure and does not cost additional computational power to render a nice gui, so I can edit one of the 29 minute clips in less than 10 minutes.

    &#xA;

    Now I wanted to optimize my workflow by writing a PowerShell script that only takes the parameters what to crop and which files to work on and then does the rest on its own so I can just start the script and then do something else while my laptop renders the new files.

    &#xA;

    So far I have the following :

    &#xA;

    $video_path = Get-ChildItem ..\ -Directory | findstr "SoSe"&#xA;&#xA;Get-ChildItem $video_path -name | findstr ".MP4" | Out-File temp.txt -Append &#xA;Get-Content temp.txt | ForEach-Object {"file " &#x2B; $_} >> .\files.txt&#xA;&#xA;Get-ChildItem $video_path |&#xA;Foreach-Object {&#xA;other-transcode --hevc --mp4 --target 3000 --crop 1920:780:0:0 $_.FullName&#xA;}&#xA;&#xA;#other-transcode --hevc --mp4 --crop 1920:720:60:0 ..\SoSe22_Theo1_videos_v14_RAW\&#xA;ffmpeg -f concat -i files.txt -c copy merged.mp4&#xA;Remove-Item .\temp.txt&#xA;

    &#xA;

    but it does not quite do what I it expect to do.&#xA;This is my file system :

    &#xA;

    sciebo/&#xA;└── SoSe22_Theo1_videos/&#xA;    ├── SoSe22_Theo1_videos_v16/&#xA;    │   ├── SoSe22_Theo1_videos_v16_KOMPR/&#xA;    │   │   ├── C0001.mp4&#xA;    │   │   ├── C0002.mp4&#xA;    │   │   ├── C0003.mp4&#xA;    │   │   ├── C0004.mp4&#xA;    │   │   ├── temp.txt&#xA;    │   │   ├── files.txt&#xA;    │   │   └── merged.mp4&#xA;    │   └── SoSe22_Theo1_videos_v16_RAW/&#xA;    │       ├── C0001.mp4&#xA;    │       ├── C0002.mp4&#xA;    │       ├── C0003.mp4&#xA;    │       └── C0004.mp4&#xA;    └── SoSe22_Theo1_videos_v17/&#xA;        ├── SoSe22_Theo1_videos_v17_KOMPR&#xA;        └── SoSe22_Theo1_videos_v17_RAW/&#xA;            ├── C0006.mp4&#xA;            ├── C0007.mp4&#xA;            ├── C0008.mp4&#xA;            └── C0009.mp4&#xA;

    &#xA;

    where the 16th lecture is already processed and the 17th is not. I always have the raw video data in the folders ending on RAW and the edited/compressed output files in the one ending on KOMPR. Note that the video files in the KOMPR folder are the output files of the other-transcode tool.

    &#xA;

    The real work happens in the line where it says

    &#xA;

    other-transcode --hevc --mp4 --target 3000 --crop 1920:780:0:0 $_.FullName&#xA;

    &#xA;

    and in the line

    &#xA;

    ffmpeg -f concat -i files.txt -c copy merged.mp4&#xA;

    &#xA;

    where I concat the output files into the final version I can upload to our online learning platform.&#xA;What is wrong with my script ? In the end I'd like to pass the --crop parameter just to my script, but that is not the primary problem.

    &#xA;


    &#xA;

    A little information on the transcoding script so you don't have to look into the documentation :
    &#xA;As the last argument the tool takes the location of the video files to work on, be it relative or absolute file paths. The output is placed in the folder the script is called in, so if I cd into one of the KOMPR directories and then call

    &#xA;

    other-transcode --mp4 ../SoSe22_Theo1_videos_v16_RAW/C0001.mp4&#xA;

    &#xA;

    a new file C0001.mp4 is created in the KOMPR directory and the transcoded video and old audio are written to that new video file.

    &#xA;