Bug 352783

Summary: [proxy] Avconv refuse to do proxy recently ; "-deinterlace is deprecated, use -filter:v yadif instead"
Product: [Applications] kdenlive Reporter: David REVOY <info>
Component: Rendering & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: [^ screenshot of the bug ]

Description David REVOY 2015-09-16 06:57:22 UTC
Created attachment 94592 [details]
[^ screenshot of the bug ]

Hi,

I use the Sunab PPA for Ubuntu 14.04 ( Linux Mint 17.2 ). I had no problem so far, I use Kdenlive one time a month to publish video tutorial about Krita timelapse on Youtube : ( https://www.youtube.com/user/DeevadRevoy/videos ). 

This morning I noticed something unusual ( screenshot in attachment ). Avconv refuse to generate a proxy of my video source. It's a problem for my workflow because I use the 'time' effect a lot to speed-up the long screen-recording , and the effect 'time' is not able to handle my 1920x1080@30fps video capture.

The error message :
=================
avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
-deinterlace is deprecated, use -filter:v yadif instead
Input #0, matroska,webm, from '/home/deevad/Production/Tutorial/2015-09-16_The-three-witches/src/video-capture-2015-09-15_17h42m51s.mkv':
  Metadata:
    ENCODER         : Lavf54.20.4
  Duration: 01:45:22.73, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 15 fps, 15 tbr, 1k tbn, 30 tbc (default)
[mpeg2video @ 0x8acc40] MPEG1/2 does not support 15/1 fps
Output #0, mpegts, to '/home/deevad/.kdenlive-settings/proxy/49e5ff41014ce1e7804eaaa189642966.ts':
  Metadata:
    ENCODER         : Lavf54.20.4
    Stream #0.0: Video: mpeg2video, yuv420p, 640x360 [PAR 1:1 DAR 16:9], q=2-31, 700 kb/s, 90k tbn, 15 tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Comment 1 Jean-Baptiste Mardelle 2015-09-16 19:17:50 UTC
There is no "-deinterlace" option in Kdenlive's default proxy profile.
Can you check in the config dialog:

Menu: Settings > Configure Kdenlive
In the "Project Defaults", make sure the "Proxy clip" button is enabled and click on the small "i" button at the bottom right to see the proxy encoding parameters. Can you paste them here ?
Comment 2 David REVOY 2015-09-16 21:18:10 UTC
Hi Jean-Baptiste,
Here is the text appearing in the 'i' button :
-f mpegts -acodec libmp3lame -ac 2 -ab 128k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 640x360 -vb 700k
Comment 3 Jean-Baptiste Mardelle 2015-09-16 21:28:01 UTC
David,

Then you can just edit these settings. Just beside the "i" button, there is a "configure button". It will bring up a dialog allowing you to edit these parameters. Try replacing the "-deinterlace" option with "-filter:v yadif".

This will change the settings for new projects. If you want to fix the setting for an existing project, you should be able to change it from the menu Project > Project Settings, then in the drop down box, select the profile you updated in step 1. Let me know if it succeeds.
Comment 4 David REVOY 2015-09-16 21:36:16 UTC
It succeded ! Thank you. I have no longer the same error message, but now I have another.
Still 'Failed to create Proxy clip. With this output :

avconv version 9.18-6:9.18-0ubuntu0.14.04.1, Copyright (c) 2000-2014 the Libav developers
  built on Mar 16 2015 13:19:10 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
Input #0, matroska,webm, from '/home/deevad/Production/Tutorial/2015-09-16_The-three-witches/src/video-capture-2015-09-15_17h42m51s.mkv':
  Metadata:
    ENCODER         : Lavf54.20.4
  Duration: 01:45:22.73, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 15 fps, 15 tbr, 1k tbn, 30 tbc (default)
[mpeg2video @ 0xff1dc0] MPEG1/2 does not support 15/1 fps
Output #0, mpegts, to '/home/deevad/.kdenlive-settings/proxy/49e5ff41014ce1e7804eaaa189642966.ts':
  Metadata:
    ENCODER         : Lavf54.20.4
    Stream #0.0: Video: mpeg2video, yuv420p, 640x360 [PAR 1:1 DAR 16:9], q=2-31, 700 kb/s, 90k tbn, 15 tbc (default)
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg2video)
Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

But this time, I think it's my source video capture the guilty.
"[mpeg2video @ 0xff1dc0] MPEG1/2 does not support 15/1 fps"
I recorded this time at 15fps to save room on disk, and CPU ( and because I accelerate the playback anyway). A wrong move, I should have kept 30FPS.
Thanks you.
Comment 5 Jean-Baptiste Mardelle 2015-09-16 21:49:26 UTC
Yes, the mpeg2 encoder is rather limited regarding frame rates. In Kdenlive's Settings, where you edited the "-deinterlace" parameter, you can also create alternate proxy presets. Some formats probably allow 15fps. No time to test now, but for example, I have the following settings:

name: x264
Parameters: -s 640x360 -g 5 -crf 25 -ab 128k -vcodec libx264 -acodec libvorbis -preset veryfast
File extension: mov

Save, and then select it as default in the Encoding profile dropdown box.
Comment 6 David REVOY 2015-09-16 21:58:22 UTC
Thank you for sharing your setting ; this one totally works on my project. 
Thank you also for being fast an reactive in managing this bug. 
Have a great end of week!