ohiocas.blogg.se

Ffmpeg map to nothimg
Ffmpeg map to nothimg








ffmpeg map to nothimg

codecFlagGlobalHeader ) - _ - withCString (preset ep) $ \vStr -> - av_opt_set ((#ptr AVCodecContext, priv_data) (getPtr ctx)) - kStr vStr 0 when ( not.

ffmpeg map to nothimg

subtract 1 let framePeriod = AVRational 1 ( fromIntegral $ epFps ep ) setTimeBase st framePeriod ctx fmt Nothing | codec = avCodecIdRawvideo -> avPixFmtRgb24 | codec = avCodecIdGif -> avPixFmtPal8 | otherwise -> avPixFmtYuv420p - Some formats want stream headers to be separate needsHeader ( getOutputFormat oc >= getFormatFlags ) when needsHeader $ getCodecFlags ctx >= setCodecFlags ctx. codec >= getVideoCodecID ) return ( epCodec ep ) cod >= setId st. initStream :: EncodingParams -> AVFormatContext -> IO ( AVStream, AVCodecContext ) initStream ep _ | ( epWidth ep `rem` 2, epHeight ep `rem` 2 ) /= ( 0, 0 ) = error "Video dimensions must be multiples of two" initStream ep oc = do - Use the codec suggested by the output format, or override with - the user's choice. x ) /= allZeroBits where allZeroBits = clearBit ( bit 0 ) 0 - | Find and initialize the requested encoder, and add a video stream - to the output container. checkFlag :: Bits a => a -> a -> Bool checkFlag flg = \ x -> ( flg. defaultParams :: CInt -> CInt -> EncodingParams defaultParams w h = EncodingParams w h 30 Nothing Nothing "" - | Determine if the bitwise intersection of two values is non-zero. The output format is determined by the output file name.

ffmpeg map to nothimg

defaultH264 :: CInt -> CInt -> EncodingParams defaultH264 w h = EncodingParams w h 30 ( Just avCodecIdH264 ) Nothing "medium" - | Use default parameters for a video of the given width and - height. Src/Codec/FFmpeg/Encode.hs - | Use default parameters for a video of the given width and - height, forcing the choice of the h264 encoder.










Ffmpeg map to nothimg