Play YUV-files from a Python script
Posted: 16 Aug 2019 15:39
Hi everyone,
I'am trying to write a python script that plays YUV-files by using the vlc.py. My first script looks like this :
but i get the following error messages :
Any tips would be very helpful.
Thank you in advance.
best,
Oussama
I'am trying to write a python script that plays YUV-files by using the vlc.py. My first script looks like this :
Code: Select all
import vlc
instance = vlc.Instance()
media = None
mediaplayer = vlc.MediaPlayer()
# Put the media in the media player
mediaplayer.set_rate(24)
mediaplayer.video_set_format('I420',1920,1080,2)
media = instance.media_new('D:/hdr/Kimono_1920x1080_24.yuv')
mediaplayer.set_media(media)
mediaplayer.play()
but i get the following error messages :
Code: Select all
rawvid demux error: invalid or no framerate specified.
[IMGUTILS @ 0000005db409efc0] Picture size 0x0 is invalid
[0000024c620b92c0] avcodec demux error: Could not open D:\hdr\Kimono_1920x1080_24.yuv: Invalid argument
Thank you in advance.
best,
Oussama