 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
PaulS
Joined: 04 Jan 2008 Posts: 140
|
Posted: Fri Jul 18, 2008 6:02 pm Post subject: |
|
|
Test D without the extraneous -f yields interesting results.
ffmpeg actually starts chugging through frames for a few seconds, then self-terminates.
Try to play back the file, and the TiVo pops up an info screen : "not able to record this program because there was no video signal on the channel".
DEBUG:root:CACHE HIT! F:\Videos\H264\skatedog.mp4
DEBUG:root:transcoding to tivo model 648 using ffmpeg command:
DEBUG:root:C:\pytivo\pyTivo-06-25-2008-wmcbrine-H264\plugins\video\ffmpeg_mp2.exe -i F:\Videos\H264\skatedog.mp4 -an -vcodec copy -comment pyTivo.py -f vob -
FFmpeg version SVN-r11870, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --cpu=i686 --enable-memalign-hack --extra-ldflags=-static
libavutil version: 49.6.0
libavcodec version: 51.50.0
libavformat version: 52.7.0
libavdevice version: 52.0.0
built on Feb 5 2008 23:46:38, gcc: 4.2.3
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'F:\Videos\H264\skatedog.mp4':
Duration: 00:01:28.3, start: 0.000000, bitrate: 599 kb/s
Stream #0.0(und): Audio: mpeg4aac, 44100 Hz, stereo
Stream #0.1(und): Video: h264, yuv420p, 480x320 [PAR 0:1 DAR 0:1], 29.97 tb(r)
Output #0, vob, to 'pipe:':
Stream #0.0(und): Video: libx264, yuv420p, 480x320 [PAR 0:1 DAR 0:1], q=2-31, 29.97 tb(c)
Stream mapping:
Stream #0.1 -> #0.0
Press [q] to stop encoding
DEBUG:pyTivo.video.transcode:killing pid=3948me=11.5 bitrate= 678.0kbits/s |
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 140
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 369
|
Posted: Fri Jul 18, 2008 6:08 pm Post subject: |
|
|
| PaulS wrote: | Test D without the extraneous -f yields interesting results.
ffmpeg actually starts chugging through frames for a few seconds, then self-terminates.
Try to play back the file, and the TiVo pops up an info screen : "not able to record this program because there was no video signal on the channel".
|
Hrmm, pyTivo is killing ffmpeg. I wonder why...
BTW, what version of the pyTivo code did you start with? And have you made any code changes in this process? Or just conf file changes?
Just want to make sure I'm starting with the same code you are to exempt mp4 files from transcoding. |
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 140
|
Posted: Fri Jul 18, 2008 6:10 pm Post subject: |
|
|
Just pytivo.conf changes. No other code changes. Using 6/25/2008 snapshot of the wmcbrine branch.
I can easily grab his latest snapshot and try again... |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 369
|
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 140
|
Posted: Fri Jul 18, 2008 6:22 pm Post subject: |
|
|
| Upgraded to wmcbrine's latest snapshot. No change. ffmpeg is still getting whacked. |
|
| Back to top |
|
 |
rectalogic
Joined: 17 Jul 2008 Posts: 8
|
Posted: Fri Jul 18, 2008 7:18 pm Post subject: |
|
|
| PaulS wrote: | No hubs or mirror/SPAN capable switches here... Sorry! |
You should be able to do a capture on the box that is running pyTivo - using Wireshark/Ethereal or tcpdump. |
|
| Back to top |
|
 |
