Recherche avancée

Médias (2)

Mot : - Tags -/kml

Autres articles (111)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

Sur d’autres sites (11554)

  • ffmpeg h264 interesting bright video fail ?

    23 novembre 2019, par Max Paython

    I am trying streaming with ffmpeg using the information I found here.

    • Server

      ffmpeg -f dshow -i video="john":audio="doe" -vcodec libx264
      -preset ultrafast -tune zerolatency -acodec aac -f mpegts udp://localhost:1234
    • Client

      ffmpeg -i udp://localhost:1234?listen test.mp4

    The client will actually live stream the video, but for testing purposes I am writing the output to a file for now.

    Here comes the interesting part. I began the stream(video and audio) in a dark room, everything is fine. I turn on the room’s lights and the client cries with many errors. I later checked the output, it is very corrupted indeed on the light turned-on parts. What could be the reason behind this ? I am posting the errors here if it could be of assistance.

    Some of the errors :

    udp://localhost:1234?listen: corrupt decoded frame in stream 0trate= 845.6kbits/s dup=1250 drop=0 speed=1.08x
       Last message repeated 1 times
    [h264 @ 0000026c4af69400] Invalid NAL unit 1, skipping.7.61 bitrate= 864.7kbits/s dup=1441 drop=0 speed=1.07x
    [h264 @ 0000026c4af69400] Invalid level prefix
    [h264 @ 0000026c4af69400] error while decoding MB 18 8
    [h264 @ 0000026c4af69400] concealing 911 DC, 911 AC, 911 MV errors in P frame
    [h264 @ 0000026c4af4b780] Invalid NAL unit 1, skipping.
    [h264 @ 0000026c4af4b780] negative number of zero coeffs at 10 14
    [h264 @ 0000026c4af4b780] error while decoding MB 10 14
    [h264 @ 0000026c4af4b780] concealing 679 DC, 679 AC, 679 MV errors in P frame
    udp://localhost:1234?listen: corrupt decoded frame in stream 0
       Last message repeated 1 times
    [h264 @ 0000026c4ba1e1c0] Invalid NAL unit 1, skipping.8.21 bitrate= 858.0kbits/s dup=1460 drop=0 speed=1.07x
    [h264 @ 0000026c4ba1e1c0] out of range intra chroma pred mode
    [h264 @ 0000026c4ba1e1c0] error while decoding MB 34 18
    [h264 @ 0000026c4ba1e1c0] concealing 495 DC, 495 AC, 495 MV errors in P frame
    [h264 @ 0000026c4bb16840] top block unavailable for requested intra mode
    [h264 @ 0000026c4bb16840] error while decoding MB 10 0
    [h264 @ 0000026c4bb16840] concealing 160 DC, 160 AC, 160 MV errors in P frame
    udp://localhost:1234?listen: corrupt decoded frame in stream 0
    [h264 @ 0000026c4bb16cc0] Invalid NAL unit 0, skipping.8.58 bitrate= 853.9kbits/s dup=1463 drop=0 speed=1.06x
    [h264 @ 0000026c4bb16cc0] corrupted macroblock 16 28 (total_coeff=-1)
    [h264 @ 0000026c4bb16cc0] error while decoding MB 16 28
    [h264 @ 0000026c4bb16cc0] concealing 113 DC, 113 AC, 113 MV errors in P frame
    [h264 @ 0000026c4bb17140] cbp too large (84) at 12 0
    [h264 @ 0000026c4bb17140] error while decoding MB 12 0
    [h264 @ 0000026c4bb17140] concealing 160 DC, 160 AC, 160 MV errors in P frame
    [mpegts @ 0000026c4aeb8d80] PES packet size mismatch

    Edit : As suggestion, I added these parameters to the server.

    -b:v 1M -bufsize 2M

    Now the errors are mostly gone. Except one time where it seemed like it occured just as I was turning off the lights, although I could not reproduce it after trying 4-5 times.

    Errors :

    [h264 @ 000002646f0d2f80] cbp too large (118) at 23 1422.25 bitrate= 659.5kbits/s dup=368 drop=0 speed=1.33x
    [h264 @ 000002646f0d2f80] error while decoding MB 23 14
    [mpegts @ 000002646e578d80] PES packet size mismatch
    [h264 @ 000002646f0d2f80] concealing 666 DC, 666 AC, 666 MV errors in P frame
    [h264 @ 000002646f0d0f80] concealing 160 DC, 160 AC, 160 MV errors in P frame
    [aac @ 000002646e64d640] Number of bands (59) exceeds limit (43).
    Error while decoding stream #0:1: Invalid data found when processing input
    [aac @ 000002646e64d640] Multiple frames in a packet.
    [aac @ 000002646e64d640] Reserved bit set.
    [aac @ 000002646e64d640] Number of bands (31) exceeds limit (29).
    Error while decoding stream #0:1: Invalid data found when processing input
    [h264 @ 000002646e5e11c0] concealing 160 DC, 160 AC, 160 MV errors in P frame
    udp://localhost:1234?listen: corrupt decoded frame in stream 0trate= 633.1kbits/s dup=368 drop=0 speed=1.35x
       Last message repeated 2 times

    The errors decreased because I increased the bitrate ? (I don’t know the default bitrate by the way). Bright decoding fails because it carries more information, data ? (same in raw video, but maybe file is heavier encoded bright frames)

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