 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
cmay4
Joined: 22 Feb 2008 Posts: 3
|
Posted: Fri Feb 22, 2008 3:27 pm Post subject: Problems with mkv files |
|
|
First off, thank for all the hard work on this.
I've streamed divx files just fine (and they look great), but I've been testing mkv files and running into alot of problems. First, I am running the latest Ubuntu, but it has a problem of the ffmpeg not supporting AC3. Fortunately, I was able to get a newer version from the mediubuntu repository, so that is working fine.
So I downloaded 2 MKV trailers. The first was a Toy Story trailer and here is the log:
192.168.1.40 - - [22/Feb/2008 14:49:02] "GET /TiVoConnect?Command=TVBusQuery&Container=MyMovies&File=%2F toy.story.2.1999.720p.hdtv.x264.sample-hv.mkv HTTP/1.1" 200 -
192.168.1.40 - - [22/Feb/2008 14:49:14] "GET /MyMovies/toy.story.2.1999.720p.hdtv.x264.sample-hv.mkv HTTP/1.1" 200 -
['/usr/bin/ffmpeg', '-i', '/home/public/media/movies/toy.story.2.1999.720p.hdtv.x264.sample-hv.mkv', '-vcodec', 'mpeg2video', '-b', '8192k', '-maxrate', '17408k', '-bufsize', '1024k', '-comment', 'pyTivo.py', '-ab', '384k', '-ar', '48000', '-acodec', 'ac3', '-f', 'vob', '-']
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Dec 20 2007 21:25:50, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
[matroska @ 0xb7fa1610]Ignoring seekhead entry for ID=0x1549a966
[matroska @ 0xb7fa1610]Ignoring seekhead entry for ID=0x1654ae6b
[matroska @ 0xb7fa1610]Ignoring seekhead entry for ID=0x114d9b74
[matroska @ 0xb7fa1610]Unknown entry 0x73a4 in info header
[matroska @ 0xb7fa1610]Unknown track header entry 0x55aa - ignoring
[matroska @ 0xb7fa1610]Unknown track header entry 0x23314f - ignoring
[matroska @ 0xb7fa1610]Unknown track header entry 0x55ee - ignoring
[matroska @ 0xb7fa1610]Unknown track header entry 0xaa - ignoring
[matroska @ 0xb7fa1610]Unknown track header entry 0x55aa - ignoring
[matroska @ 0xb7fa1610]Unknown track header entry 0x23314f - ignoring
[matroska @ 0xb7fa1610]Unknown track header entry 0x55ee - ignoring
[matroska @ 0xb7fa1610]Unknown track header entry 0xaa - ignoring
Input #0, matroska, from '/home/public/media/movies/toy.story.2.1999.720p.hdtv.x264.sample-hv.mkv':
Duration: 00:01:01.3, bitrate: N/A
Stream #0.0: Audio: ac3, 48000 Hz, 5:1
Stream #0.1: Video: h264, yuv420p, 1280x688, 23.98 fps(r)
Output #0, vob, to 'pipe:':
Stream #0.0: Video: mpeg2video, yuv420p, 1280x688, q=2-31, 8192 kb/s, 23.98 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
No accelerated IMDCT transform found
Press [q] to stop encoding
Now at this point, even though the process is running in the background, everything is hanging. I had to hit "ENTER" from the command-line and they restart the application with a "%1" and it actually started:
[1]+ Stopped ./pyTivo
may@homer:~/src/pytivo$ %1
./pyTivo
frame= 1470 q=4.0 Lsize= 47514kB time=61.3 bitrate=6352.8kbits/s
video:43966kB audio:2872kB global headers:0kB muxing overhead 1.442896%
192.168.1.40 - - [22/Feb/2008 14:54:35] "GET /MyMovies/toy.story.2.1999.720p.hdtv.x264.sample-hv.mkv HTTP/1.1" 206 -
Once it finished, I checked the file on the Tivo HD and it was stuttering badly. The bitrate seems pretty low, so maybe that is the case?
Second, I tried a Terminator trailer. This one seems to hang in the middle of the process. When I looked at what was on the Tivo HD, it actually looked good, but the sound was gibberish.
192.168.1.40 - - [22/Feb/2008 14:56:36] "GET /TiVoConnect?Command=QueryContainer&Container=MyMovies&SortOrder=!CaptureDate &ItemCount=1&AnchorItem=%2FMyMovies%2Fppq-terminator.2.mkv&AnchorOffset=-1&Filter= x-tivo-container%2Ftivo-videos,x-tivo-container%2Ffolder,video%2Fx-tivo-mpeg,video%2F* HTTP/1.1" 200 -
192.168.1.40 - - [22/Feb/2008 14:56:36] "GET /TiVoConnect?Command=TVBusQuery&Container=MyMovies&File=%2Fppq-terminator.2.mkv HTTP/1.1" 200 -
192.168.1.40 - - [22/Feb/2008 14:56:46] "GET /MyMovies/ppq-terminator.2.mkv HTTP/1.1" 200 -
['/usr/bin/ffmpeg', '-i', '/home/public/media/movies/ppq-terminator.2.mkv', '-vcodec', 'mpeg2video', '-b', '8192k', '-maxrate', '17408k', '-bufsize', '1024k', '-comment', 'pyTivo.py', '-ab', '384k', '-ar', '48000', '-acodec', 'ac3', '-f', 'vob', '-']
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-libmp3lame --enable-libfaadbin --enable-libfaad --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 --enable-amr_nb --enable-amr_wb --enable-shared --prefix=/usr
libavutil version: 1d.49.3.0
libavcodec version: 1d.51.38.0
libavformat version: 1d.51.10.0
built on Dec 20 2007 21:25:50, gcc: 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)
[matroska @ 0xb7f75610]Ignoring seekhead entry for ID=0x1549a966
[matroska @ 0xb7f75610]Ignoring seekhead entry for ID=0x1654ae6b
[matroska @ 0xb7f75610]Ignoring seekhead entry for ID=0x114d9b74
[matroska @ 0xb7f75610]Unknown entry 0x73a4 in info header
[matroska @ 0xb7f75610]Unknown track header entry 0x55aa - ignoring
[matroska @ 0xb7f75610]Unknown track header entry 0x23314f - ignoring
[matroska @ 0xb7f75610]Unknown track header entry 0x55ee - ignoring
[matroska @ 0xb7f75610]Unknown track header entry 0xaa - ignoring
[matroska @ 0xb7f75610]Unknown track header entry 0x55aa - ignoring
[matroska @ 0xb7f75610]Unknown track header entry 0x23314f - ignoring
[matroska @ 0xb7f75610]Unknown track header entry 0x55ee - ignoring
[matroska @ 0xb7f75610]Unknown track header entry 0xaa - ignoring
Input #0, matroska, from '/home/public/media/movies/ppq-terminator.2.mkv':
Duration: 00:00:57.0, bitrate: N/A
Stream #0.0: Video: h264, yuv420p, 1280x544, 23.98 fps(r)
Stream #0.1: Audio: dca, 48000 Hz, 5:1
Output #0, vob, to 'pipe:':
Stream #0.0: Video: mpeg2video, yuv420p, 1280x544, q=2-31, 8192 kb/s, 23.98 fps(c)
Stream #0.1: Audio: ac3, 48000 Hz, 5:1, 384 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
frame= 1366 q=3.6 Lsize= 40416kB time=19.0 bitrate=17418.3kbits/s
video:39025kB audio:891kB global headers:0kB muxing overhead 1.253106%
Does anyone else have mkv's working? Thanks for any help.
Chuck
Here is my config (I am using the latest wgw build from git):
[Server]
port=9032
# Full path to ffmpeg including filename
# For windows: ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe
# For linux: ffmpeg=/usr/bin/ffmpeg
#ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe
ffmpeg=/usr/bin/ffmpeg
# This will make a large debug.txt file in your base directory. It only
# debugs transcode.py right now.
#debug=false
# Max video bitrate, default 17408k
# sets ffmpeg -maxrate setting to minimize bitrate peak playback issues.
# mpegs with video bitrate above this setting will also be transcoded.
#MAX_VIDEO_BR=17408k
# Audio bit-rate, defaults to 192K for S2, 384K for S3/HD
#audio_br=320K
# Video bit-rate, defaults to 4096K for S2, 8192K for S3/HD
#video_br=12Mi
# Beacon broadcast address(es)
# The default is 255.255.255.255, but on some multihomed machines you
# may need to specify the subnet broadcast address(es) of your Tivo
# boxes. You can also specify "listen" to listen for direct connection
# attempts on port 2190, for use with the "Manually add a server..."
# function. (And if you set beacon to listen _only_, it turns off
# broadcasts.)
#beacon=192.168.1.255 listen
# Output Pixel Width:
# Width, defaults to 544 for S2, 1280 for S3/HD
# Height, defaults to 480 for S2, 720 for S3/HD
# Valid widths: [S3/HD = 1920, 1440, 1280], [S2/S3/HD = 720, 704, 544, 480, 352]
# Valid heights: [S3/HD = 1080, 720], [S2/S3/HD = 480]
#width=1280
#height=720
#ffmpeg_prams=-vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ab %(audio_br)s %(audio_fr)s %(audio_codec)s -f vob -
ffmpeg_prams=-vcodec mpeg2video -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ab %(audio_br)s %(audio_fr)s %(audio_codec)s -f vob -
# Per tivo options
# section named _tivo_TSN with the tsn in all caps
#[_tivo_00000DEADBEEF]
# If you want to use 16:9 or 4:3 on this tivo
#aspect169=true
[MyMovies]
type=video
path=/home/public/media/movies |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Fri Feb 22, 2008 3:54 pm Post subject: |
|
|
I think it is an error in ffmpeg.
I don't know how others are doing, but I stay away from mkv files. I can normally stream much faster than real time. But mkv files cause me all kinds of headaches. And they always take FOREVER to stream.
Good luck, I would love to be able to get them to work properly. |
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Fri Feb 22, 2008 4:16 pm Post subject: |
|
|
| Same here. Matroska videos are still often problematic for ffmpeg. Some work, and some don't. It's very hit-or-miss for me. |
|
| Back to top |
|
 |
