Recherche avancée

Médias (1)

Mot : - Tags -/getid3

Autres articles (42)

Sur d’autres sites (8082)

  • FFmpeg conversion FROM UYVY422 TO YUV420P

    13 avril 2021, par risque

    I have raw video in UYVY422 format and I want to convert it YUV420p. 
I'am executing that command()

    



    ffmpeg -y -r 25.0 -f rawvideo -s 1920x1080 -pix_fmt uyvy422 -i input.avi -pix_fmt yuv420p -f avi -r 25 -s 1920x1080 output.avi 


    



    and my output video seems to float(right side of video start to be present at left edge and it is moving from left to right)

    



    Has anyone got any idea about what I am doing wrong ? I was trying to set output video to raw format, but it didnt work...

    


  • Optimise ffmpeg hls stream to images

    10 mars 2017, par mrdotb

    I’m using a ffmpeg to convert a hls stream from twitch to 30 png images per seconds on stdout then I load them in python using pillow.

    My ffmpeg command is the fallowing.

    I get a hls stream from twitch using

    livestreamer --http-header Client-ID=mytwitchtoken --hls-live-edge 1 twitch.tv/stream source,1080p60 --stream-url

    Then my images using

    ffmpeg -i streamurl.m3u8 -vf fps=2 -nostats -pix_fmt rgb24 -vcodec rawvideo -f image2pipe -

    The ffmpeg command is working well however it’s resource intensive (100% of my cpu). Is there some optimization I can do on the command or another method to get my images from the hls stream.

  • H264/MP4 live stream from ffmpeg does not work in browser

    22 septembre 2018, par paunescuionica

    I cannot visualize a H264/MP4 stream generated by ffmpeg in Chrome, IE, Edge. It works only in Firefox.

    My testing environment is Windows 10, all updates done, all browsers up to date.

    I have a source MJPEG stream, which I need to transcode to H264/MP4 and show it in browser in a HTML5 element.
    In order to provide a working example, I use here this MJPEG stream : http://200.36.58.250/mjpg/video.mjpg?resolution=320x240. In my real case I have MJPEG input from different sources like IP cameras.
    I use the following command line :

    ffmpeg.exe -use_wallclock_as_timestamps 1 -f mjpeg -i "http://200.36.58.250/mjpg/video.mjpg?resolution=320x240" -f mp4 -c:v libx264 -an -preset ultrafast -tune zerolatency -movflags frag_keyframe+empty_moov+faststart -reset_timestamps 1 -vsync 1 -flags global_header -r 15 "tcp ://127.0.0.1:5000 ?listen"

    If I try to visualize the output in VLC, I use this link : tcp ://127.0.0.1:5000 and it works.
    Then I try to visualize the stream in browser, so I put this into a html document :

    <video autoplay="autoplay" controls="controls">
    <source src="http://127.0.0.1:5000" type="video/mp4">
    </source></video>

    If I open the document in Firefox it works just fine.
    But it does not work when trying to open in Chrome, IE or Edge. It seems that the browser tries to connect to the TCP server exposed by ffmpeg, but something happens because ffmpeg exits after few seconds.

    In ffmpeg console I can see this :

    av_interleaved_write_frame(): Unknown error
    Error writing trailer of tcp://127.0.0.1:5000?listen: Error number -10053 occurred

    If I inspect the video element in Chrome is can see this error :

    Failed to load resource: net::ERR_INVALID_HTTP_RESPONSE

    As far as I know all these browsers should support H264 encoded streams transported in MP4 containers. If in the element I replace the link http://127.0.0.1:5000 with a local link to a mp4/H264 encoded file, it is played just fine in each browser. The problem seems to be related to live streaming.

    Does anyone know why this happens and how it can be solved ?

    Thank you !