Newest 'libx264' Questions - Stack Overflow

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

Les articles publiés sur le site

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

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

  • Record Seemeless HD Video with ffmpeg libxh264

    3 octobre 2016, par Hannan

    I want to Record HD Video from HD Cam through ffmpeg. I want to encode the video as it is recorded. I am using the following script but the problem is after about 18 minutes it starts loosing frames with an error " non monotonous DTS in output stream"

    this is the script i am using:

    ffmpeg -f dshow -rtbufsize 1000000k -s 1280x720 -i video="HuddleCamHD":audio="Microphone (3- USB PnP Audio Device)" -map 0:v -b:v 8000k -map 0:a -s 1280x720 -vcodec libx264 -preset ultrafast -r 30 -rtbufsize 1000000k -acodec aac -b:a 320k "D:\VideoPutput.avi"
    

    A help would be nice thank you.

  • Improve ffmpeg CPU usage by compromising quality

    29 septembre 2016, par Hardik Juneja

    I am using FFMpeg for screen capturing. I am looking for a screen capturing tool that will run on 1000 of VMs (windows and mac).The VMs have limited CPU (1 core) and 2GB ram and No GPU.

    Currently I invoke ffmpeg with

    ffmpeg  -y -framerate 8 -f dshow -f gdigrab -i "desktop"  -c:v libx264  -crf 0 -preset ultrafast -threads 0 temp.mkv
    

    I am using gdigrab to capture screen? Is there any better options that might reduce cpu usage? or changing the encoder or format?

    I am aiming for 4-5% reduction in CPU usage.

    Thanks in advance

  • Improve ffmpeg CPU usage by compromising quality

    29 septembre 2016, par Hardik Juneja

    I am using FFMpeg for screen capturing. I am looking for a screen capturing tool that will run on 1000 of VMs (windows and mac).The VMs have limited CPU (1 core) and 2GB ram and No GPU.

    Currently I invoke ffmpeg with

    ffmpeg  -y -framerate 8 -f dshow -f gdigrab -i "desktop"  -c:v libx264  -crf 0 -preset ultrafast -threads 0 temp.mkv
    

    I am using gdigrab to capture screen? Is there any better options that might reduce cpu usage? or changing the encoder or format?

    I am aiming for 4-5% reduction in CPU usage.

    Thanks in advance