Hi all,
with the current version from git head I was getting the following error
message when using the scaling filter:
Command line:
/usr/local/ffmpeg/bin/avconv -i 00003.MTS -sn \
-filter:v yadif=1,scale=960:540,transpose=2 \
-c:0 libx264 -pre:0 libx264-medium -crf 20 \
-c:1 copy 00003.mp4
(...)
[swscaler @ 804670c] [Eval @ 804642c] Invalid chars 'x4' at the end of
expression '0x4'
[swscaler @ 804670c] Unable to parse option value "0x4"
Error initializing filter 'scale' with args '960:540:flags=0x4'
(...)
To "fix" this problem I applied the following change:
diff --git a/avconv.c b/avconv.c
index f702d9d..8165e2c 100644
--- a/avconv.c
+++ b/avconv.c
@@ -629,7 +629,7 @@ static int configure_video_filters(FilterGraph *fg)
last_filter = fg->inputs[0]->filter;
if (codec->width || codec->height) {
- snprintf(args, 255, "%d:%d:flags=0x%X",
+ snprintf(args, 255, "%d:%d:flags=%u",
codec->width,
codec->height,
(unsigned)ost->sws_flags);
@@ -641,7 +641,7 @@ static int configure_video_filters(FilterGraph *fg)
last_filter = filter;
}
- snprintf(args, sizeof(args), "flags=0x%X", (unsigned)ost->sws_flags);
+ snprintf(args, sizeof(args), "flags=%u", (unsigned)ost->sws_flags);
fg->graph->scale_sws_opts = av_strdup(args);
if (ost->avfilter) {
@@ -792,7 +792,7 @@ static int configure_output_filter(FilterGraph *fg,
OutputFilter *ofilter, AVFil
if (codec->width || codec->height) {
char args[255];
- snprintf(args, sizeof(args), "%d:%d:flags=0x%X",
+ snprintf(args, sizeof(args), "%d:%d:flags=%u",
codec->width,
codec->height,
(unsigned)ofilter->ost->sws_flags);
It worked thereafter...
Does this make sense or should this problem be fixed elsewhere?
Regards,
Christian
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api