< Bluetooth not visible ubuntu - solved
archive
Ubuntu Hardy -> Intrepid upgrade : screen saver>
(blog entry)
Saturday 22 November 2008
Ubuntu Hardy -> Intrepid upgrade : nuvexport
# This step will knock out mythtv if you have it but you can reinstall later # Pas de panic: All the settings will still be in mySQL # Step 1 - remove old stuff, update dependencies apt-get purge ffmpeg x264 libx264-dev libx264-57 libx264-59 apt-get remove libavutil-dev libavcodec-dev apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaad-dev libfaac-dev libmp3lame-dev libtheora-dev # step 2 - 264 codec cd ~/ git clone git://git.videolan.org/x264.git cd x264 ./configure --prefix=/usr --enable-shared make checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" ldconfig # Step 3 - make/install ffmpeg cd ~/ svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg cd ffmpeg ./configure --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 make checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3"Now we should have ffmpeg installed. Next onto nuvexport, the mythtv transcoder. Nuvexport (nuvexport_0.21.0-0ubuntu2) supplied with intrepid seems to be broken, or perhaps a configuration problem?
mythtv@brimstone:~$ nuvexport --profile adam --input 1001_20081121205900.mpg Not connected to mythbackend.It seems I had an old version lurking around. I deleted /usr/local/bin/nuvexport and reinstalled nuvexport
apt-get install nuvexportNow I get
ffmpeg had critical errors: ffmpeg: unrecognized option '-me'This is because ffmpeg -me is now ffmpeg -me_method. => Change the line in /usr/share/nuvexport/export/ffmpeg/MP4.pm from -me to -me_method Run again, a new error this time:
ffmpeg had critical errors: ffmpeg: unrecognized option '-flags2'
It turns out flags2 does exist but the parameters passed to it have changed. see ffmpeg -h, it's not mentioned in the man page.
Edit /usr/share/nuvexport/export/ffmpeg/MP4.pm again.
- - remove brdo, apparently now implied with -subq of less than 7
- - change 8x8dct to dct8x8
ffmpeg -threads 2 -y -f s16le -ar 48000 -ac 2 -i /tmp/fifodir_15529/audout -f rawvideo -pix_fmt yuv420p -s 720x576 -aspect 1.77777777777778 -r 25.000 -i /tmp/fifodir_15529/vidout -aspect 1.77777777777778 -r 25 -deinterlace -croptop 8 -cropright 10 -cropbottom 8 -cropleft 10 -s 320x176 -vcodec libx264 -b '96k' -title 'Have I Got News for You' -level 30 -loop 1 -g 250 -keyint_min 25 -sc_threshold 40 -rc_eq 'blurCplx^(1-qComp)' -bt '96k' -maxrate '1404k' -bufsize '2000k' -i_qfactor '0.71428572' -b_qfactor '0.76923078' -bf '0' -me_method umh -refs 2 -subq 7 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags2 +wpred+mixed_refs+dct8x8 -me_range 21 -trellis 2 -chroma 1 -slice 2 -cmp 1 -deblockalpha 0 -deblockbeta 0 -acodec libfaac -ar 48000 -async 1 -ab '96k' foo.mp4
FFmpeg version SVN-r15905, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 3. 0 / 52. 3. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
libpostproc 51. 2. 0 / 51. 2. 0
built on Nov 22 2008 09:10:42, gcc: 4.3.2
Input #0, s16le, from '/tmp/fifodir_15529/audout':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0.0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, rawvideo, from '/tmp/fifodir_15529/vidout':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #1.0: Video: rawvideo, yuv420p, 720x576, 25.00 tb(r)
Output #0, mp4, to 'foo.mp4':
Stream #0.0: Video: libx264, yuv420p, 320x176 [PAR 44:45 DAR 16:9], q=2-31, 96 kb/s, 25.00 tb(c)
Stream #0.1: Audio: libfaac, 48000 Hz, stereo, s16, 96 kb/s
Stream mapping:
Stream #1.0 -> #0.0
Stream #0.0 -> #0.1
[libx264 @ 0xa230780]using SAR=44/45
[libx264 @ 0xa230780]using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0xa230780]profile High, level 3.0
Press [q] to stop encoding
[libx264 @ 0xa230780]error, non monotone timestamps -2147483648 >= -2147483648
av_interleaved_write_frame(): Error while opening file
It seems the non monotone timestamps errors occur when using mythtv output any (according to various forum posts).
A solution on this forum seems to work. It involves removing the check in ffmpeg.c / write_frame() so that exit() is not called when the timestamp error condition occurs.
Happy days.
Side issue. Filenames are now incorrect in moving from nuvexport 0.4 to 0.5
The following used to give a human friendly filename, e.g 2008-11-17 20-28 - Panorama - What Happened to Baby P.mp4
filename=%m - %t - %s
Now, i need to use the following. Madness !
filename=%pY-%pm-%pd %pH-%pi - %T - %S
Hmmm, I spoke too soon. The fix above to ffmpeg.c doesn't seem to work. The files that are created only have one frame in!
Right. I've finally given up. It can't be done, or not by myself, in any reasonable time period. For now I'm just going to swap to the standard mpeg4 encoder. Quality is much lower per bit, but it works, and it is x5 faster, 100fps compared to 20fps.
In the /etc/nuvexportrc file change h264 to mpeg4
mp4_codec=mpeg4