Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

can ffplay convert input video and then playback to screen?

Discussions about problems encountered using ffplay.
Forum rules
FFmpeg is in a state of perpetual development and we do not currently have the person power to backport fixes to official releases. As such, if you wish to query or report a bug, you must try with the latest development branch revision of FFmpeg to confirm the issue still exists. The latest FFmpeg can be downloaded from here: http://www.ffmpeg.org/download.html

can ffplay convert input video and then playback to screen?

Postby stanvictor » Mon Dec 12, 2016 7:56 pm

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 commands
do work but this is not preferable solution vector:

./ffmpeg -i ../../reference_video/left_to_right.avi -vcodec rawvideo -pix_fmt rgb8 ../../reference_video/output.nut
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:
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/left_to_right.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
[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.100
Stream #0:0: Video: rawvideo (RGB[8] / 0x8424752), rgb8, 640x480, q=2-31, 200 kb/s, 50 fps, 51200 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= 24 fps=0.0 q=-0.0 size= 7201kB time=00:00:00.46 bitrate=128233.6kbit
frame= 46 fps= 44 q=-0.0 size= 13802kB time=00:00:00.90 bitrate=125622.2kbit
frame= 69 fps= 44 q=-0.0 size= 20702kB time=00:00:01.36 bitrate=124698.7kbit
frame= 94 fps= 45 q=-0.0 size= 28203kB time=00:00:01.86 bitrate=124213.1kbit
frame= 118 fps= 46 q=-0.0 size= 35404kB time=00:00:02.34 bitrate=123942.1kbit
frame= 139 fps= 45 q=-0.0 size= 41704kB time=00:00:02.76 bitrate=123782.3kbit
frame= 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%

./ffprobe ../../reference_video/output.nut
ffprobe version N-79766-gdc75019 Copyright (c) 2007-2016 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration:
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, nut, from '../../reference_video/output.nut':
Metadata:
encoder : Lavf57.36.100
Duration: 00:00:02.80, start: 0.000000, bitrate: 123772 kb/s
Stream #0:0: Video: rawvideo (RGB[8] / 0x8424752), rgb8, 640x480, 50 fps, 50 tbr, 51200 tbn
Metadata:
encoder : Lavc57.38.100 rawvideo

was hoping i could use ffplay like so:

./ffplay -i ../../reference_video/left_to_right.avi -vcodec rawvideo -pix_fmt rgb8 -autoexit
ffplay version N-79766-gdc75019 Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration:
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
Option -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:

./ffplay -i ../../reference_video/left_to_right.avi -vcodec rawvideo -pixel_format rgb8 -autoexit
ffplay version N-79766-gdc75019 Copyright (c) 2003-2016 the FFmpeg developers
built with gcc 5.2.1 (Ubuntu 5.2.1-22ubuntu2) 20151010
configuration:
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
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

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 do
encoding conversions through ffplay and see resulting video directly... this capability would facilitate quick visual evaluation of
different conversion options
stanvictor
 
Posts: 1
Joined: Mon Dec 12, 2016 6:50 pm

Re: can ffplay convert input video and then playback to scre

Postby mulvya » Sat Jan 28, 2017 5:57 am

Use

Code: Select all
ffplay in.avi -vf format=rgb8
mulvya
 
Posts: 566
Joined: Mon Oct 26, 2015 6:58 am


Return to ffplay

Who is online

Users browsing this forum: No registered users and 1 guest