 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
rdian06
Joined: 12 Apr 2008 Posts: 463
|
Posted: Thu Jul 17, 2008 6:35 pm Post subject: |
|
|
| PaulS wrote: | False alarm.... Your revised parm list is transcoding to mpeg-2, I think...
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
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: mpeg2video, yuv420p, 480x320 [PAR 0:1 DAR 0:1], q=2-31, 8192 kb/s, 29.97 tb(c)
Stream #0.1(und): Audio: ac3, 44100 Hz, stereo, 384 kb/s
Stream mapping:
Stream #0.1 -> #0.0 |
Strange. My revised ffmpeg_params shouldn't be transcoding at all.
Can you include the snippet of the log with the ffmpeg command line that pyTivo is calling. Should appear right above that snippet you posted.
Also do try what rectalogic said about renaming the file to .tivo. If that does bypass all the checks and just streams the file without any conversion then we'll know that h264 transfer is at least working.
|
|
| Back to top |
|
 |
rectalogic
Joined: 17 Jul 2008 Posts: 8
|
Posted: Thu Jul 17, 2008 6:37 pm Post subject: |
|
|
| PaulS wrote: | False alarm.... Your revised parm list is transcoding to mpeg-2, I think... |
You will need to use ffmpeg_tmpl instead of ffmpeg_prams. That way you control the entire transcode command line and can force the container format (to not be vob).
For now just leave most values to default, later this can be made into a proper template (see the values that will be substituted in transcode.py#transcode) and we can plug in audio/video bitrate, fps, audio samplerate, channels and other options to improve quality/compression etc.
This should work:
ffmpeg_tmpl=-acodec libfaac -vcodec libx264 -f mp4
But please try streaming the youtube MP4 directly with no ffmpeg involvement at all (rename to skatedog.tivo) so we can see if Tivo will even accept MP4 from pyTivo at all.
Andrew
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 463
|
Posted: Thu Jul 17, 2008 6:43 pm Post subject: |
|
|
| rectalogic wrote: | | PaulS wrote: | False alarm.... Your revised parm list is transcoding to mpeg-2, I think... |
You will need to use ffmpeg_tmpl instead of ffmpeg_prams. That way you control the entire transcode command line and can force the container format (to not be vob).
For now just leave most values to default, later this can be made into a proper template (see the values that will be substituted in transcode.py#transcode) and we can plug in audio/video bitrate, fps, audio samplerate, channels and other options to improve quality/compression etc.
This should work:
ffmpeg_tmpl=-acodec libfaac -vcodec libx264 -f mp4
But please try streaming the youtube MP4 directly with no ffmpeg involvement at all (rename to skatedog.tivo) so we can see if Tivo will even accept MP4 from pyTivo at all.
Andrew |
Ah, so the wiki page is wrong. ffmpeg_params isn't the full command. So shouldn't it be:
ffmpeg_tmpl = -acodec copy -vcodec copy -f mp4 -
to avoid mucking with the streams. If you actually tell it what codecs to use won't it apply processing? At the very least you're missing the - at the end to tell it to stream to stdout rather than a file.
|
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Thu Jul 17, 2008 6:45 pm Post subject: |
|
|
Sorry, folks. I can do no more testing tonight. My wife has just commandeered the TiVo to watch "her shows".
I will do my best to try as many test cases for you guys tomorrow morning. I think we're getting closer, for what it's worth...
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 463
|
|
| Back to top |
|
 |
rectalogic
Joined: 17 Jul 2008 Posts: 8
|
Posted: Thu Jul 17, 2008 6:59 pm Post subject: |
|
|
| rdian06 wrote: |
ffmpeg_tmpl = -acodec copy -vcodec copy -f mp4 -
to avoid mucking with the streams. If you actually tell it what codecs to use won't it apply processing? At the very least you're missing the - at the end to tell it to stream to stdout rather than a file. |
Yes, you need the "-" at the end, sorry.
You can use 'copy' for audio and video if you know your source contains AAC and H.264. But if that is the case and it is in an MP4 container, you can just rename to .tivo and stream directly.
So the cases where you actually need to transcode are when your source is a different format, in which case you need to specify aac and h264.
Going forward I would expect pyTivo would use ffmpeg to identify the source codecs and do the minimum necessary to prepare it for tivo (i.e. only transcode streams that need it etc.)
|
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Fri Jul 18, 2008 6:34 am Post subject: |
|
|
OK, I managed to squeeze a few minutes of play time in this morning before heading to work. For all tests I used rectalogic's modified ffmpeg_tmpl.
I couldn't observe the pyTivo debug output, since my projector set up is downstairs, and pyTivo PC is upstairs. I was already late for work, and didn't have time to march up and down the stairs repeatedly.
I copied skatedog.mp4 to skatedog-tivo.tivo, so that both files would exist and be easily recognized in the pyTivo folder of my NPL.
1. Attempted transfer of skatedog-tivo.tivo. Blue LED on front of TiVo flashed on for an instant (1/10 of second, perhaps) but returned to the off state. TiVo screen indicated that the transfer would be added to the transfer queue, even though there were no pending or active transfers. Tried this a few times, and got the same results. No joy.
2. Attempted transfer of skatedog.mp4. Blue LED on front of TiVo remained on for a few seconds. skatedog appeared in my NPL, first as a blue dotted item, then briefly (perhaps 1-2 seconds) as a normal item before DISAPPEARING from the NPL. Never got a chance to see if I could play it, since the item disappeared from NPL before I could select it for playback.
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 463
|
Posted: Fri Jul 18, 2008 1:10 pm Post subject: |
|
|
| PaulS wrote: | OK, I managed to squeeze a few minutes of play time in this morning before heading to work. For all tests I used rectalogic's modified ffmpeg_tmpl.
I couldn't observe the pyTivo debug output, since my projector set up is downstairs, and pyTivo PC is upstairs. I was already late for work, and didn't have time to march up and down the stairs repeatedly.
I copied skatedog.mp4 to skatedog-tivo.tivo, so that both files would exist and be easily recognized in the pyTivo folder of my NPL.
1. Attempted transfer of skatedog-tivo.tivo. Blue LED on front of TiVo flashed on for an instant (1/10 of second, perhaps) but returned to the off state. TiVo screen indicated that the transfer would be added to the transfer queue, even though there were no pending or active transfers. Tried this a few times, and got the same results. No joy.
2. Attempted transfer of skatedog.mp4. Blue LED on front of TiVo remained on for a few seconds. skatedog appeared in my NPL, first as a blue dotted item, then briefly (perhaps 1-2 seconds) as a normal item before DISAPPEARING from the NPL. Never got a chance to see if I could play it, since the item disappeared from NPL before I could select it for playback. |
Doh. We were really hoping 1 was going to work.
For 2, if you used the exact original ffmpeg_tmpl that rectalogic posted, then it couldn't have ever worked because his original post lacks the final - that tells ffmpeg to output to stdout rather than to a normal file. ffmpeg would have errored out with a message about needing to specify an output file name.
When you get more time, try doing the following with the original pyTivo included ffmpeg_mp2.exe:
A) 1 again and post the debug log.
B) Then try 2 again. Remove the format, video_codec and bufsize options and just use the following modified version of rectalogic's ffmpeg_tmpl:
| Code: |
ffmpeg_tmpl = -acodec libfaac -vcodec libx264 -f -comment pyTivo.py -f mp4 -
|
Don't forget the final - . Then stream the skatedog.mp4
C) Then try this with the skatedog.mp4:
| Code: |
ffmpeg_tmpl = -acodec copy -vcodec copy -f -comment pyTivo.py -f mp4 -
|
D) Then try this with the skatedog.mp4:
| Code: |
ffmpeg_tmpl = -an -vcodec copy -f -comment pyTivo.py -f vob -
|
For this last one, apparently the PS3 can playback vob containers with h264 video streams so maybe the Tivo might.
|
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Fri Jul 18, 2008 2:25 pm Post subject: |
|
|
FYI, my tests from this morning did include the dash at the end of ffmpeg_tmpl , and did use the ffmpeg provided with pyTivo .
Looks like I'll get a chance to do some more testing tonight. Stay tuned...
|
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Fri Jul 18, 2008 3:54 pm Post subject: |
|
|
Test A = log1.txt) Same results. Quick flash of blue LED, notification that transfer will be enqueued. pyTivo exception is occurring.
Test B = log2.txt) Transfer appears to commence from TiVo display, blue LED remains lit, but transfer is hung without any data being transferred. Looks like a superfluous "-f" in the ffmpeg_tmpl , which leads me to...
Test B2 = log2b.txt) Same as B, but changed "-f -comment pyTivo.py" to "-comment pyTivo.py". Also hung transfer. ffmpeg getting hung up on some unexpected input or options.
Rinse and repeat for B, C and D. Using your ffmpeg_tmpl, ffmpeg generates the following error :
| Code: | Unknown input or output format: -comment |
| Description: |
|
 Download |
