Recherche avancée

Médias (0)

Mot : - Tags -/xmlrpc

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

Autres articles (86)

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

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (3424)

  • ffmpeg - concatenate files while space constrained

    23 juillet 2023, par glodomorrapl

    Let's say i have a 2 TB drive. If i want to use ffmpeg to concatenate two files, they cannot be larger than 1 TB in total, otherwise I won't have enough storage space to save the output file.

    


    Is it possible for ffmpeg (or, perhaps, another tool) to losslessly concatenate two videos while also removing parts of the source files on the fly, allowing me to concatenate larger files ? The files in questions will be encoded with the ffv1 codec and saved as mkv, although I'm fine with trying different containers.

    


    Would saving files in smaller chunks to begin with be the only solution ?

    


  • ffmpeg doesn't record RTSP stream

    7 août 2023, par zcoder

    I'm trying to record RTSP stream from Dahua IP camera which is located on 10.10.10.10 (for example purpose), on Windows it works well and on previous ubuntu version I had (18) it was also working well.
However on Ubuntu Server 22.04 it runs but ends without any error.

    


    My command :
ffmpeg -loglevel debug -i rtsp://admin:admin@10.10.10.10:554/cam/realmonitor?channel=1"&"subtype=1 -movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov -acodec copy -vcodec copy out.mp4

    


    And debug output of the ffmpeg is :

    


    ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument 'rtsp://admin:admin@10.10.10.10:554/cam/realmonitor?channel=1&subtype=1'.
Reading option '-movflags' ... matched as AVOption 'movflags' with argument '+frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with argument 'copy'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option '123.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://admin:admin@10.10.10.10:554/cam/realmonitor?channel=1&subtype=1.
Successfully parsed a group of options.
Opening an input file: rtsp://admin:admin@10.10.10.10:554/cam/realmonitor?channel=1&subtype=1.
[tcp @ 0x55c812986800] No default whitelist set
[tcp @ 0x55c812986800] Original list of addresses:
[tcp @ 0x55c812986800] Address 10.10.10.10 port 554
[tcp @ 0x55c812986800] Interleaved list of addresses:
[tcp @ 0x55c812986800] Address 10.10.10.10 port 554
[tcp @ 0x55c812986800] Starting connection attempt to 10.10.10.10 port 554
[tcp @ 0x55c812986800] Successfully connected to 10.10.10.10 port 554
[rtsp @ 0x55c812983740] SDP:
v=0
o=- 2252669512 2252669512 IN IP4 0.0.0.0
s=Media Server
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=packetization-supported:DH
a=rtppayload-supported:DH
a=range:npt=now-
m=video 0 RTP/AVP 98
a=control:trackID=0
a=framerate:25.000000
a=rtpmap:98 H265/90000
a=fmtp:98 profile-id=1;sprop-sps=QgEBAUAAAAMAAAMAAAMAAAMAmaAFggCQf5a7kbBrlUE=;sprop-pps=RAHAc8BMkA==;sprop-vps=QAEMAf//AUAAAAMAAAMAAAMAAAMAmawJ
a=recvonly