rectalogic
Joined: 17 Jul 2008 Posts: 8
|
Posted: Fri Jul 18, 2008 7:36 pm Post subject: |
|
|
| PaulS wrote: | Test D without the extraneous -f yields interesting results.
ffmpeg actually starts chugging through frames for a few seconds, then self-terminates.
Try to play back the file, and the TiVo pops up an info screen : "not able to record this program because there was no video signal on the channel".
|
Without the "-f mp4" ffmpeg is copying AAC audio and H.264 video into a VOB container (MPEG-2 PS). AAC/H.264 can be encapsulated in an MPEG-2 TS (like BlueRay and AVCHD do - e.g. like on the PS3 as mentioned) but ffmpeg only supports MPEG1 layer2 audio and MPEG2 video in a VOB/MPEG2-PS, but since it is copying the video codec (not transcoding) it's not checking that it's invalid so you end up with an unplayable/invalid vob file.
We really need a packet sniff of the Tivo playing an MP4 from Youtube and compare that to a sniff of Tivo attempting to play an MP4 downloaded from Youtube and renamed to *.tivo to prevent transcoding. There is probably some extra HTTP header or handshaking that needs to be sent. I don't think ffmpeg is relevant yet - we need to get MP4 playing on the Tivo then we can worry about how to encode that. |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 369
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 369
|
Posted: Fri Jul 18, 2008 11:32 pm Post subject: |
|
|
Crap. So the good news is that designating mp4 files to be passed without transcoding was easy.
But after re-reading the code, I realize that the transfer routine doesn't send a ContentType header at all. It only sends the response code and then starts sending bytes from the file.
And when I download an mp4 file from YouTube, the ContentType header is set to text/html on the download.
So the Tivo doesn't like it when pyTivo hands it a valid mp4 binary file and will abort the transfer as PaulS saw when renaming skatedog.mp4 to skatedog.tivo.
Another possibility is that the Tivo is expecting the ContentType based on what's returned in the folder listing, which is currently always x-tivo-mpeg. If that's not it, then the Tivo must just really examine the beginning bytes of the file to determine the type and is rejecting our YouTube downloaded mp4 file. Suck. |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 444
|
Posted: Sat Jul 19, 2008 2:15 am Post subject: |
|
|
Sniffing the YouTube playback isn't going to help much -- well, not for this, anyway -- because that's HME, and this is HMO. Assuming this is eventually going to be supported in TiVo Desktop, the necessary details will probably become apparent then. While it would certainly be amusing to have it in pyTivo before it was in TiVo Desktop, we don't even know that it's possible at this point. (It could be enabled for HME, but not HMO.)
Re: ContentType, the TiVo asks for a specific type in its requests, so that's what it expects back. The requests should be based on what it's told are available, but you can verify this by looking at the GET lines. For testing purposes, I just suggested changing all references to "video/x-tivo-mpeg" to "video/mp4", or perhaps "video/x-tivo-mp4". But who knows if that's what it wants? _________________ My pyTivo fork |
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 140
|
Posted: Sat Jul 19, 2008 4:41 am Post subject: |
|
|
| rectalogic wrote: | | PaulS wrote: | No hubs or mirror/SPAN capable switches here... Sorry! |
You should be able to do a capture on the box that is running pyTivo - using Wireshark/Ethereal or tcpdump. |
I believe he was looking for a capture of the traffic between my S3 and YouTube, not of the traffic between pyTivo and my S3. Since my network is switched, the traffic wouldn't traverse my pyTivo machine, and therefore is not directly subject to capture. I'll have to "borrow" a hub from work... |
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 140
|
Posted: Sat Jul 19, 2008 4:46 am Post subject: |
|
|
| wmcbrine wrote: | Re: ContentType, the TiVo asks for a specific type in its requests, so that's what it expects back. The requests should be based on what it's told are available, but you can verify this by looking at the GET lines. For testing purposes, I just suggested changing all references to "video/x-tivo-mpeg" to "video/mp4", or perhaps "video/x-tivo-mp4". But who knows if that's what it wants? |
If this is what you and I tested previously, that would be a no-go as well, right ?
We tried changing the MIME types in the pyTivo code to mp4, and the TiVo outright rejected those recordings as incompatible/copy-protected. Red circle with a line through it. |
|
| Back to top |
|
 |
rectalogic
Joined: 17 Jul 2008 Posts: 8
|
Posted: Sat Jul 19, 2008 7:02 am Post subject: |
|
|
| wmcbrine wrote: | Sniffing the YouTube playback isn't going to help much -- well, not for this, anyway -- because that's HME, and this is HMO. |
But whatever the protocol is we could emulate it in pyTivo. It might be different enough that it ends up being a separate codebase. A simple web server that uses HME to serve a list of mp4 videos and can stream them direct to the tivo, or transcode them if they are in the wrong format.
It could also http proxy other internet web sites that have mp4 and other video content (e.g. flv) and stream/transcode them to the tivo.
This to me is actually more interesting than pyTivo/HMO mp4 support. |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 369
|
|
| 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
|
|