| Filename: |
log2b.txt |
| Filesize: |
14.75 KB |
| Downloaded: |
13 Time(s) |
| Description: |
|
 Download |
| Filename: |
log2a.txt |
| Filesize: |
14.36 KB |
| Downloaded: |
12 Time(s) |
| Description: |
|
 Download |
| Filename: |
log1.txt |
| Filesize: |
10.78 KB |
| Downloaded: |
13 Time(s) |
|
|
| Back to top |
|
 |
PaulS
Joined: 04 Jan 2008 Posts: 148
|
Posted: Fri Jul 18, 2008 3:55 pm Post subject: |
|
|
More debug output.
| Description: |
|
 Download |
| Filename: |
log4.txt |
| Filesize: |
18.08 KB |
| Downloaded: |
11 Time(s) |
| Description: |
|
 Download |
| Filename: |
log3b.txt |
| Filesize: |
14.45 KB |
| Downloaded: |
13 Time(s) |
| Description: |
|
 Download |
| Filename: |
log3a.txt |
| Filesize: |
14.12 KB |
| Downloaded: |
9 Time(s) |
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 463
|
Posted: Fri Jul 18, 2008 5:23 pm Post subject: |
|
|
| PaulS wrote: |
Test B = log2.txt) Transfer appears to commence from TiVo display, blue LED remains lit, but transfer is hung without any data being transferred. Looks like a superfluous "-f" in the ffmpeg_tmpl , which leads me to...
|
Crap, I didn't proofread enough. You're right, that -f before -comment is a cut and paste error on my part. There should only be one -f at the end with container specifier.
Looking over the logs...
Last edited by rdian06 on Fri Jul 18, 2008 5:54 pm; edited 1 time in total |
|
| Back to top |
|
 |
