Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 322945 - >=media-video/transcode-1.1.5-r1 fails to open ffmpeg+x264 codec
Summary: >=media-video/transcode-1.1.5-r1 fails to open ffmpeg+x264 codec
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Media-video project
URL: http://www.mail-archive.com/transcode...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-06 08:21 UTC by Dennis Schridde
Modified: 2012-07-05 15:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch adding video preset support (transcode-1.1.5-ffmpeg-presets.patch,8.85 KB, patch)
2010-06-06 13:26 UTC, Dennis Schridde
Details | Diff
modified ebuild including the patch (transcode-1.1.5-r2.ebuild,4.01 KB, text/plain)
2010-12-12 19:46 UTC, Aljoscha Vollmerhaus
Details
output of a failed run (footest,14.42 KB, text/plain)
2011-12-14 15:21 UTC, Aljoscha Vollmerhaus
Details
Fix invalid free when preset file not found (transcode-1.1.7-preset-free.patch,1.22 KB, patch)
2012-07-04 03:23 UTC, Brennan Shacklett
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2010-06-06 08:21:01 UTC
media-video/transcode-1.1.5-r1 is unable to open the ffmpeg export codec, if x264 is selected as video format, apparently because some configuration file is missing, and ffmpeg uses incompatible default settings:

$ transcode -H 10 -a 0 -x vob -i vob/001/ -w 875,50 -F h264 -b 0,1,7 -s 1.463 --a52_drc_off -f 25 -Y 8,4,8,4 -B 22,1,8 -R 1 -y ffmpeg,ogg -m avi/001/BluesBrothers-001-00.ogg -o /dev/null --progress_meter 2 --progress_rate 25
transcode v1.1.5 (C) 2001-2003 Thomas Oestreich, 2003-2009 Transcode Team
[transcode] V: auto-probing     | vob/001/ (OK)
[transcode] V: import format    | MPEG 2 program stream in  (module=vob)
[transcode] A: auto-probing     | vob/001/ (OK)
[transcode] A: import format    | AC3 in  (module=vob)
[transcode] V: AV demux/sync    | (1) sync AV at initial MPEG sequence
[transcode] V: import frame     | 720x576  1.25:1  encoded @ 16:9
[transcode] V: new aspect ratio | 712x400  1.78:1 (-B)
[transcode] V: clip frame (->)  | 704x384
[transcode] V: bits/pixel       | 0.129 (low)
[transcode] V: decoding fps,frc | 25.000,0
[transcode] V: multi-pass       | (mode=1) writing data (pass 1) to divx4.log
[transcode] V: video format     | YUV420 (4:2:0) aka I420
[transcode] A: import format    | 0x2000  AC3          [48000,16,4]  384 kbps
[transcode] A: downmix          | 4 channels -> 2 channels
[transcode] A: export format    | 0x55    MPEG ES Layer 3 [48000,16,2]    0 kbps
[transcode] V: export format    | unknown (module dependant)
[transcode] V: encoding fps,frc | 25.000,3
[transcode] A: bytes per frame  | 7680 (7680.000000)
[transcode] A: adjustment       | 0@1000
[transcode] A: rescale stream   | 1.463
[transcode] V: IA32/AMD64 accel | sse3 sse2 sse 3dnowext 3dnow mmxext mmx cmove asm 
[transcode] V: video buffer     | 10 @ 720x576 [0x2]
[transcode] A: audio buffer     | 10 @ 48000x2x16
[import_vob.so] v0.6.1 (2006-05-02) (video) MPEG-2 | (audio) MPEG/AC3/PCM | (subtitle)
[export_ogg.so] v0.0.5 (2003-08-31) (video) null | (audio) ogg
[export_ffmpeg.so] v0.3.18 (2008-11-29) (video) Lavc52.66.0 | (audio) MPEG/AC3/PCM
[import_vob.so] tccat -i "vob/001/" -t vob -d 0 -S 0 | tcdemux -M 1 -a 0 -x ac3 -S 0 -d 0 | tcextract -t vob -a 0 -x ac3 -d 0 | tcdecode -x ac3 -d 0 -s 1.000000,1.000000,1.000000 -A 1
[import_vob.so] tccat -i "vob/001/" -t vob -d 0 -S 0 | tcdemux -s 0x80 -x mpeg2 -S 0 -M 1 -d 0 | tcextract -t vob -a 0 -x mpeg2 -d 0 | tcdecode -x mpeg2 -d 0 -y yuv420p
[export_ffmpeg.so] Using FFMPEG codec 'h264' (FourCC 'h264', H264 (avc)).
[export_ffmpeg.so] No profile selected
[export_ffmpeg.so] warning: Error opening configuration file ./ffmpeg.cfg: No such file or directory
[export_ffmpeg.so] Starting 1 thread(s)
[export_ffmpeg.so] Set display aspect ratio to input
[libx264 @ 0xc1ae40]broken ffmpeg default settings detected
[libx264 @ 0xc1ae40]use an encoding preset (vpre)
[export_ffmpeg.so] warning: could not open FFMPEG codec
[encoder.c] warning: video export module error: init failed
[transcode] critical: failed to init encoder

Reproducible: Always
Comment 1 Dennis Schridde 2010-06-06 13:26:52 UTC
Created attachment 234305 [details, diff]
patch adding video preset support

