GNOME Bugzilla – Bug 398875
[ffdec_camtasia] requires "bits_per_sample" to be set or playback fails
Last modified: 2007-01-22 10:28:08 UTC
Please describe the problem: Playback of a movie with the "Techsmith Camtasia video" codec using GStreamer fails with: ERROR ffmpeg :0:: Camtasia error: unknown depth 0 bpp It appears the caps don't set the AVCodecContext->bits_per_sample to the correct value which actually seems to be stored in the AVI (24bpp in this case). Steps to reproduce: --- GST_DEBUG="avi*:5,ffmpeg*:5" gst-launch gnomevfssrc location=http://videos.aircrack-ng.org/WEP_Cracking_with_Airoscript.avi ! avidemux ! ffdec_camtasia ! ffmpegcolorspace ! xvimagesink --- Actual results: You see the log ouput. Expected results: Video should play. Does this happen every time? Yes. Other information: I have a lack of overview thus unable to fully find the cause of the problem and fixing the issue completly. All I know is that manually setting/enforcing the bits_per_sample makes it work: --- ext/ffmpeg/gstffmpegcodecmap.c 11 Jan 2007 10:02:40 -0000 1.137 +++ ext/ffmpeg/gstffmpegcodecmap.c 20 Jan 2007 23:16:46 -0000 @@ -1571,11 +1577,14 @@ case CODEC_ID_MSRLE: case CODEC_ID_QTRLE: + case CODEC_ID_TSCC: { gint depth; if (gst_structure_get_int (str, "depth", &depth)) context->bits_per_sample = depth; + + context->bits_per_sample = 24; } break;
Created attachment 80782 [details] [review] Add depth to caps in camtasia codec Partial patch for fixing the issue. As noted before, it lacks the final fix to set the actual bits_per_sample on the AVCodecContext which the ffmpeg camtasia decoder requires.
Thanks for the patch, committed: 2007-01-22 Tim-Philipp Müller <tim at centricular dot net> Patch by: Martin Szulecki <gnomebugzilla at sukimashita com> * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps), (gst_ffmpeg_caps_with_codecid): Need to set depth on context for camtasia decoder (fixes #398875). but needs fixes in gst-plugins-base (libgstriff) as well: 2007-01-22 Tim-Philipp Müller <tim at centricular dot net> * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps): On second thought, use "depth" field rather than "bpp" field. 2007-01-22 Tim-Philipp Müller <tim at centricular dot net> * gst-libs/gst/riff/riff-media.c: (gst_riff_create_video_caps): Camtasia caps apparently need a bpp field (#398875).