新型AtomのD510を使ってPT2の録画サーバを作ったときのメモ その5
録画ファイルにはワンセグなどのデータがある。
それらからHD動画だけを抜き出す tssplitter というツールがあるらしいのでインストールする。
http://hp.vector.co.jp/authors/VA038175/ から tssplitter_lite.zip をダウンロード
$ unzip tssplitter_lite.zip
$ cd tssplitter_lite
$ make
$ sudo cp tssplitter_lite /usr/local/bin
tssplitter_lite がちゃんと分離してくれるか確認する。
$ recpt1 --strip --b25 20 10 test.ts
enable B25 strip
using B25...
pid = 4267
C/N = 28.345783dB
Recording...
Recorded 11sec
分離するプログラムIDを ffmpeg で調査
$ ffmpeg -i test.ts
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:35:00, gcc: 4.4.1
[NULL @ 0xaf68b0]non-existing PPS referenced
[h264 @ 0xaf68b0]non-existing PPS referenced
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
[h264 @ 0xaf68b0]non-existing PPS referenced
Last message repeated 1 times
[h264 @ 0xaf68b0]decode_slice_header error
[h264 @ 0xaf68b0]no frame!
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Seems stream 2 codec frame rate differs from container frame rate: 29.97 (30000/1001) -> 14.99 (15000/1001)
Input #0, mpegts, from 'test.ts':
Duration: 00:00:10.52, start: 65308.874011, bitrate: 14672 kb/s
Program 26624 NHKAm9g1�?e8M
Stream #0.0[0x100]: Video: mpeg2video, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 20000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x110]: Audio: aac, 48000 Hz, mono, s16, 65 kb/s
Program 26625 NHKAm9g2�?e8M
Stream #0.0[0x100]: Video: mpeg2video, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 20000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x110]: Audio: aac, 48000 Hz, mono, s16, 65 kb/s
Program 27008 NHK7HBSG�?e8M
Stream #0.2[0x581]: Video: h264, yuv420p, 320x180, 14.99 tbr, 90k tbn, 29.97 tbc
Stream #0.3[0x583]: Audio: aac, 24000 Hz, mono, s16, 50 kb/s
Program 65520
At least one output file must be specified
daisuke@D510MO-PC:~$ tssplitter
tssplitter: command not found
daisuke@D510MO-PC:~$ tssplitter_lite
tssplitter_lite - tssplitter_lite program Ver. 0.0.0.1
usage: tssplitter_lite src.ts dst.ts [options]
options:
-f : use fifo
分離するプログラムIDは 26624。 ちなみに 27008 はワンセグのデータ。
tssplitter_lite でHDのみ分離する。
$ tssplitter_lite test.ts test_tss.ts 26624
分離できたか ffmpeg で確認
$ ffmpeg -i test_tss.ts
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:35:00, gcc: 4.4.1
Seems stream 0 codec frame rate differs from container frame rate: 59.94 (60000/1001) -> 29.97 (30000/1001)
Input #0, mpegts, from 'test_tss.ts':
Duration: 00:00:09.83, start: 65309.078711, bitrate: 13641 kb/s
Program 26624
Stream #0.0[0x100]: Video: mpeg2video, yuv420p, 1440x1080 [PAR 4:3 DAR 16:9], 20000 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0.1[0x110]: Audio: aac, 48000 Hz, mono, s16, 71 kb/s
At least one output file must be specified