Tennesotans
Joined: 08 Jul 2008 Posts: 4
|
Posted: Fri Jul 18, 2008 5:33 pm Post subject: |
|
|
Keep trying -- this would be a huge "win"
I check this thread every other hour...
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 463
|
Posted: Fri Jul 18, 2008 5:53 pm Post subject: |
|
|
Test A: If I'm reading the log correctly, the Tivo is closing the socket for the transfer shortly after the first bit of the file is transferred. I wonder if that is because it actually cares about the file name and expects a .tivo file. Not familiar enough with the mechanics. Maybe someone else reading this knows. I guess the real way to continue to test this path is to modify pyTivo to not transcode .mp4 files. I'll see if I can hack that in.
Test B and C without the extraneous -f: ffmpeg wants more parameters for the audio and video codecs to figure out how to transcode/remux the streams. Will have to experiment more with ffmpeg to see if I can figure out what more it wants.
Test D without the extraneous -f: You only posted the log4.txt which has my stupid extra -f error. Could you post log4b.txt, without the extra -f ?
|
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 463
|
Posted: Fri Jul 18, 2008 6:00 pm Post subject: |
|
|
What really would be nice is if I could get a network capture of the traffic between your Tivo and YouTube while you're viewing a YouTube video.
But it's a lot more difficult to strip your personal info out of a network capture and unless you are familiar with doing one, it might be a real pain to setup. Guess that's a last resort or I can wait until one of my S3s finally gets the update.
We'll see what I can do with testing down path A.
|
|
| 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
|
|