[FFmpeg-user] How to define new pixel format structures
Marc Elliott
elliott2w1 at gmail.com
Thu Apr 25 01:44:16 CEST 2013
Hello,
I am streaming a raw video in the yuv420p format. The FFMPEG output from
doing this is show below. What I'm trying to do is define new pixel
formats that will allow me to stream this same video utilizing various bit
depths from 8bit all the way down to 1bit. The video already streams fine
in 8bit but, in addition to that, I want to be able to modify the data in
each frame so that it is quantized to only represent 7bit, 6bit, 5bit,....,
1bit. If someone could give me general outline on how to do this or even
point me in the right direction, I would really appreciate it. Thanks.
20 [volta]/home/student/elliott> ffmpeg/ffmpeg -r 30 -s 320x240 -f rawvideo
-i pipe: http://marconi.sdsu.edu:8181/feed1.ffm < testvideo_1000f.raw
ffmpeg version N-41632-g2b1fc56 Copyright (c) 2000-2012 the FFmpeg
developers
built on Apr 21 2013 13:03:53 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration:
libavutil 51. 58.100 / 51. 58.100
libavcodec 54. 25.100 / 54. 25.100
libavformat 54. 6.101 / 54. 6.101
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 80.100 / 2. 80.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
[rawvideo @ 0x113fe340] Estimating duration from bitrate, this may be
inaccurate
Input #0, rawvideo, from 'pipe:':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240, 30
tbr, 30 tbn, 30 tbc
**** HTTP header GET /feed1.ffm HTTP/1.1
User-Agent: Lavf54.6.101
Accept: */*
Range: bytes=0-
Connection: close
Host: marconi.sdsu.edu:8181
*****
**** HTTP header POST /feed1.ffm HTTP/1.1
Transfer-Encoding: chunked
User-Agent: Lavf54.6.101
Accept: */*
Connection: close
Host: marconi.sdsu.edu:8181
*****
[buffer @ 0x1140a700] w:320 h:240 pixfmt:yuv420p tb:1/30 fr:30/1 sar:0/1
sws_param:flags=2
[ffmpeg_buffersink @ 0x1142a280] No opaque field provided
[buffer @ 0x1140a700] TB:0.033333
[scale @ 0x11439900] w:320 h:240 fmt:yuv420p sar:0/1 -> w:320 h:240
fmt:yuv420p sar:0/1 flags:0x4
Output #0, ffm, to 'http://marconi.sdsu.edu:8181/feed1.ffm':
Metadata:
encoder : Lavf54.6.101
Stream #0:0: Video: flv1, yuv420p, 320x240, q=2-31, 128 kb/s, 1000k tbn,
30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> flv)
q=7.5 size= 708kB time=00:00:24.63 bitrate= 235.5kbits/s
frame= 1000 fps=0.0 q=9.1 Lsize= 908kB time=00:00:33.33 bitrate=
223.2kbits/s
video:884kB audio:0kB global headers:0kB muxing overhead 2.671945%
Marc Elliott
More information about the ffmpeg-user
mailing list