Recherche avancée

Médias (16)

Mot : - Tags -/mp3

Autres articles (83)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Gestion de la ferme

    2 mars 2010, par

    La ferme est gérée dans son ensemble par des "super admins".
    Certains réglages peuvent être fais afin de réguler les besoins des différents canaux.
    Dans un premier temps il utilise le plugin "Gestion de mutualisation"

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

Sur d’autres sites (11835)

  • ffmpeg ... "Impossible to convert between the formats supported by the filter"

    27 novembre 2017, par hydra3333

    Using the latest ffmpeg master built as at 2017.11.26, I’m having trouble deciphering what the error messages means and, more importantly, what to do about them.

    Changing from -vf to -filter_complex did nothing (I had to try).
    The main error message seems to be

    Impossible to convert between the formats supported by the filter

    I have tried to insert "format=" and "scale" before/between/after yadif and unsharp_opencl but to no avail.

    I wonder, could it be something to do with needing hwupload/hwdownload/hwmap or is that a red herring ?

    What am I doing wrong ?

    ".\ffmpeg_3.latest_master.exe" -hide_banner -v verbose -init_hw_device opencl=ocl:1.0 -filter_hw_device ocl -i ".\test_01.mpg" -an -map_metadata -1 -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -filter_complex "[0:v]yadif=0:0:0,scale=flags=lanczos+accurate_rnd+full_chroma_int+full_chroma_inp,unsharp_opencl=lx=3:ly=3:la=0.5:cx=3:cy=3:ca=0.5,setdar=dar=16/9" -r 25 -c:v h264_nvenc -preset slow -bf 2 -g 50 -refs 3 -rc:v vbr_hq -rc-lookahead:v 32 -cq 22 -qmin 16 -qmax 25 -coder cabac -movflags +faststart -profile:v high -level 4.1 -pixel_format yuv420p -y ".\test_01.newest.MP4"
    [AVHWDeviceContext @ 0000020e229aad40] 1.0: NVIDIA CUDA / GeForce GTX 750 Ti
    [AVHWDeviceContext @ 0000020e229aad40] DXVA2 to OpenCL mapping function found (clCreateFromDX9MediaSurfaceKHR).
    [AVHWDeviceContext @ 0000020e229aad40] DXVA2 in OpenCL acquire function found (clEnqueueAcquireDX9MediaSurfacesKHR).
    [AVHWDeviceContext @ 0000020e229aad40] DXVA2 in OpenCL release function found (clEnqueueReleaseDX9MediaSurfacesKHR).
    [AVHWDeviceContext @ 0000020e229aad40] The cl_khr_d3d11_sharing extension is required for D3D11 to OpenCL mapping.
    [AVHWDeviceContext @ 0000020e229aad40] D3D11 to OpenCL mapping not usable.
    [mpeg @ 0000020e229ae240] max_analyze_duration 5000000 reached at 5000000 microseconds st:0
    Input #0, mpeg, from '.\test_01.mpg':
     Duration: 00:06:29.96, start: 0.240000, bitrate: 2799 kb/s
       Stream #0:0[0x1e0]: Video: mpeg2video (Main), 1 reference frame, yuv420p(tv, top first, left), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 256 kb/s
    [Parsed_scale_1 @ 0000020e29951a20] w:iw h:ih flags:'lanczos+accurate_rnd+full_chroma_int+full_chroma_inp' interl:0
    Stream mapping:
     Stream #0:0 (mpeg2video) -> yadif
     setdar -> Stream #0:0 (h264_nvenc)
    Press [q] to stop, [?] for help
    [Parsed_scale_1 @ 0000020e29cccda0] w:iw h:ih flags:'lanczos+accurate_rnd+full_chroma_int+full_chroma_inp' interl:0
    [graph 0 input from stream 0:0 @ 0000020e29ccc980] w:720 h:576 pixfmt:yuv420p tb:1/90000 fr:25/1 sar:64/45 sws_param:flags=2
    [auto_scaler_0 @ 0000020e29ccc580] w:iw h:ih flags:'bilinear' interl:0
    [Parsed_unsharp_opencl_2 @ 0000020e29ccc4a0] auto-inserting filter 'auto_scaler_0' between the filter 'Parsed_scale_1' and the filter 'Parsed_unsharp_opencl_2'
    Impossible to convert between the formats supported by the filter 'Parsed_scale_1' and the filter 'auto_scaler_0'
    Error reinitializing filters!
    Failed to inject frame into filter network: Function not implemented
    Error while processing the decoded data for stream #0:0
    Conversion failed!
  • IllegalStateException while compressing video at "dequeueOutputBuffer()" [on hold]

    11 juillet 2017, par Mr Narendra

    I’ve also checked a few or more similar posted questions, but none of them was having any satisfying response.

    My requirement is to compress videos in approx. 1-2 minutes.
    The video size restriction in my app is 500 MB and the duration limit is 4 minutes.

    The commands, I have tried -

    -i /storage/sdcard0/Videos/Lat_test.mp4 -r 20 -vcodec mpeg4 -preset ultrafast -c:a copy -tune fastdecode -strict -2 -b:v 150k
    /storage/sdcard0/Videos/output.mp4

    -y -i /storage/sdcard0/Videos/test3.mp4 -crf 24 -vcodec mpeg4 -preset ultrafast -c:a copy -me_method zero -tune fastdecode -tune zerolatency
    -strict -2 -b:v 1000k -pix_fmt yuv420p /storage/sdcard0/Videos/output.mp4

    and a few more mentioned here

    1) https://github.com/Tourenathan-G5organisation/SiliCompressor (the one using MediaCodec, instead of FFMPEG).

    2) https://github.com/lalongooo/VideoCompressor

    When tried with Samsung Galaxy Grand GT-i9082, version 5.0.1 (rooted), it failed with the below error -

    > java.lang.IllegalStateException
    > at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
    > at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:1033)
    > at com.iceteck.silicompressorr.videocompression.MediaController.convertVideo(MediaController.java:491)
    > at com.iceteck.silicompressorr.SiliCompressor.compressVideo(SiliCompressor.java:300)
    > at com.iceteck.silicompressor.SelectPictureActivity$VideoCompressAsyncTask.doInBackground(SelectPictureActivity.java:379)
    > at com.iceteck.silicompressor.SelectPictureActivity$VideoCompressAsyncTask.doInBackground(SelectPictureActivity.java:358)
    > at android.os.AsyncTask$2.call(AsyncTask.java:288)
    > at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    > at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
    > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    > at java.lang.Thread.run(Thread.java:818)

    Please suggest how to resolve this issue.

    Or please suggest any other better video compressing approach / sample / reference, if possible

    I have tried various samples of video compression using FFMPEG, as well as MediaCodec, but none of them are working well. A few are very very slow. and rest gets failed in a few devices.

  • ffmpeg av_read_frame "Invalid data found"

    26 mai 2017, par DweebsUnited

    I am using ffmpeg to cut part of a file, following the remux example provided. However, I am having issues reading from files. I am given a file descriptor as input and an output filename, and can successfully set up the output file, read the stream info, copy all the streams, etc, etc. On the first call to av_read_frame though, I get an "Invalid data found when processing input" error. I have tried this with many different video files, and have not been able to get a single one to process correctly.

    Here is my code. I get no errors anywhere, except av_read_frame, which gives Invalid data found no matter what video file I give it.

    char path[512];
    sprintf(path, "pipe:%d", fileno(fp));


    AVOutputFormat *ofmt = NULL;
    AVFormatContext *ifmt_ctx = avformat_alloc_context(), *ofmt_ctx = NULL;
    AVPacket pkt;
    int ret, i;

    av_register_all();
    avcodec_register_all();

    if ((ret = avformat_open_input(&ifmt_ctx, path, av_find_input_format("mp4"), NULL)) < 0) {
       LOG("Could not open input file '%s'", path);
       goto end;
    }

    if ((ret = avformat_find_stream_info(ifmt_ctx, 0)) < 0) {
       LOG("Failed to retrieve input stream information", "");
       goto end;
    }

    avformat_alloc_output_context2(&ofmt_ctx, NULL, NULL, out_filename);
    if (!ofmt_ctx) {
       LOG("Could not create output context\n");
       ret = AVERROR_UNKNOWN;
       goto end;
    }

    ofmt = ofmt_ctx->oformat;

    for (i = 0; i < ifmt_ctx->nb_streams; i++) {
       AVStream *in_stream = ifmt_ctx->streams[i];
       AVStream *out_stream = avformat_new_stream(ofmt_ctx, in_stream->codec->codec);

       if (!out_stream) {
           LOG("Failed allocating output stream\n");
           goto end;
       }

       ret = avcodec_parameters_copy(out_stream->codecpar, in_stream->codecpar);
       if (ret < 0) {
           LOG("Failed to copy context from input to output stream codec context\n");
           goto end;
       }
       out_stream->codecpar->codec_tag = 0;
    }

    if (!(ofmt->flags & AVFMT_NOFILE)) {
       ret = avio_open(&ofmt_ctx->pb, out_filename, AVIO_FLAG_WRITE);
       if (ret < 0) {
           LOG("Could not open output file '%s'", out_filename);
           goto end;
       }
    }

    ret = avformat_write_header(ofmt_ctx, NULL);
    if (ret < 0) {
       LOG("Error occurred when opening output file\n");
       goto end;
    }

    //    int indexs[8] = {0};

    //    int64_t start_from = 8*AV_TIME_BASE;
    ret = av_seek_frame(ifmt_ctx, -1, from_seconds*AV_TIME_BASE, AVSEEK_FLAG_ANY);
    if (ret < 0) {
       LOG("Error seek\n");
       goto end;
    }

    int64_t *dts_start_from;
    int64_t *pts_start_from;
    dts_start_from = (int64_t *) malloc(sizeof(int64_t) * ifmt_ctx->nb_streams);
    memset(dts_start_from, 0, sizeof(int64_t) * ifmt_ctx->nb_streams);
    pts_start_from = (int64_t *) malloc(sizeof(int64_t) * ifmt_ctx->nb_streams);
    memset(pts_start_from, 0, sizeof(int64_t) * ifmt_ctx->nb_streams);

    while (1) {
       AVStream *in_stream, *out_stream;

       ret = av_read_frame(ifmt_ctx, &pkt);
       if (ret < 0)
           break;

       in_stream = ifmt_ctx->streams[pkt.stream_index];
       out_stream = ofmt_ctx->streams[pkt.stream_index];

       if (av_q2d(in_stream->time_base) * pkt.pts > end_seconds) {
           av_packet_unref(&pkt);
           break;
       }

       if (dts_start_from[pkt.stream_index] == 0)
           dts_start_from[pkt.stream_index] = pkt.dts;
       if (pts_start_from[pkt.stream_index] == 0)
           pts_start_from[pkt.stream_index] = pkt.pts;

       /* copy packet */
       pkt.pts = ::av_rescale_q_rnd(pkt.pts - pts_start_from[pkt.stream_index], in_stream->time_base, out_stream->time_base, (AVRounding) (AV_ROUND_NEAR_INF |
                                                                                                                                           AV_ROUND_PASS_MINMAX));
       pkt.dts = ::av_rescale_q_rnd(pkt.dts - dts_start_from[pkt.stream_index], in_stream->time_base, out_stream->time_base, (AVRounding) (AV_ROUND_NEAR_INF |
                                                                                                                                           AV_ROUND_PASS_MINMAX));
       if (pkt.pts < 0) {
           pkt.pts = 0;
       }
       if (pkt.dts < 0) {
           pkt.dts = 0;
       }
       pkt.duration = (int) av_rescale_q((int64_t) pkt.duration, in_stream->time_base, out_stream->time_base);
       pkt.pos = -1;

       ret = av_interleaved_write_frame(ofmt_ctx, &pkt);
       if (ret < 0) {
           LOG("Error muxing packet\n");
           break;
       }
       av_packet_unref(&pkt);
    }
    free(dts_start_from);
    free(pts_start_from);

    av_write_trailer(ofmt_ctx);

    end:
    LOG("END");

    avformat_close_input(&ifmt_ctx);

    /* close output */
    if (ofmt_ctx && !(ofmt->flags & AVFMT_NOFILE))
       avio_closep(&ofmt_ctx->pb);
    avformat_free_context(ofmt_ctx);

    if (ret < 0 && ret != AVERROR_EOF) {
       LOG("-- Error occurred: %s\n", av_err2str(ret));
       return 1;
    }

    Thank you for any help, I’m still getting used to ffmpeg. Did I miss some setting on the input ? Am I not setting something up that I need to be ? This problem is really stumping me.