Newest 'x264' Questions - Stack Overflow

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

Les articles publiés sur le site

  • To get OpenCV VideoWriter work across platforms consistently for MP4 container with H264 encoding

    28 mars 2019, par Moh

    I am trying to get OpenCV VideoWriter work across platform consistently for MP4 container with H246 encoding.

    Target platforms in order of importance - Ubuntu, Raspbian, OSX

    Basically, my shortcoming at this point is not understanding the relationship of FourCC code (as a parameter to OpenCV VideoWriter) to the FFMPEG backend and its requirements. I am interested to understand the game in play rather than discussing a piece of code.

    What I want to know is when I specify 'X264' as FourCC code trying to write an x.MP4 file (FFMPEG backend) and the request is marshalled to FFMPEG what requirements/dependencies need to be satisfied by the OS for it to success.

    So far I have got my python stack writing MP4 video files across Raspbian/Ubuntu/OSX, with a hack.

    On my Raspbian stretch installation, I use 0x00000021 as the fourCC code. On Ubuntu (VM on OSX) and on OSX, AVC1 works.

    Days of Googling only delivered those hacks, not a good understanding of the problem.

    The x264 as FourCC code leads to one of - failure, non-portable video file + annoying FFMPEG warning.

    I am trying to get to the bottom of it.

    The code,

        #self.__fourCC = cv2.VideoWriter_fourcc('x', '2', '6', '4')
        self.__fourCC = cv2.VideoWriter_fourcc('a', 'v', 'c', '1')
        if PlatformUtils.isRunningOnRaspberryPi():
            self.__fourCC = 0x00000021
    

    I have control over the version both OpenCV and FFMPEG (if required GStreamer too). I can and have built them for Ubuntu/Raspbian.

  • DirectShow IVideoWindow can't be wider than 4096px

    25 mars 2019, par ulvesked

    I have a C# application which uses DirectShow to show play video clips. We recently tried to play a video that is 9600x1080 px and it would not show. DirectShow emits events that everything.

    We use K-Lite codec pack (1295) and utilise ffdshow libx264 as codec and video renderer. Media Player Classic using the same renderer can play the clip just fine. The latest version of our application use DirectShow.NET while the older versions call DirectShow interfaces directly. Both old and new versions of our application have the same issues.

    After some experimentation we have found out the following:

    • If the video window width is 4096px or narrower it will render video. If it is 4097 or wider it will not render any video. We tried playing a HD-clip and a 720-clip with the same results. They will play when the video window is 4096x1080 but not when the window is 4097x1080 or wider.

    • When changing resolution or graphic settings there are some flashes (a few frames) of the video when the settings is applied, so that would suggest that it is in fact playing the video but it displays only black.

    Tested on Windows 10, 64 bit.

    Any ideas of what the we can do to fix this?

  • H.264 level for 1920x1080 60 video

    12 mars 2019, par Igor

    According H.264 specifications, 1920x1080 60p video should use Level 4.2 (2,048×1,080@60).

    However some old hardware players (e.g. Popcorn Hour A-210) can play 1920x1080 60p videos created only with Level 4.1.

    By default, ffmpeg/libx264 automatically sets Level 4.2 for a created 1920x1080 60p videos.

    Should I manually change Level to 4.1 for such video for better compatibility?

  • I-Frames replacement in MPEG DASH

    7 mars 2019, par Hangil Kang

    We are conducting a research which requires to change only I-Frames in the middle of MPEG DASH service.

    Based on my knowledge, each segment of a full video contains one I frame and related B and P frames. For our research, we want to do something with only I frames and re-encode the frames into the corresponding segment and during the decoding process, we want to do something with the I frames again.

    Any ideas how to do this?

    I appreciate all comments.

  • GStreamer 1.0 x264enc not found

    6 février 2019, par Firat Akandere
    gst-launch-1.0 -v videotestsrc num-buffers=1000 ! x264enc qp-min=18 ! \
      avimux ! filesink location=videotestsrc.avi
    

    I am trying to run a pipeline with x264enc on Ubuntu 16.04 server. gst-inpect-1.0 cannot find it as well. gst-plugins-ugly libx264-dev and x264 are installed in the system.