Attached patch was submitted to the transcode-devel mailinglist. It adds ffmpeg preset support to transcode, which should fix this issue.
Comment 2 Dennis Schridde 2010-06-06 15:38:28 UTC
transcode-devel silently discards emails from not subscribed senders. The email now arrived at: http://www.mail-archive.com/transcode-devel@exit1.org/msg01001.html
Comment 3 Dennis Schridde 2010-07-11 10:21:18 UTC
Posted a bump in transcode-devel, no reply so far.
Comment 4 Aljoscha Vollmerhaus 2010-11-04 20:46:25 UTC
After reading
http://www.mail-archive.com/transcode-devel@exit1.org/msg01003.html
i´m thinking maybe we should file a bug against dvd::rip so they patch the call to transcode to make use of the new native api?
Comment 5 Aljoscha Vollmerhaus 2010-12-12 19:46:04 UTC
Created attachment 256983 [details]
modified ebuild including the patch

a modified ebuild for the lazy, incorporating daniels patch.
Comment 6 Aljoscha Vollmerhaus 2010-12-13 15:08:14 UTC
Okay, with the patch applied i get this:


[export_ffmpeg.so] Using FFMPEG codec 'h264' (FourCC 'h264', H264 (avc)).
[export_ffmpeg.so] No profile selected
[export_ffmpeg.so] warning: Error opening configuration file ./ffmpeg.cfg: No such file or directory
[export_ffmpeg.so] Starting 1 thread(s)
[export_ffmpeg.so] Set display aspect ratio to input
[export_ffmpeg.so] Parsing ffmpeg preset 'medium'
[export_ffmpeg.so] After parsing preset 'medium', 22 options are overridden:
[export_ffmpeg.so] -- coder
[export_ffmpeg.so] -- flags
[export_ffmpeg.so] -- cmp
[export_ffmpeg.so] -- partitions
[export_ffmpeg.so] -- me_method
[export_ffmpeg.so] -- subq
[export_ffmpeg.so] -- me_range
[export_ffmpeg.so] -- g
[export_ffmpeg.so] -- keyint_min
[export_ffmpeg.so] -- sc_threshold
[export_ffmpeg.so] -- i_qfactor
[export_ffmpeg.so] -- b_strategy
[export_ffmpeg.so] -- qcomp
[export_ffmpeg.so] -- qmin
[export_ffmpeg.so] -- qmax
[export_ffmpeg.so] -- qdiff
[export_ffmpeg.so] -- bf
[export_ffmpeg.so] -- refs
[export_ffmpeg.so] -- directpred
[export_ffmpeg.so] -- trellis
[export_ffmpeg.so] -- flags2
[export_ffmpeg.so] -- wpredp
[libx264 @ 0x22b25a0]using SAR=1/1
[libx264 @ 0x22b25a0]using cpu capabilities: MMX2 SSE2 SSE3 Cache64
[libx264 @ 0x22b25a0]requested bitrate is too low. estimated minimum is 13 kbps
[export_ffmpeg.so] warning: could not open FFMPEG codec
[encoder.c] warning: video export module error: init failed
[transcode] critical: failed to init encoder
Comment 7 Aljoscha Vollmerhaus 2010-12-14 10:58:38 UTC
I really don´t know if this is related, the exact same settings used to work before the x264 ffmpeg preset problem appeared.

BPP Value = 0.15
2-pass encoding set
reuse log set
framerate set to 25
zoom to full frame
container: ogg
Comment 8 Samuli Suominen (RETIRED) gentoo-dev 2011-12-06 07:54:43 UTC
Verified that this patch is included in the 1.1.7 release. So, closing as FIXED
Comment 9 Aljoscha Vollmerhaus 2011-12-14 15:20:58 UTC
I´ve just merged transcode-1.1.7 and it still fails.
Added bonus: it segfaults now.

I´m attaching a full log...
Comment 10 Aljoscha Vollmerhaus 2011-12-14 15:21:35 UTC
Created attachment 295815 [details]
output of a failed run
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2011-12-14 17:58:20 UTC
reopened.
Comment 12 Brennan Shacklett 2012-07-04 03:23:56 UTC
Created attachment 317089 [details, diff]
Fix invalid free when preset file not found

The segfault was occurring because of an invalid free on a constant string right before the program quit anyway.
This patch copies the name with av_strdup so it can be freed, which is consistent with the behavior that occurs if the user supplies a preset for ffmpeg in ffmpeg.cfg
The patch also changes the error message so the user can tell it was the missing preset file which caused the program to terminate.
I've only tested this with ffmpeg 0.11 and my patch in bug 419551
Comment 13 Alexis Ballier gentoo-dev 2012-07-05 15:12:49 UTC
(In reply to comment #12)
> Created attachment 317089 [details, diff] [details, diff]
> Fix invalid free when preset file not found
> 
> The segfault was occurring because of an invalid free on a constant string
> right before the program quit anyway.
> This patch copies the name with av_strdup so it can be freed, which is
> consistent with the behavior that occurs if the user supplies a preset for
> ffmpeg in ffmpeg.cfg
> The patch also changes the error message so the user can tell it was the
> missing preset file which caused the program to terminate.
> I've only tested this with ffmpeg 0.11 and my patch in bug 419551

applied, thanks!