Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Syntax error : "(" unexpected — with !(*.sh) in bash script

    3 octobre 2016, par Jmv Jmv

    Regards,

    I want to run a sh file:

    #!/bin/bash
    for f in !(*.sh); do ffmpeg -i "$f" -vf yadif=0:-1 -threads 0 -c:v libx264 -pix_fmt yuv420p -r 29.97 -b:v 3000k -s 1280x720 -preset:v slow -profile:v Main -level 3.1 -bf 2 -movflags faststart /mnt/media/out-mp4/"${f%.mxf}.mp4"; rm $f; done
    

    However I get the following error:

    2: task1.sh: Syntax error: "(" unexpected
    

    If I try directly on the command line it works perfectly.

    the path and permissions are already reviewed

    Any idea what might be happening?

    Thank you a lot

    UBUNTU 14.04

  • ffmpeg forcing the usage of nvenc instead of libx264 c++

    3 octobre 2016, par tankyx

    The code below works, but it loads the nvenc encoder instead of the libx264 encoder, which I need for 0 latency streaming.

    this->pCodec = avcodec_find_encoder(AV_CODEC_ID_H264);
    if (this->pCodec == NULL)
        throw myExceptions("Error: Can't initialize the encoder. FfmpegEncoder.cpp l:9\n");
    
    this->pCodecCtx = avcodec_alloc_context3(this->pCodec);
    
    //Alloc output context
    if (avformat_alloc_output_context2(&outFormatCtx, NULL, "rtsp", url) < 0)
        throw myExceptions("Error: Can't alloc stream output. FfmpegEncoder.cpp l:17\n");
    

    How can I force the usage of x264 ?

  • Input location for loop (Linux)

    3 octobre 2016, par Jmv Jmv

    I want to run :

    for f in /mnt/media/in-mp4/*.mxf; do ffmpeg -i "$f" -vf yadif=0:-1 -threads 0 -c:v libx264 -pix_fmt yuv420p -r 29.97 -b:v 3000k -s 1280x720 -preset:v slow -profile:v Main -level 3.1 -bf 2 -movflags faststart /mnt/media/out-mp4/"${f%.mxf}.mp4"; rm $f; done
    

    but I get the following error:

       /mnt/media/in-mp4/*.mxf: No such file or directory
    

    However when I try:

    for f in *.mxf; do ffmpeg -i "$f" -vf yadif=0:-1 -threads 0 -c:v libx264 -pix_fmt yuv420p -r 29.97 -b:v 3000k -s 1280x720 -preset:v slow -profile:v Main -level 3.1 -bf 2 -movflags faststart /mnt/media/out-mp4/"${f%.mxf}.mp4"; rm $f; done
    

    it works well.

    1. Any idea what might be happening?

    2. Another solution would be to specify multiple extensions at the entrance. How would you do it?

  • How to implement FFMPEG to android studio project [on hold]

    3 octobre 2016, par Light

    How to Implements FFMPEG to android studio project

    help please

  • Apply filters with FFmpeg library [on hold]

    3 octobre 2016, par Meugiwara

    I'm trying to understand how I can apply filters with the FFmpeg library. My aim is when the intensity of the sound exceeds a threshold given, increases the bass decibels and decreases treble decibels. If the intensity of the sound doesn't exceed a threshold given, increases the treble decibels and decreases the bass decibels.

    I'm searching a person who can posts a function that it does this.

    Best regards