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

stan victor stanvictor2003 at yahoo.com
Tue Dec 13 12:27:37 EET 2016


given:


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. the following commandsdo work but this is not preferable solution vector:

<command>./ffmpeg -i ../../reference_video/left_to_right.avi -vcodec rawvideo -pix_fmt rgb8 ../../reference_video/output.nut
<command output>ffmpeg version N-79766-gdc75019 Copyright (c) 2000-2016 the FFmpeg developersbuilt with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010configuration: libavutil 55. 23.100 / 55. 23.100libavcodec 57. 38.100 / 57. 38.100libavformat 57. 36.100 / 57. 36.100libavdevice 57. 0.101 / 57. 0.101libavfilter 6. 44.100 / 6. 44.100libswscale 4. 1.100 / 4. 1.100libswresample 2. 0.101 / 2. 0.101Input #0, avi, from '../../reference_video/left_to_right.avi':Duration: 00:00:02.82, start: 0.000000, bitrate: 15377 kb/sStream #0:0: Video: msvideo1 (CRAM / 0x4D415243), rgb555le, 640x480, 15470 kb/s, 50 fps, 50 tbr, 50 tbn[nut @ 0x2e3af00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.Output #0, nut, to '../../reference_video/output.nut':Metadata:encoder : Lavf57.36.100Stream #0:0: Video: rawvideo (RGB[8] / 0x8424752), rgb8, 640x480, q=2-31, 200 kb/s, 50 fps, 51200 tbnMetadata:encoder : Lavc57.38.100 rawvideoStream mapping:Stream #0:0 -> #0:0 (msvideo1 (native) -> rawvideo (native))Press [q] to stop, [?] for helpframe= 24 fps=0.0 q=-0.0 size= 7201kB time=00:00:00.46 bitrate=128233.6kbitframe= 46 fps= 44 q=-0.0 size= 13802kB time=00:00:00.90 bitrate=125622.2kbitframe= 69 fps= 44 q=-0.0 size= 20702kB time=00:00:01.36 bitrate=124698.7kbitframe= 94 fps= 45 q=-0.0 size= 28203kB time=00:00:01.86 bitrate=124213.1kbitframe= 118 fps= 46 q=-0.0 size= 35404kB time=00:00:02.34 bitrate=123942.1kbitframe= 139 fps= 45 q=-0.0 size= 41704kB time=00:00:02.76 bitrate=123782.3kbitframe= 141 fps= 44 q=-0.0 Lsize= 42305kB time=00:00:02.80 bitrate=123771.6kbits/s speed=0.88x video:42300kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.011970%
<command>./ffprobe ../../reference_video/output.nut
<command output>ffprobe version N-79766-gdc75019 Copyright (c) 2007-2016 the FFmpeg developersbuilt with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010configuration: libavutil 55. 23.100 / 55. 23.100libavcodec 57. 38.100 / 57. 38.100libavformat 57. 36.100 / 57. 36.100libavdevice 57. 0.101 / 57. 0.101libavfilter 6. 44.100 / 6. 44.100libswscale 4. 1.100 / 4. 1.100libswresample 2. 0.101 / 2. 0.101Input #0, nut, from '../../reference_video/output.nut':Metadata:encoder : Lavf57.36.100Duration: 00:00:02.80, start: 0.000000, bitrate: 123772 kb/sStream #0:0: Video: rawvideo (RGB[8] / 0x8424752), rgb8, 640x480, 50 fps, 50 tbr, 51200 tbnMetadata:encoder : Lavc57.38.100 rawvideo

was hoping i could use ffplay like so:

<command>./ffplay -i ../../reference_video/left_to_right.avi -vcodec rawvideo -pix_fmt rgb8 -autoexit
<command output>ffplay version N-79766-gdc75019 Copyright (c) 2003-2016 the FFmpeg developersbuilt with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010configuration: libavutil 55. 23.100 / 55. 23.100libavcodec 57. 38.100 / 57. 38.100libavformat 57. 36.100 / 57. 36.100libavdevice 57. 0.101 / 57. 0.101libavfilter 6. 44.100 / 6. 44.100libswscale 4. 1.100 / 4. 1.100libswresample 2. 0.101 / 2. 0.101Option -pix_fmt is deprecated, use -pixel_format.Option pixel_format not found.= 0KB vq= 0KB sq= 0B f=0/0 nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0 

tried non-deprecated form of pix_fmt and got same effective failure:

<command>./ffplay -i ../../reference_video/left_to_right.avi -vcodec rawvideo -pixel_format rgb8 -autoexit
<command output>ffplay version N-79766-gdc75019 Copyright (c) 2003-2016 the FFmpeg developersbuilt with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010configuration: libavutil 55. 23.100 / 55. 23.100libavcodec 57. 38.100 / 57. 38.100libavformat 57. 36.100 / 57. 36.100libavdevice 57. 0.101 / 57. 0.101libavfilter 6. 44.100 / 6. 44.100libswscale 4. 1.100 / 4. 1.100libswresample 2. 0.101 / 2. 0.101Option pixel_format not found.= 0KB vq= 0KB sq= 0B f=0/0 nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0

new to ffplay/ffmpeg so don't even know if what i want to do is possible... however, i do feel it would be a value add if could doencoding conversions through ffplay and see resulting video directly... this capability would facilitate quick visual evaluation ofdifferent conversion options


More information about the ffmpeg-user mailing list