dlfl
Joined: 04 Jan 2008 Posts: 40 Location: Ohio
|
Posted: Fri Feb 22, 2008 4:54 pm Post subject: |
|
|
| PaulS wrote: | Same here. Matroska videos are still often problematic for ffmpeg. Some work, and some don't. It's very hit-or-miss for me. |
Ditto _________________ TiVo 649 (Series 2 DT), Win XP Pro, Wired Ethernet
Try pyTivoMetaGen
VideoReDo users: try TVAP |
|
| Back to top |
|
 |
cmay4
Joined: 22 Feb 2008 Posts: 3
|
Posted: Fri Feb 22, 2008 5:04 pm Post subject: Thanks |
|
|
| Good to know. I thought I read that others had gotten it to work. I'll just skip them for now. Thanks. |
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Fri Feb 22, 2008 7:16 pm Post subject: |
|
|
I managed to crash my S3 twice tonight trying to download MKV videos.
Attemps to download an MKV caused ffmpeg to crash into a Dr. Watson error handling window. Fine, the transfer just sat there, making zero progress on the S3. Trying to cancel the recording by going into the recording's NPL entry, or the ToDo List entry, both caused the TiVo to hang on the "Please Wait..." prompt.
Anything we can do to on the pyTivo side to avoid these hangs ? |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Fri Feb 22, 2008 8:20 pm Post subject: |
|
|
I would have to see it myself most likely to know what is happening.
If ffmpeg crashes it has been my experience that pytivo handles that just fine. But if the crash is locking up your entire machine then I think there is little pyTivo can do since it is stopped at that point too. |
|
| Back to top |
|
 |