[rtsp @ 0x55c812983740] video codec set to: hevc
[rtp @ 0x55c8129899c0] No default whitelist set
[udp @ 0x55c81298a480] No default whitelist set
[udp @ 0x55c81298a480] end receive buffer size reported is 425984
[udp @ 0x55c812989e00] No default whitelist set
[udp @ 0x55c812989e00] end receive buffer size reported is 425984
[rtsp @ 0x55c812983740] setting jitter buffer size to 500
[rtsp @ 0x55c812983740] hello state=0
Failed to parse interval end specification ''
[hevc @ 0x55c812989100] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] Decoding VPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding SPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding PPS
[hevc @ 0x55c812989100] nal_unit_type: 32(VPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 33(SPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] nal_unit_type: 34(PPS), nuh_layer_id: 0, temporal_id: 0
[hevc @ 0x55c812989100] Decoding VPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding SPS
[hevc @ 0x55c812989100] Main profile bitstream
[hevc @ 0x55c812989100] Decoding PPS
Input #0, rtsp, from 'rtsp://admin:admin@10.10.10.10:554/cam/realmonitor?channel=1&subtype=1':
  Metadata:
    title           : Media Server
  Duration: N/A, bitrate: N/A
  Stream #0:0, 0, 1/90000: Video: hevc (Main), 1 reference frame, yuv420p(tv, left), 704x576, 0/1, 90k tbr, 90k tbn, 90k tbc
Successfully opened the file.
Parsing a group of options: output url out.mp4.
Applying option acodec (force audio codec ('copy' to copy stream)) with argument copy.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Successfully parsed a group of options.
Opening an output file: out.mp4.
File '123.mp4' already exists. Overwrite? [y/N] y
[file @ 0x55c8129ba9c0] Setting default whitelist 'file,crypto,data'
Successfully opened the file.
[mp4 @ 0x55c8129bb800] Empty MOOV enabled; disabling automatic bitstream filtering
Output #0, mp4, to 'out.mp4':
  Metadata:
    title           : Media Server
    encoder         : Lavf58.76.100
  Stream #0:0, 0, 1/90000: Video: hevc (Main), 1 reference frame (hev1 / 0x31766568), yuv420p(tv, left), 704x576 (0x0), 0/1, q=2-31, 90k tbr, 90k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
No more output streams to write to, finishing.e=00:00:00.00 bitrate=N/A speed=   0x
frame=    0 fps=0.0 q=-1.0 Lsize=       1kB time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input file #0 (rtsp://admin:admin@10.10.10.10:554/cam/realmonitor?channel=1&subtype=1):
  Input stream #0:0 (video): 0 packets read (0 bytes);
  Total: 0 packets (0 bytes) demuxed
Output file #0 (123.mp4):
  Output stream #0:0 (video): 0 packets muxed (0 bytes);
  Total: 0 packets (0 bytes) muxed
0 frames successfully decoded, 0 decoding errors



    


    I would like to record stream to mp4 file. Any ideas ?

    


  • Decoding pcm_s16le with FFMPEG ?

    21 janvier, par Davide Caresia

    i have a problem decoding a wav file using ffmpeg. I'm new to it and i'm not quite used to it.

    



    In my application i have to input the audio file and get an array of samples to work on. 
I used ffmpeg to create a function that gets in input the path of the file, the position in time where to start to output the samples and the lenght of the chunk to decode in seconds.

    



    I have no reputation, so I had to make a gdrive directory where you can see the problem and the files on which I worked.

    



    Here it is : https://goo.gl/8KnjAj

    



    When I try to decode the file harp.wav everything runs fine, and I can plot the samples as in the image plot-harp.png

    



    The file is a WAV file encoded as : pcm_u8, 11025 Hz, 1 channels, u8, 88 kb/s

    



    The problems comes when i try to decode the file demo-unprocessed.wav.
It outputs a series of samples that has no sense. It outputs a serie of samples plotted as the image graph1-demo.jpg shows.

    



    The file is a WAV file encoded as : pcm_s16le, 44100 Hz, 1 channels, s16, 705 kb/s

    



    IDK where the problem in my code is, I already checked the code before and after the decoding with FFMPEG, and it works absolutely fine.

    



    Here is the code for the dataReader.cpp :

    



    /* Start by including the necessary */&#xA;#include "dataReader.h"&#xA;#include <cstdlib>&#xA;#include <iostream>&#xA;#include <fstream>&#xA;&#xA;#ifdef __cplusplus&#xA;extern "C" {&#xA;#endif&#xA;    #include <libavcodec></libavcodec>avcodec.h> &#xA;    #include <libavformat></libavformat>avformat.h>&#xA;    #include <libavutil></libavutil>avutil.h>&#xA;#ifdef __cplusplus &#xA;}&#xA;#endif&#xA;&#xA;using namespace std;&#xA;&#xA;/* initialization function for audioChunk */&#xA;audioChunk::audioChunk(){&#xA;    data=NULL;&#xA;    size=0;&#xA;    bitrate=0;&#xA;}&#xA;&#xA;/* function to get back chunk lenght in seconds */&#xA;int audioChunk::getTimeLenght(){&#xA;    return size/bitrate;&#xA;}&#xA;&#xA;/* initialization function for audioChunk_dNorm */&#xA;audioChunk_dNorm::audioChunk_dNorm(){&#xA;    data=NULL;&#xA;    size=0;&#xA;    bitrate=0;&#xA;}&#xA;&#xA;/* function to get back chunk lenght in seconds */&#xA;int audioChunk_dNorm::getTimeLenght(){&#xA;    return size/bitrate;&#xA;}&#xA;&#xA;/* function to normalize audioChunk into audioChunk_dNorm */&#xA;void audioChunk_dNorm::fillAudioChunk(audioChunk* cnk){&#xA;&#xA;    size=cnk->size;&#xA;    bitrate=cnk->bitrate;&#xA;&#xA;    double min=cnk->data[0];&#xA;    double max=cnk->data[0];&#xA;&#xA;    for(int i=0;isize;i&#x2B;&#x2B;){&#xA;        if(*(cnk->data&#x2B;i)>max) max=*(cnk->data&#x2B;i);&#xA;        else if(*(cnk->data&#x2B;i)data&#x2B;i);&#xA;    }&#xA;&#xA;    data=new double[size];&#xA;&#xA;    for(int i=0;i/data[i]=cnk->data[i]&#x2B;256*data[i&#x2B;1];&#xA;        if(data[i]!=255) data[i]=2*((cnk->data[i])-(max-min)/2)/(max-min);&#xA;        else data[i]=0;&#xA;    }&#xA;    cout&lt;&lt;"bitrate "&lt;* inizialize audioChunk */&#xA;    audioChunk output;&#xA;&#xA;    /* Check input times */&#xA;    if((start_time&lt;0)||(lenght&lt;0)) {&#xA;        cout&lt;&lt;"Input times should be positive";&#xA;        return output;&#xA;    }&#xA;&#xA;    /* Start FFmpeg */&#xA;    av_register_all();&#xA;&#xA;    /* Initialize the frame to read the data and verify memory allocation */&#xA;    AVFrame* frame = av_frame_alloc();&#xA;    if (!frame)&#xA;    {&#xA;        cout &lt;&lt; "Error allocating the frame" &lt;&lt; endl;&#xA;        return output;&#xA;    }&#xA;&#xA;    /* Initialization of the Context, to open the file */&#xA;    AVFormatContext* formatContext = NULL;&#xA;    /* Opening the file, and check if it has opened */&#xA;    if (avformat_open_input(&amp;formatContext, path_name, NULL, NULL) != 0)&#xA;    {&#xA;        av_frame_free(&amp;frame);&#xA;        cout &lt;&lt; "Error opening the file" &lt;&lt; endl;&#xA;        return output;&#xA;    }&#xA;&#xA;    /* Find the stream info, if not found, exit */&#xA;    if (avformat_find_stream_info(formatContext, NULL) &lt; 0)&#xA;    {&#xA;        av_frame_free(&amp;frame);&#xA;        avformat_close_input(&amp;formatContext);&#xA;        cout &lt;&lt; "Error finding the stream info" &lt;&lt; endl;&#xA;        return output;&#xA;    }&#xA;&#xA;    /* Check inputs to verify time input */&#xA;    if(start_time>(formatContext->duration/1000000)){&#xA;        cout&lt;&lt; "Error, start_time is over file duration"&lt;* Chunk = number of samples to output */&#xA;    long long int chunk = ((formatContext->bit_rate)*lenght/8);&#xA;    /* Start = address of sample where start to read */&#xA;    long long int start = ((formatContext->bit_rate)*start_time/8);&#xA;    /* Tot_sampl = number of the samples in the file */&#xA;    long long int tot_sampl = (formatContext->bit_rate)*(formatContext->duration)/8000000;&#xA;&#xA;    /* Set the lenght of chunk to avoid segfault and to read all the file */&#xA;    if (start&#x2B;chunk>tot_sampl) {chunk = tot_sampl-start;}&#xA;    if (lenght==0) {start = 0; chunk = tot_sampl;}&#xA;&#xA;    /* initialize the array to output */&#xA;    output.data = new unsigned char[chunk];&#xA;    output.bitrate = formatContext->bit_rate;&#xA;    output.size=chunk;&#xA;&#xA;    av_dump_format(formatContext,0,NULL,0);&#xA;    cout&lt;* Find the audio Stream, if no audio stream are found, clean and exit */&#xA;    AVCodec* cdc = NULL;&#xA;    int streamIndex = av_find_best_stream(formatContext, AVMEDIA_TYPE_AUDIO, -1, -1, &amp;cdc, 0);&#xA;    if (streamIndex &lt; 0)&#xA;    {&#xA;        av_frame_free(&amp;frame);&#xA;        avformat_close_input(&amp;formatContext);&#xA;        cout &lt;&lt; "Could not find any audio stream in the file" &lt;&lt; endl;&#xA;        return output;&#xA;    }&#xA;&#xA;    /* Open the audio stream to read data  in audioStream */&#xA;    AVStream* audioStream = formatContext->streams[streamIndex];&#xA;&#xA;    /* Initialize the codec context */&#xA;    AVCodecContext* codecContext = audioStream->codec;&#xA;    codecContext->codec = cdc;&#xA;    /* Open the codec, and verify if it has opened */&#xA;    if (avcodec_open2(codecContext, codecContext->codec, NULL) != 0)&#xA;    {&#xA;        av_frame_free(&amp;frame);&#xA;        avformat_close_input(&amp;formatContext);&#xA;        cout &lt;&lt; "Couldn&#x27;t open the context with the decoder" &lt;&lt; endl;&#xA;        return output;&#xA;    }&#xA;&#xA;    /* Initialize buffer to store compressed packets */&#xA;    AVPacket readingPacket;&#xA;    av_init_packet(&amp;readingPacket);&#xA;&#xA;&#xA;    int j=0;&#xA;    int count = 0; &#xA;&#xA;    while(av_read_frame(formatContext, &amp;readingPacket)==0){&#xA;        if((count&#x2B;readingPacket.size)>start){&#xA;            if(readingPacket.stream_index == audioStream->index){&#xA;&#xA;                AVPacket decodingPacket = readingPacket;&#xA;&#xA;                // Audio packets can have multiple audio frames in a single packet&#xA;                while (decodingPacket.size > 0){&#xA;                    // Try to decode the packet into a frame&#xA;                    // Some frames rely on multiple packets, so we have to make sure the frame is finished before&#xA;                    // we can use it&#xA;                    int gotFrame = 0;&#xA;                    int result = avcodec_decode_audio4(codecContext, frame, &amp;gotFrame, &amp;decodingPacket);&#xA;&#xA;                    count &#x2B;= result;&#xA;&#xA;                    if (result >= 0 &amp;&amp; gotFrame)&#xA;                    {&#xA;                        decodingPacket.size -= result;&#xA;                        decodingPacket.data &#x2B;= result;&#xA;                        int a;&#xA;&#xA;                        for(int i=0;idata[0][i];&#xA;&#xA;                            j&#x2B;&#x2B;;&#xA;                            if(j>=chunk) break;&#xA;                        }&#xA;&#xA;                        // We now have a fully decoded audio frame&#xA;                    }&#xA;                    else&#xA;                    {&#xA;                        decodingPacket.size = 0;&#xA;                        decodingPacket.data = NULL;&#xA;                    }&#xA;                    if(j>=chunk) break;&#xA;                }&#xA;            }              &#xA;        }else count&#x2B;=readingPacket.size;&#xA;&#xA;        // To prevent memory leak, must free packet.&#xA;        av_free_packet(&amp;readingPacket);&#xA;        if(j>=chunk) break;&#xA;    }&#xA;&#xA;    // Some codecs will cause frames to be buffered up in the decoding process. If the CODEC_CAP_DELAY flag&#xA;    // is set, there can be buffered up frames that need to be flushed, so we&#x27;ll do that&#xA;    if (codecContext->codec->capabilities &amp; CODEC_CAP_DELAY)&#xA;    {&#xA;        av_init_packet(&amp;readingPacket);&#xA;        // Decode all the remaining frames in the buffer, until the end is reached&#xA;        int gotFrame = 0;&#xA;        int a;&#xA;        int result=avcodec_decode_audio4(codecContext, frame, &amp;gotFrame, &amp;readingPacket);&#xA;        while (result >= 0 &amp;&amp; gotFrame)&#xA;        {&#xA;            // We now have a fully decoded audio frame&#xA;            for(int i=0;idata[0][i];&#xA;&#xA;                j&#x2B;&#x2B;;&#xA;                if(j>=chunk) break;&#xA;            }&#xA;            if(j>=chunk) break;&#xA;        }&#xA;    }&#xA;&#xA;    // Clean up!&#xA;    av_free(frame);&#xA;    avcodec_close(codecContext);&#xA;    avformat_close_input(&amp;formatContext);&#xA;&#xA;    cout&lt;&lt;"Ended Reading, "&lt;code></fstream></iostream></cstdlib>

    &#xA;&#xA;

    Here is the dataReader.h

    &#xA;&#xA;

    /* &#xA; * File:   dataReader.h&#xA; * Author: davide&#xA; *&#xA; * Created on 27 luglio 2015, 11.11&#xA; */&#xA;&#xA;#ifndef DATAREADER_H&#xA;#define DATAREADER_H&#xA;&#xA;/* function that reads a file and outputs an array of samples&#xA; * @ path_name = the path of the file to read&#xA; * @ start_time = the position where to start the data reading, 0 = start&#xA; *                the time is in seconds, it can hold to 10e-6 seconds&#xA; * @ lenght = the lenght of the frame to extract the data, &#xA; *            0 = read all the file (do not use with big files)&#xA; *            if lenght > of file duration, it reads through the end of file.&#xA; *            the time is in seconds, it can hold to 10e-6 seconds  &#xA; */&#xA;&#xA;#include &#xA;&#xA;class audioChunk{&#xA;public:&#xA;    uint8_t *data;&#xA;    unsigned int size;&#xA;    int bitrate;&#xA;    int getTimeLenght();&#xA;    audioChunk();&#xA;};&#xA;&#xA;class audioChunk_dNorm{&#xA;public:&#xA;    double* data;&#xA;    unsigned int size;&#xA;    int bitrate;&#xA;    int getTimeLenght();&#xA;    void fillAudioChunk(audioChunk* cnk);&#xA;    audioChunk_dNorm();&#xA;};&#xA;&#xA;audioChunk readData(const char* path_name, const double start_time, const double lenght);&#xA;&#xA;#endif  /* DATAREADER_H */&#xA;

    &#xA;&#xA;

    And finally there is the main.cpp of the application.

    &#xA;&#xA;

    /* &#xA; * File:   main.cpp&#xA; * Author: davide&#xA; *&#xA; * Created on 28 luglio 2015, 17.04&#xA; */&#xA;&#xA;#include <cstdlib>&#xA;#include "dataReader.h"&#xA;#include "transforms.h"&#xA;#include "tognuplot.h"&#xA;#include <fstream>&#xA;#include <iostream>&#xA;&#xA;using namespace std;&#xA;&#xA;/*&#xA; * &#xA; */&#xA;int main(int argc, char** argv) {&#xA;&#xA;    audioChunk *chunk1=new audioChunk;&#xA;&#xA;    audioChunk_dNorm *normChunk1=new audioChunk_dNorm;&#xA;&#xA;    *chunk1=readData("./audio/demo-unprocessed.wav",0,1);&#xA;&#xA;    normChunk1->fillAudioChunk(chunk1);&#xA;&#xA;    ofstream file1;&#xA;    file1.open("./file/2wave.txt", std::ofstream::trunc);&#xA;    if(file1.is_open()) {&#xA;        for(int i=0;isize;i&#x2B;&#x2B;) {&#xA;            int a=chunk1->data[i];&#xA;            file1&lt;code></iostream></fstream></cstdlib>

    &#xA;&#xA;

    I can't understand why the outputs goes like this. Is it possible that the decoder can't convert the samples (pcm_16le, 16bits) into FFMPEG AVFrame.data, that stores the samples ad uint8_t ? And if it is it is there some way to make FFMPEG work for audio files that stores samples at more than 8 bits ?

    &#xA;&#xA;

    The file graph1-demo_good.jpg is how the samples should be, extracted with a working LIBSNDFILE application that I made.

    &#xA;&#xA;

    EDIT : Seems like the program can't convert the decoded data, couples of little endian bytes stored in a couple of uint8_t unsigned char, into the destination format (that i set as unsigned char[]), because it stores the bits as little-endian 16 bytes. So the data into audioChunk.data is right, but I have to read it not as an unsigned char, but as a couple of little-endian bytes.

    &#xA;