[FFmpeg-user] Question about x11grab and mkv files
Giorgio Vazzana
mywing81 at gmail.com
Thu Feb 9 15:34:42 CET 2012
Carl Eugen Hoyos <cehoyos <at> ag.or.at> writes:
>
> Giorgio Vazzana <mywing81 <at> gmail.com> writes:
>
> > ffmpeg -t 5 -f x11grab -video_size 640x480 -framerate 10 -i :0.0
> > -vcodec copy output-master-copy.mkv
>
> Is there any application except FFmpeg that read the resulting
> (good) files?
I didn't check because ffplay is usually enough for me (I use it for a quick
view, and then I transcode the huge file after the acquisition with ffmpeg), but
I think MPlayer was able to read some of these files in the past.
> > ffmpeg -t 5 -f x11grab -video_size 640x480 -framerate 10 -i :0.0
> > -vcodec ljpeg output-master-ljpeg.mkv
> >
> > Note the the same commands work fine with ffmpeg-0.10.
>
> Yes, but in the case of -vcodec copy the resulting video
> used "room" (disc space) for transparency information
> that is not there (x11 does not export opaqueness but "0"),
Ok.
> please try -vcodec rawvideo -pix_fmt bgr24.
Ok, done.
> The ljpeg encoder claims to encode transparency, but it
> actually does not...
Ok.
> I sent two patches to ffmpeg-devel:
> The first makes ljpegenc support BGR0 and BGR24 (but removes
> BGRA which never was really supported).
> The second adds tags for BGR0 etc (and RGB64), but see above,
I applied your patches and recompiled ffmpeg. Now "-vcodec copy", "-vcodec
rawvideo", "-vcodec -pix_fmt xxx" and "-vcodec ljpeg" all work. I can watch the
resulting video with ffplay. These are the commands I tested:
1. ffmpeg -y -t 5 -f x11grab -video_size 640x480 -framerate 10 -i :0.0 -vcodec
copy qcopy.mkv
2. ffmpeg -y -t 5 -f x11grab -video_size 640x480 -framerate 10 -i :0.0 -vcodec
rawvideo qrawvideo.mkv
3. ffmpeg -y -t 5 -f x11grab -video_size 640x480 -framerate 10 -i :0.0 -vcodec
rawvideo -pix_fmt bgr24 qrawvideobgr24.mkv
4. ffmpeg -y -t 5 -f x11grab -video_size 640x480 -framerate 10 -i :0.0 -vcodec
rawvideo -pix_fmt rgb24 qrawvideorgb24.mkv
> I wonder if any other application reads the resulting files.
I tried MPlayer on those output files and this were the results:
1. it doesn't play, log:
holden at rye:~/tmp2$ mplayer qcopy.mkv
MPlayer SVN-r34661-4.4.3 (C) 2000-2012 MPlayer Team
Playing qcopy.mkv.
libavformat version 54.0.100 (internal)
libavformat file format detected.
[lavf] stream 0: video (rawvideo), -vid 0
VIDEO: [BGR0] 640x480 0bpp 10.000 fps 0.0 kbps ( 0.0 kbyte/s)
Clip info:
ENCODER: Lavf54.0.100
Load subtitles in ./
==========================================================================
Cannot find codec matching selected -vo and video format 0x30524742.
==========================================================================
Exiting... (End of file)
2. it doesn't play, log:
holden at rye:~/tmp2$ mplayer qrawvideo.mkv
MPlayer SVN-r34661-4.4.3 (C) 2000-2012 MPlayer Team
Playing qrawvideo.mkv.
libavformat version 54.0.100 (internal)
libavformat file format detected.
[lavf] stream 0: video (rawvideo), -vid 0
VIDEO: [BGR0] 640x480 0bpp 10.000 fps 0.0 kbps ( 0.0 kbyte/s)
Clip info:
ENCODER: Lavf54.0.100
Load subtitles in ./
==========================================================================
Cannot find codec matching selected -vo and video format 0x30524742.
==========================================================================
Exiting... (End of file)
3. yes it works.
4. yes it works, but it shows strange colors.
> > Logs are here: http://mywing.altervista.org/tmp/ffmpeg-x11grab
>
> Please always post complete, uncut console output here, external
> resources may disappear.
Ok.
Thanks,
Giorgio Vazzana
More information about the ffmpeg-user
mailing list