cmay4
Joined: 22 Feb 2008 Posts: 3
|
Posted: Fri Feb 22, 2008 8:34 pm Post subject: |
|
|
| On 1 or the 3 files I tried, it stared fine and then just hung. I was able to cancel the transfer on the tivo just fine though. |
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Sat Feb 23, 2008 3:58 am Post subject: |
|
|
| krkeegan wrote: | I would have to see it myself most likely to know what is happening.
If ffmpeg crashes it has been my experience that pytivo handles that just fine. But if the crash is locking up your entire machine then I think there is little pyTivo can do since it is stopped at that point too. |
Usually, when there's a problem with ffmpeg, everything is handled gracefully. The cascading ffmpeg and TiVo crashes are kind of a pain, though.
Nope. Windows remains up, it's just ffmpeg that's crashing. It's triggering the Dr. Watson stuff, and prompting the user if they would like to send info concerning the crash.
It looks like the error reporting can be disabled : http://www.annoyances.org/exec/show/article03-003 |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 262
|
Posted: Wed Feb 27, 2008 8:04 pm Post subject: |
|
|
I've never had a problem with mkv files on Windows XP, other than audio channels being reassigned. But most of my mkv's are from high quality sources. Is this just a problem on Ubunbtu? Since your ffmpeg_prams includes audio_fr I assume you are using the latest pytivo version from my branch or krkeegans branch which includes my audio copy patch. Yet your Toy Story clip is not using audio copy as I would expect. Is your version of ffmpeg really reporting the source audio as AC3 instead of Liba52 as I am used to seeing on Windows. If that is the case, then I need to update the audio codec function to recognize both Liba52 and AC3. I'll issue an update this weekend when I have time to catch up after being away. This could possibly help with your first file, but I've never seen the dca audio reported by your second clip. You could be right about the low source bitrate being a problem. _________________ Download pyTivo
my pyTivo branch |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 514
|
Posted: Wed Feb 27, 2008 11:30 pm Post subject: |
|
|
| wgw wrote: | Since your ffmpeg_prams includes audio_fr I assume you are using the latest pytivo version from my branch or krkeegans branch which includes my audio copy patch. |
It's in mine, too.
Welcome back BTW. _________________ My pyTivo fork |
|
| Back to top |
|
 |
