[FFmpeg-user] can ffplay convert input video and then playback to screen?

stan victor stanvictor2003 at yahoo.com
Tue Dec 13 14:47:15 EET 2016




Carl,

thanks for the quick reply...  tried the ffmpeg solution vector you suggested
and got the following error:

<command> 
./gffmpeg -i ../../reference_video/input.avi -vcodec rawvideo -pix_fmt rgb8 -f sdl "SDL output" 

<command output> 
ffmpeg version N-79766-gdc75019 Copyright (c) 2000-2016 the FFmpeg developers 
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010 
configuration: progs_prefix=g 
libavutil      55. 23.100 / 55. 23.100 
libavcodec     57. 38.100 / 57. 38.100 
libavformat    57. 36.100 / 57. 36.100 
libavdevice    57.  0.101 / 57.  0.101 
libavfilter     6. 44.100 /  6. 44.100 
libswscale      4.  1.100 /  4.  1.100 
libswresample   2.  0.101 /  2.  0.101 
Input #0, avi, from '../../reference_video/input.avi': 
Duration: 00:00:02.82, start: 0.000000, bitrate: 15377 kb/s 
Stream #0:0: Video: msvideo1 (CRAM / 0x4D415243), rgb555le, 640x480, 15470 kb/s, 50 fps, 50 tbr, 50 tbn 
[sdl @ 0x238fd80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. 
[sdl @ 0x238fd80] Unsupported pixel format 'rgb8', choose one of yuv420p, yuyv422, or uyvy422 
Output #0, sdl, to 'SDL output': 
Metadata: 
encoder         : Lavf57.36.100 
Stream #0:0: Video: rawvideo (RGB[8] / 0x8424752), rgb8, 640x480, q=2-31, 200 kb/s, 50 fps, 50 tbn 
Metadata: 
encoder         : Lavc57.38.100 rawvideo 
Stream mapping: 
Stream #0:0 -> #0:0 (msvideo1 (native) -> rawvideo (native)) 
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument 



following above suggested solution vector changed the pix_fmt to yuv420p as shown below and got the video display


<command> 
./gffmpeg -i ../../reference_video/input.avi -vcodec rawvideo -pix_fmt yuv420p -f sdl "SDL output" 

<command output>

ffmpeg version N-79766-gdc75019 Copyright (c) 2000-2016 the FFmpeg developers 
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010 
configuration: progs_prefix=g 
libavutil      55. 23.100 / 55. 23.100 
libavcodec     57. 38.100 / 57. 38.100 
libavformat    57. 36.100 / 57. 36.100 
libavdevice    57.  0.101 / 57.  0.101 
libavfilter     6. 44.100 /  6. 44.100 
libswscale      4.  1.100 /  4.  1.100 
libswresample   2.  0.101 /  2.  0.101 
Input #0, avi, from '../../reference_video/input.avi': 
Duration: 00:00:02.82, start: 0.000000, bitrate: 15377 kb/s 
Stream #0:0: Video: msvideo1 (CRAM / 0x4D415243), rgb555le, 640x480, 15470 kb/s, 50 fps, 50 tbr, 50 tbn 
[sdl @ 0x39b0d80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. 
Output #0, sdl, to 'SDL output': 
Metadata: 
encoder         : Lavf57.36.100 
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, q=2-31, 200 kb/s, 50 fps, 50 tbn 
Metadata: 
encoder         : Lavc57.38.100 rawvideo 
Stream mapping: 
Stream #0:0 -> #0:0 (msvideo1 (native) -> rawvideo (native)) 
Press [q] to stop, [?] for help 
frame=   10 fps=0.0 q=-0.0 size=N/A time=00:00:00.20 bitrate=N/A speed=0.389x 
frame=   21 fps= 20 q=-0.0 size=N/A time=00:00:00.42 bitrate=N/A speed=0.405x 
frame=   32 fps= 20 q=-0.0 size=N/A time=00:00:00.64 bitrate=N/A speed=0.405x 
frame=   43 fps= 20 q=-0.0 size=N/A time=00:00:00.86 bitrate=N/A speed=0.405x 
frame=   54 fps= 20 q=-0.0 size=N/A time=00:00:01.08 bitrate=N/A speed=0.408x 
frame=   76 fps= 21 q=-0.0 size=N/A time=00:00:01.52 bitrate=N/A speed=0.412x 
frame=   87 fps= 21 q=-0.0 size=N/A time=00:00:01.74 bitrate=N/A speed=0.413x 
frame=   98 fps= 21 q=-0.0 size=N/A time=00:00:01.96 bitrate=N/A speed=0.413x 
frame=  109 fps= 21 q=-0.0 size=N/A time=00:00:02.18 bitrate=N/A speed=0.413x 
frame=  120 fps= 21 q=-0.0 size=N/A time=00:00:02.40 bitrate=N/A speed=0.413x 
frame=  131 fps= 21 q=-0.0 size=N/A time=00:00:02.62 bitrate=N/A speed=0.413x 
frame=  141 fps= 21 q=-0.0 size=N/A time=00:00:02.82 bitrate=N/A speed=0.411x 
frame=  141 fps= 21 q=-0.0 Lsize=N/A time=00:00:02.82 bitrate=N/A speed=0.41x 
video:63450kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown 



however did not get video converted to pix_fmt rgb8 and subsequently displayed which is my end goal...

is there a way to do a 2 phase conversion with ffmpeg utility???  the first phase to converts to
rgb8 and the second phase to yuv420p/sdl output...


thanks again for your quick response,


stan victor


________________________________
From: Carl Eugen Hoyos <ceffmpeg at gmail.com>
To: FFmpeg user questions <ffmpeg-user at ffmpeg.org> 
Sent: Tuesday, December 13, 2016 6:43 AM
Subject: Re: [FFmpeg-user] can ffplay convert input video and then playback    to screen?


2016-12-13 11:27 GMT+01:00 stan victor <stanvictor2003-at-yahoo.com at ffmpeg.org>:

> input.avi (codec=msvideo1/pix_fmt=rgb555le) want to convert it to pix_fmt rgb8 and
> view resulting video image. would like to do this all in ffplay so do not have to
> pre-convert using ffmpeg to rgb8 and then do ffplay.

FFplay cannot do any conversions but FFmpeg can play video using the sdl
output device.

Please set your mailer to text-only, your email is difficult to read, Carl Eugen

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list