[mythtv-users] Downscale HD recordings with ffmpeg

Nick Rout nick.rout at gmail.com
Wed Mar 25 23:20:51 UTC 2009


On Thu, Mar 26, 2009 at 5:41 AM, kanetse at gmail.com <kane.tse at gmail.com> wrote:
> On Tue, Mar 24, 2009 at 4:26 PM, Nick Rout <nick.rout at gmail.com> wrote:
>>
>> what is the output of
>>
>> ldd /path/to/ffmpeg ?
>>
>
>        linux-vdso.so.1 =>  (0x00007fff367fe000)
>        libavdevice.so.52 => /usr/local/lib/libavdevice.so.52
> (0x00007f9e2e2ff000)
>        libavformat.so.52 => /usr/local/lib/libavformat.so.52
> (0x00007f9e2e005000)
>        libavcodec.so.52 => /usr/local/lib/libavcodec.so.52 (0x00007f9e2d56c000)
>        libavutil.so.50 => /usr/local/lib/libavutil.so.50 (0x00007f9e2d35d000)
>        libswscale.so.0 => /usr/local/lib/libswscale.so.0 (0x00007f9e2d12b000)
>        libm.so.6 => /lib/libm.so.6 (0x00007f9e2cea6000)
>        libc.so.6 => /lib/libc.so.6 (0x00007f9e2cb34000)
>        libz.so.1 => /usr/lib/libz.so.1 (0x00007f9e2c91c000)
>        libfaac.so.0 => /usr/local/lib/libfaac.so.0 (0x00007f9e2c70a000)
>        libfaad.so.0 => /usr/local/lib/libfaad.so.0 (0x00007f9e2c4d0000)
>        libmp3lame.so.0 => /usr/local/lib/libmp3lame.so.0 (0x00007f9e2c22c000)
>        libvorbisenc.so.2 => /usr/lib/libvorbisenc.so.2 (0x00007f9e2be53000)
>        libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0x00007f9e2bc26000)
>        libx264.so.59 => /usr/lib/libx264.so.59 (0x00007f9e2b9a3000)
>        /lib64/ld-linux-x86-64.so.2 (0x00007f9e2e505000)
>        libogg.so.0 => /usr/lib/libogg.so.0 (0x00007f9e2b79d000)
>        libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f9e2b495000)
>        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f9e2b279000)
>        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x00007f9e2b077000)
>        libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f9e2ae5b000)
>        libdl.so.2 => /lib/libdl.so.2 (0x00007f9e2ac57000)
>        libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f9e2aa55000)
>        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f9e2a850000)

OK looks like all dependent libraries are there.

>
>> Also are you familiar with strace? it can be useful in determining
>> what went wrong. for example you could try running
>>
>> strace -eopen ffmpeg [rest of your command line]
>>
>> output will be large, but its usually the last bit that is relevant.
>>
>> (-eopen traces every file that is opened and often spots an error if
>> all dependent libraries are not present)
>
> strace -eopen ffmpeg -i /data/mythtv/store/3229_20090318205900.mpg
> -vcodec libx264 -b 2772k -flags +loop -coder 1 -refs 2 -deblockalpha 0
> -deblockbeta 0 -partitions +parti4x4 -partitions +partp8x8 -partitions
> +partb8x8 -partitions +parti8x8 -me_method umh -subq 7 -me_range 24
> -cmp +chroma -bf 0 -b_strategy 1 -g 250 -keyint_min 25 -sc_threshold
> 40 -maxrate 4500k -r 25 -qmin 16 -qmax 32 -s 896x720 -aspect 16:9
> -acodec libfaac -ab 192k -ar 48000 -ac 6 -f mpegts result.ts
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> open("/usr/local/lib/libavdevice.so.52", O_RDONLY) = 3
> open("/usr/local/lib/libavformat.so.52", O_RDONLY) = 3
> open("/usr/local/lib/libavcodec.so.52", O_RDONLY) = 3
> open("/usr/local/lib/libavutil.so.50", O_RDONLY) = 3
> open("/usr/local/lib/libswscale.so.0", O_RDONLY) = 3
> open("/lib/libm.so.6", O_RDONLY)        = 3
> open("/lib/libc.so.6", O_RDONLY)        = 3
> open("/usr/lib/libz.so.1", O_RDONLY)    = 3
> open("/usr/local/lib/libfaac.so.0", O_RDONLY) = 3
> open("/usr/local/lib/libfaad.so.0", O_RDONLY) = 3
> open("/usr/local/lib/libmp3lame.so.0", O_RDONLY) = 3
> open("/usr/lib/libvorbisenc.so.2", O_RDONLY) = 3
> open("/usr/lib/libvorbis.so.0", O_RDONLY) = 3
> open("/usr/lib/libx264.so.59", O_RDONLY) = 3
> open("/usr/lib/libogg.so.0", O_RDONLY)  = 3
> open("/usr/lib/libX11.so.6", O_RDONLY)  = 3
> open("/lib/libpthread.so.0", O_RDONLY)  = 3
> open("/usr/lib/libxcb-xlib.so.0", O_RDONLY) = 3
> open("/usr/lib/libxcb.so.1", O_RDONLY)  = 3
> open("/lib/libdl.so.2", O_RDONLY)       = 3
> open("/usr/lib/libXau.so.6", O_RDONLY)  = 3
> open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 3
> FFmpeg version SVN-r18178, Copyright (c) 2000-2009 Fabrice Bellard, et al.
>  configuration: --enable-shared --enable-libxvid --enable-libvorbis
> --enable-libmp3lame --enable-gpl --enable-libfaad --enable-libfaac
> --enable-libx264
>  libavutil     50. 2. 0 / 50. 2. 0
>  libavcodec    52.22. 3 / 52.22. 3
>  libavformat   52.32. 0 / 52.32. 0
>  libavdevice   52. 1. 0 / 52. 1. 0
>  libswscale     0. 7. 1 /  0. 7. 1
>  built on Mar 24 2009 11:34:05, gcc: 4.3.2
> open("/data/mythtv/store/3229_20090318205900.mpg", O_RDONLY) = 3
>
> Seems stream 0 codec frame rate differs from container frame rate:
> 59.94 (60000/1001) -> 29.97 (30000/1001)
> Input #0, mpegts, from '/data/mythtv/store/3229_20090318205900.mpg':
>  Duration: 00:36:00.04, start: 46931.763644, bitrate: 12773 kb/s
>  Program 1
>    Stream #0.0[0x7c0]: Video: mpeg2video, yuv420p, 1920x1080 [PAR 1:1
> DAR 16:9], 80000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
>    Stream #0.1[0x7c1](eng): Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
> open("result.ts", O_RDONLY)             = 4
> File 'result.ts' already exists. Overwrite ? [y/N] y
> open("result.ts", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> Process 22764 detached
>

segfaults just after trying to open result.ts. Does the process have
permission to open and write to result.ts?


More information about the mythtv-users mailing list