jcthorne
Joined: 30 Jan 2008 Posts: 27 Location: Houston, TX
|
Posted: Thu Feb 28, 2008 9:46 am Post subject: |
|
|
Lately I have had pretty good luck with 720p mkv files with pyTivo. I was having a great deal of difficulty with the audio. Sync, wrong channels etc. ffmpeg just does not seem quite able to reencode both h264 video and ac3 5.1 audio on the fly and resync them correctly.
But, I have since started ripping out the audio track, reencoding it with Eac3to to an AC3 with 5.1 and 384kbps data rate. Then mux the audio back with the untouch video and give it to pyTivo / ffmpeg and it works like a champ. does not seem to matter the original audio format or data rate, DTS works fine too.
This is all under Windows XP. |
|
| Back to top |
|
 |
wgw
Joined: 06 Jan 2008 Posts: 262
|
Posted: Thu Feb 28, 2008 3:47 pm Post subject: |
|
|
@cmay4,
I'd have to agree with krkeegan, there seems to be a problem in your version of ffmpeg.
I downloaded the same 2 clips you tested and forced pytivo to recode the audio instead of using acodec copy. I'm using the Windows ffmpeg bundled with pytivo.
The center channel was moved to the right front speaker as is common with ffmpeg. But other than that, the video and audio on Toy Story 2 was perfect. The Terminator 2 audio sounded fine but was a little out of sync.
I have updated my branch to recognize 'ac3' as reported by your version of ffmpeg. This should cause pytivo to use 'acodec copy' now with your ffmpeg version instead of re-encoding the audio. You might want to try it with the Toy Story clip again and see if the audio works now. _________________ Download pyTivo
my pyTivo branch |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|