pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Remux without reencoding for MKV, AVCHD, etc. in Push
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> pyTivo
 View previous topic :: View next topic  
Author Message
lucasnz



Joined: 13 Sep 2010
Posts: 251

PostPosted: Sun Jul 10, 2011 7:20 pm    Post subject: Reply with quote

Iluvatar wrote:
Great.

It may be asking too much but do you feel it would be possible to auto prefer an AC3 track over alternate tracks like DTS (as long as they match the preferred language)?

Many video files that I create or have come across offer both types of audio tracks so as to support different devices. This seems it would save time not having to transcode. No worries if not, this is already better than it was.


It is possible, if you are running my version of pyTivo it has the audio lang settings slightly tweaked so that it reads all the details from ffmpegs. I have;
audio_lang = en, 5.1, 6 channels, ac3

In my version of pytivo these settings are evaluated from left to right until there is only 1 match. So if there are two 6 channel audio tracks it will select the ac3 track.

Luke
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Wed Jul 13, 2011 9:16 pm    Post subject: Reply with quote

lucasnz,

Just sat down to test out some of your recent code and I am having failures with your most recent update (GIT@bc751c69ba9a4ce5c0e580aaa3b5d66816ac7105). The file is an MKV with h264 and 2ch AC3@ 384kbs

This issue is fixed by reverting two builds to (GIT@f65a7e7d81d51eaf456e0387e7d7279c77650213), just before your 2ch AAC code.

The only override I have in my .conf is for lang = eng

Here is the output.

Code:

7/13/11 5:10:40 PM   pyTivo[872]   DEBUG:pyTivo.video.transcode:ffmpeg output=FFmpeg version 0.6.3, Copyright (c) 2000-2010 the FFmpeg developers
7/13/11 5:10:40 PM   pyTivo[872]     built on May 29 2011 09:18:54 with gcc 4.2.1 (Apple Inc. build 5666) (dot 3)
7/13/11 5:10:40 PM   pyTivo[872]     configuration: --prefix=/opt/local --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-hardcoded-tables --enable-runtime-cpudetect --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libfaad --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --enable-nonfree --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-indevs --cc=/usr/bin/gcc-4.2 --arch=x86_64
7/13/11 5:10:40 PM   pyTivo[872]     libavutil     50.15. 1 / 50.15. 1
7/13/11 5:10:40 PM   pyTivo[872]     libavcodec    52.72. 2 / 52.72. 2
7/13/11 5:10:40 PM   pyTivo[872]     libavformat   52.64. 2 / 52.64. 2
7/13/11 5:10:40 PM   pyTivo[872]     libavdevice   52. 2. 0 / 52. 2. 0
7/13/11 5:10:40 PM   pyTivo[872]     libavfilter    1.19. 0 /  1.19. 0
7/13/11 5:10:40 PM   pyTivo[872]     libswscale     1.11. 0 /  1.11. 0
7/13/11 5:10:40 PM   pyTivo[872]     libpostproc   51. 2. 0 / 51. 2. 0
7/13/11 5:10:40 PM   pyTivo[872]   [matroska @ 0x12180c800]Estimating duration from bitrate, this may be inaccurate
7/13/11 5:10:40 PM   pyTivo[872]   Seems stream 0 codec frame rate differs from container frame rate: 47.95 (48000/1001) -> 24.00 (24/1)
7/13/11 5:10:40 PM   pyTivo[872]   Input #0, matroska, from '/Volumes/Media/TiVo/True Blood S04E03.mkv':
7/13/11 5:10:40 PM   pyTivo[872]     Metadata:
7/13/11 5:10:40 PM   pyTivo[872]       doctype         : matroska
7/13/11 5:10:40 PM   pyTivo[872]     Duration: 00:57:09.66, start: 0.000000, bitrate: 384 kb/s
7/13/11 5:10:40 PM   pyTivo[872]       Stream #0.0(eng): Video: h264, yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 fps, 24 tbr, 1k tbn, 47.95 tbc
7/13/11 5:10:40 PM   pyTivo[872]       Stream #0.1: Audio: ac3, 48000 Hz, stereo, s16, 384 kb/s
7/13/11 5:10:40 PM   pyTivo[872]   At least one output file must be specified
7/13/11 5:10:40 PM   pyTivo[872]   Unhandled exception in thread started by <unbound method Video.process_queue>
7/13/11 5:10:40 PM   pyTivo[872]   ERROR:pyTivo:Exception in pyTivo
7/13/11 5:10:40 PM   pyTivo[872]   Traceback (most recent call last):
7/13/11 5:10:40 PM   pyTivo[872]     File "/Applications/pyTivo/plugins/video/video.py", line 464, in process_queue
7/13/11 5:10:40 PM   pyTivo[872]       self.push_one_file(item)
7/13/11 5:10:40 PM   pyTivo[872]     File "/Applications/pyTivo/plugins/video/video.py", line 414, in push_one_file
7/13/11 5:10:40 PM   pyTivo[872]       file_info['valid'] = transcode.supported_format(f['path'])
7/13/11 5:10:40 PM   pyTivo[872]     File "/Applications/pyTivo/plugins/video/transcode.py", line 990, in supported_format
7/13/11 5:10:40 PM   pyTivo[872]       if video_info(inFile)['Supported']:
7/13/11 5:10:40 PM   pyTivo[872]     File "/Applications/pyTivo/plugins/video/transcode.py", line 839, in video_info
7/13/11 5:10:40 PM   pyTivo[872]       vInfo['aCh'] = int(x.group(1))
7/13/11 5:10:40 PM   pyTivo[872]   TypeError: int() argument must be a string or a number, not 'NoneType'
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 251

PostPosted: Wed Jul 13, 2011 10:28 pm    Post subject: Reply with quote

I see from the output that the audio track says "stereo". I was aware that ffmpeg did this for some files but all the ones I had said 2 channel so I couldn't test that. There's obviously something wrong with my regular expression that isn't matching ", stereo," hence it's returning NoneType.

I'll look at this when I get home. Will re-post once I've fixed it...
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Thu Jul 14, 2011 1:50 am    Post subject: Reply with quote

lucasnz wrote:
I see from the output that the audio track says "stereo". I was aware that ffmpeg did this for some files but all the ones I had said 2 channel so I couldn't test that. There's obviously something wrong with my regular expression that isn't matching ", stereo," hence it's returning NoneType.

I'll look at this when I get home. Will re-post once I've fixed it...


ahh I should have seen that. I'm glad you have a keen eye. I appreciate the work you have done on this.

I would think that if there is an expression labeled 'stereo' that there would be a 'mono' as well.
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 251

PostPosted: Thu Jul 14, 2011 7:39 am    Post subject: Reply with quote

Just pushed an update that should fix the issue.
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Sat Jul 16, 2011 1:01 am    Post subject: Reply with quote

lucasnz wrote:
Just pushed an update that should fix the issue.


That seems to have fixed the issue I was having. Thanks.
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Sun Jul 31, 2011 1:32 pm    Post subject: Reply with quote

Lucasnz I am still running across issues where compatible audio is being transcoded during the remux. Not certain what the issue is. For example this morning I pushed an MKV video with compatible h264 video and 2ch aac audio and pyTivo decided to transcode that aac into ac3 for whatever reason.

The only pytivo.conf override I have is for 'eng' language audio and 640k max audio bitrate.

Code:

7/31/11 9:16:12.804 AM pyTivo: DEBUG:pyTivo.video.transcode:audio_lang: eng
7/31/11 9:16:12.804 AM pyTivo: DEBUG:pyTivo.video.transcode:selected audio stream: 0.1
7/31/11 9:16:12.804 AM pyTivo: DEBUG:pyTivo.video.transcode:transcoding to tivo model *** using ffmpeg command:
7/31/11 9:16:12.804 AM pyTivo: DEBUG:pyTivo.video.transcode:/opt/local/bin/ffmpeg -i /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv -vcodec copy -r 29.97 -b 8388k -maxrate 30000k -bufsize 4096k -ab 448k -ar 48000 -acodec ac3 -copyts -map 0.0 -map 0.1 -threads 2 -f mp4 /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv.pyTivo-temp
7/31/11 9:16:12.811 AM pyTivo: DEBUG:pyTivo.video.transcode:remuxing /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv to /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv.pyTivo-temp
7/31/11 9:16:12.834 AM pyTivo: ffmpeg version N-31627-g9c2651a, Copyright (c) 2000-2011 the FFmpeg developers
7/31/11 9:16:12.834 AM pyTivo:   built on Jul 23 2011 17:50:33 with clang 2.1 (tags/Apple/clang-163.7.1)
7/31/11 9:16:12.834 AM pyTivo:   configuration: --prefix=/opt/local --enable-nonfree --enable-gpl --enable-postproc --enable-runtime-cpudetect --enable-hardcoded-tables --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-indevs --cc=/Developer/usr/bin/clang --arch=x86_64
7/31/11 9:16:12.834 AM pyTivo:   libavutil    51. 11. 0 / 51. 11. 0
7/31/11 9:16:12.834 AM pyTivo:   libavcodec   53.  9. 0 / 53.  9. 0
7/31/11 9:16:12.834 AM pyTivo:   libavformat  53.  6. 0 / 53.  6. 0
7/31/11 9:16:12.834 AM pyTivo:   libavdevice  53.  2. 0 / 53.  2. 0
7/31/11 9:16:12.834 AM pyTivo:   libavfilter   2. 27. 3 /  2. 27. 3
7/31/11 9:16:12.834 AM pyTivo:   libswscale    2.  0. 0 /  2.  0. 0
7/31/11 9:16:12.834 AM pyTivo:   libpostproc  51.  2. 0 / 51.  2. 0
7/31/11 9:16:12.842 AM pyTivo: [matroska,webm @ 0x7fb22c04a000] Unknown entry 0x80
7/31/11 9:16:14.075 AM pyTivo: [matroska,webm @ 0x7fb22c04a000] Estimating duration from bitrate, this may be inaccurate
7/31/11 9:16:14.075 AM pyTivo: Seems stream 0 codec frame rate differs from container frame rate: 48.96 (1575346/32175) -> 24.48 (1575346/64350)
7/31/11 9:16:14.075 AM pyTivo: Input #0, matroska,webm, from '/Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv':
7/31/11 9:16:14.075 AM pyTivo:   Duration: 00:22:22.08, start: 0.000000, bitrate: N/A
7/31/11 9:16:14.075 AM pyTivo:     Stream #0.0(eng): Video: h264 (High), yuv420p, 720x544, PAR 1:1 DAR 45:34, 24.48 fps, 24.48 tbr, 1k tbn, 48.96 tbc (default)
7/31/11 9:16:14.075 AM pyTivo:     Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16 (default)
7/31/11 9:16:14.087 AM pyTivo: Output #0, mp4, to '/Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv.pyTivo-temp':
7/31/11 9:16:14.087 AM pyTivo:   Metadata:
7/31/11 9:16:14.087 AM pyTivo:     encoder         : Lavf53.6.0
7/31/11 9:16:14.087 AM pyTivo:     Stream #0.0(eng): Video: libx264, yuv420p, 720x544 [PAR 1:1 DAR 45:34], q=2-31, 787673.00 tbn, 24.48 tbc (default)
7/31/11 9:16:14.088 AM pyTivo:     Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s (default)
7/31/11 9:16:14.088 AM pyTivo: Stream mapping:
7/31/11 9:16:14.088 AM pyTivo:   Stream #0.0 -> #0.0
7/31/11 9:16:14.088 AM pyTivo:   Stream #0.1 -> #0.1
7/31/11 9:16:14.088 AM pyTivo: Press [q] to stop, [?] for help
7/31/11 9:16:14.592 AM pyTivo: frame=   81 fps=  0 q=-1.0 size=     804kB time=00:00:02.90 bitrate=2262.9kbits/s   
7/31/11 9:16:15.121 AM pyTivo: frame=  167 fps=162 q=-1.0 size=    1673kB time=00:00:06.13 bitrate=2233.0kbits/s   
7/31/11 9:16:15.624 AM pyTivo: frame=  242 fps=157 q=-1.0 size=    2732kB time=00:00:09.26 bitrate=2415.2kbits/s   
7/31/11 9:16:16.162 AM pyTivo: frame=  311 fps=150 q=-1.0 size=    3759kB time=00:00:12.14 bitrate=2535.7kbits/s   
.....


I am looking at other possible unnecessary audio transcoding as well and I will let you know if I find any thing. I think that it was transcoding compatible 640k ac3 to 640k ac3 on another video. I didn't happen to copy the debug output on that occasion but the remux was going very slow and the FFmpeg output led me to believe it was transcoding the audio.
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 251

PostPosted: Sun Jul 31, 2011 8:56 pm    Post subject: Reply with quote

Iluvatar wrote:

Code:

7/31/11 9:16:12.804 AM pyTivo: DEBUG:pyTivo.video.transcode:transcoding to tivo model *** using ffmpeg command:



Hmmm - I note that it says transcoding to tivo model ***. Is that because you've stared it out, or has pytivo failed to detect what model your tivo is? If pytivo has failed to detect your tivo model that could explain why it's transcoding. That is it's transcoding to a "known" good format supported by most tivos.

I really need to see the debug output above this in order to understand why it is transcoding. In particular there should be a line that displays all the meta data. I'm looking to see what aCh is set to.

Luke
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Sun Jul 31, 2011 9:21 pm    Post subject: Reply with quote

lucasnz wrote:
Iluvatar wrote:

Code:

7/31/11 9:16:12.804 AM pyTivo: DEBUG:pyTivo.video.transcode:transcoding to tivo model *** using ffmpeg command:



Hmmm - I note that it says transcoding to tivo model ***. Is that because you've stared it out, or has pytivo failed to detect what model your tivo is? If pytivo has failed to detect your tivo model that could explain why it's transcoding. That is it's transcoding to a "known" good format supported by most tivos.

I really need to see the debug output above this in order to understand why it is transcoding. In particular there should be a line that displays all the meta data. I'm looking to see what aCh is set to.

Luke


Sorry I thought I grabbed everything. I did star out the TiVo model. It is a premiere.

Also I have confirmed that if I set the max_audio_br to 640k the audio will still get transcoded down to 448k or even re-transcoded to 640k if I have the audio_br set to 640k. I will work on logs when I can.

Code:

7/31/11 5:17:52.991 PM pyTivo: DEBUG:pyTivo.video.transcode:ffmpeg output=ffmpeg version N-31627-g9c2651a, Copyright (c) 2000-2011 the FFmpeg developers
7/31/11 5:17:52.991 PM pyTivo:   built on Jul 23 2011 17:50:33 with clang 2.1 (tags/Apple/clang-163.7.1)
7/31/11 5:17:52.991 PM pyTivo:   configuration: --prefix=/opt/local --enable-nonfree --enable-gpl --enable-postproc --enable-runtime-cpudetect --enable-hardcoded-tables --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-indevs --cc=/Developer/usr/bin/clang --arch=x86_64
7/31/11 5:17:52.991 PM pyTivo:   libavutil    51. 11. 0 / 51. 11. 0
7/31/11 5:17:52.991 PM pyTivo:   libavcodec   53.  9. 0 / 53.  9. 0
7/31/11 5:17:52.991 PM pyTivo:   libavformat  53.  6. 0 / 53.  6. 0
7/31/11 5:17:52.991 PM pyTivo:   libavdevice  53.  2. 0 / 53.  2. 0
7/31/11 5:17:52.991 PM pyTivo:   libavfilter   2. 27. 3 /  2. 27. 3
7/31/11 5:17:52.991 PM pyTivo:   libswscale    2.  0. 0 /  2.  0. 0
7/31/11 5:17:52.991 PM pyTivo:   libpostproc  51.  2. 0 / 51.  2. 0
7/31/11 5:17:52.991 PM pyTivo: [matroska,webm @ 0x7fc33984a000] Unknown entry 0x80
7/31/11 5:17:52.991 PM pyTivo: [matroska,webm @ 0x7fc33984a000] Estimating duration from bitrate, this may be inaccurate
7/31/11 5:17:52.991 PM pyTivo: Seems stream 0 codec frame rate differs from container frame rate: 48.96 (1575346/32175) -> 24.48 (1575346/64350)
7/31/11 5:17:52.991 PM pyTivo: Input #0, matroska,webm, from '/Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv':
7/31/11 5:17:52.991 PM pyTivo:   Duration: 00:22:22.08, start: 0.000000, bitrate: N/A
7/31/11 5:17:52.991 PM pyTivo:     Stream #0.0(eng): Video: h264 (High), yuv420p, 720x544, PAR 1:1 DAR 45:34, 24.48 fps, 24.48 tbr, 1k tbn, 48.96 tbc (default)
7/31/11 5:17:52.991 PM pyTivo:     Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16 (default)
7/31/11 5:17:52.991 PM pyTivo: At least one output file must be specified
7/31/11 5:17:52.991 PM pyTivo: DEBUG:pyTivo.video.transcode:failed at aKbps
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:failed at kbps
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:aFreq=48000; aCh=2; container=matroska; kbps=None; mapAudio=[('0.1', '(eng) aac, 48000 Hz, stereo, s16 (default)')]; vHeight=544; vCodec=h264; Supported=True; aKbps=None; par=None; millisecs=1342080; vFps=24.48; par2=1.0; par1=1:1; mapVideo=0.0; vWidth=720; dar1=45:34; aCodec=aac
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:audio_lang: eng
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:selected audio stream: 0.1
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:TRANSCODE=YES, container matroska not compatible, /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:TRANSCODE=YES, vCodec h264 not compatible, /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:tsn: 746****
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:aspect169: True
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:optres: False
7/31/11 5:17:53.008 PM pyTivo: DEBUG:pyTivo.video.transcode:File=/Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv vCodec=h264 vWidth=720 vHeight=544 vFps=24.48 millisecs=1342080 TIVO_HEIGHT=1080 TIVO_WIDTH=1920
7/31/11 5:17:53.010 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.011 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.011 PM pyTivo: DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv
7/31/11 5:17:53.012 PM pyTivo: DEBUG:pyTivo.video.transcode:audio_lang: eng
7/31/11 5:17:53.012 PM pyTivo: DEBUG:pyTivo.video.transcode:selected audio stream: 0.1
7/31/11 5:17:53.012 PM pyTivo: DEBUG:pyTivo.video.transcode:transcoding to tivo model 746 using ffmpeg command:
7/31/11 5:17:53.012 PM pyTivo: DEBUG:pyTivo.video.transcode:/opt/local/bin/ffmpeg -i /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv -vcodec copy -r 29.97 -b 8388k -maxrate 30000k -bufsize 4096k -ab 448k -ar 48000 -acodec ac3 -copyts -map 0.0 -map 0.1 -threads 2 -f mp4 /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv.pyTivo-temp
7/31/11 5:17:53.026 PM pyTivo: DEBUG:pyTivo.video.transcode:remuxing /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv to /Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv.pyTivo-temp
7/31/11 5:17:53.043 PM pyTivo: ffmpeg version N-31627-g9c2651a, Copyright (c) 2000-2011 the FFmpeg developers
7/31/11 5:17:53.043 PM pyTivo:   built on Jul 23 2011 17:50:33 with clang 2.1 (tags/Apple/clang-163.7.1)
7/31/11 5:17:53.043 PM pyTivo:   configuration: --prefix=/opt/local --enable-nonfree --enable-gpl --enable-postproc --enable-runtime-cpudetect --enable-hardcoded-tables --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libfaac --enable-libxvid --enable-libx264 --enable-libvpx --enable-libspeex --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-indevs --cc=/Developer/usr/bin/clang --arch=x86_64
7/31/11 5:17:53.044 PM pyTivo:   libavutil    51. 11. 0 / 51. 11. 0
7/31/11 5:17:53.044 PM pyTivo:   libavcodec   53.  9. 0 / 53.  9. 0
7/31/11 5:17:53.044 PM pyTivo:   libavformat  53.  6. 0 / 53.  6. 0
7/31/11 5:17:53.044 PM pyTivo:   libavdevice  53.  2. 0 / 53.  2. 0
7/31/11 5:17:53.044 PM pyTivo:   libavfilter   2. 27. 3 /  2. 27. 3
7/31/11 5:17:53.044 PM pyTivo:   libswscale    2.  0. 0 /  2.  0. 0
7/31/11 5:17:53.044 PM pyTivo:   libpostproc  51.  2. 0 / 51.  2. 0
7/31/11 5:17:53.054 PM pyTivo: [matroska,webm @ 0x7fe12384a000] Unknown entry 0x80
7/31/11 5:17:54.267 PM pyTivo: [matroska,webm @ 0x7fe12384a000] Estimating duration from bitrate, this may be inaccurate
7/31/11 5:17:54.267 PM pyTivo: Seems stream 0 codec frame rate differs from container frame rate: 48.96 (1575346/32175) -> 24.48 (1575346/64350)
7/31/11 5:17:54.267 PM pyTivo: Input #0, matroska,webm, from '/Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv':
7/31/11 5:17:54.267 PM pyTivo:   Duration: 00:22:22.08, start: 0.000000, bitrate: N/A
7/31/11 5:17:54.267 PM pyTivo:     Stream #0.0(eng): Video: h264 (High), yuv420p, 720x544, PAR 1:1 DAR 45:34, 24.48 fps, 24.48 tbr, 1k tbn, 48.96 tbc (default)
7/31/11 5:17:54.267 PM pyTivo:     Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16 (default)
7/31/11 5:17:54.279 PM pyTivo: Output #0, mp4, to '/Volumes/Videos/TV Shows/Animated/DCAU/Batman TAS/Season 1/V01E02 - Christmas With The Joker.mkv.pyTivo-temp':
7/31/11 5:17:54.279 PM pyTivo:   Metadata:
7/31/11 5:17:54.279 PM pyTivo:     encoder         : Lavf53.6.0
7/31/11 5:17:54.279 PM pyTivo:     Stream #0.0(eng): Video: libx264, yuv420p, 720x544 [PAR 1:1 DAR 45:34], q=2-31, 787673.00 tbn, 24.48 tbc (default)
7/31/11 5:17:54.279 PM pyTivo:     Stream #0.1(eng): Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s (default)
7/31/11 5:17:54.279 PM pyTivo: Stream mapping:
7/31/11 5:17:54.279 PM pyTivo:   Stream #0.0 -> #0.0
7/31/11 5:17:54.279 PM pyTivo:   Stream #0.1 -> #0.1
7/31/11 5:17:54.279 PM pyTivo: Press [q] to stop, [?] for help
7/31/11 5:17:54.782 PM pyTivo: frame=   68 fps=  0 q=-1.0 size=     669kB time=00:00:02.47 bitrate=2214.9kbits/s   
7/31/11 5:17:55.283 PM pyTivo: frame=  151 fps=150 q=-1.0 size=    1524kB time=00:00:05.47 bitrate=2278.2kbits/s   
7/31/11 5:17:55.786 PM pyTivo: frame=  217 fps=144 q=-1.0 size=    2407kB time=00:00:08.22 bitrate=2397.9kbits/s   
7/31/11 5:17:56.287 PM pyTivo: frame=  297 fps=148 q=-1.0 size=    3546kB time=00:00:11.55 bitrate=2512.9kbits/s   
7/31/11 5:17:56.786 PM pyTivo: frame=  375 fps=150 q=-1.0 size=    4551kB time=00:00:14.77 bitrate=2523.7kbits/s   
7/31/11 5:17:57.290 PM pyTivo: frame=  455 fps=151 q=-1.0 size=    5728kB time=00:00:17.98 bitrate=2609.4kbits/s   
.........
Back to top
View user's profile Send private message
lucasnz



Joined: 13 Sep 2010
Posts: 251

PostPosted: Sun Jul 31, 2011 10:42 pm    Post subject: Reply with quote

Iluvatar wrote:

Code:

7/31/11 5:17:52.991 PM pyTivo:     Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16 (default)
7/31/11 5:17:52.991 PM pyTivo: At least one output file must be specified
7/31/11 5:17:52.991 PM pyTivo: DEBUG:pyTivo.video.transcode:failed at aKbps
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:failed at kbps
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:aFreq=48000; aCh=2; container=matroska; kbps=None; mapAudio=[('0.1', '(eng) aac, 48000 Hz, stereo, s16 (default)')]; vHeight=544; vCodec=h264; Supported=True; aKbps=None; par=None; millisecs=1342080; vFps=24.48; par2=1.0; par1=1:1; mapVideo=0.0; vWidth=720; dar1=45:34; aCodec=aac


Not sure what to do about this. It seems to be because ffmpeg is unable to detect the Kpbs. Hence it is re-encoding the audio track. Note the "DEBUG:pyTivo.video.transcode:failed at aKbps" and the later on aKbps=None.

I suppose I could say if I don't have an aKbps but I'm remuxing is to mp4 then it's ok but this is part of the standard pyTivo audio algorithms and I'm loathed to change this without understanding the implications for other systems.

Can you update the mkv file to contain the correct info or perhaps try a different version of ffmpeg?

I'm guessing this is the same problem you are having with the other files you thought might be re-encoding the audio.
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Sun Jul 31, 2011 11:07 pm    Post subject: Reply with quote

lucasnz wrote:
Iluvatar wrote:

Code:

7/31/11 5:17:52.991 PM pyTivo:     Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16 (default)
7/31/11 5:17:52.991 PM pyTivo: At least one output file must be specified
7/31/11 5:17:52.991 PM pyTivo: DEBUG:pyTivo.video.transcode:failed at aKbps
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:failed at kbps
7/31/11 5:17:53.000 PM pyTivo: DEBUG:pyTivo.video.transcode:aFreq=48000; aCh=2; container=matroska; kbps=None; mapAudio=[('0.1', '(eng) aac, 48000 Hz, stereo, s16 (default)')]; vHeight=544; vCodec=h264; Supported=True; aKbps=None; par=None; millisecs=1342080; vFps=24.48; par2=1.0; par1=1:1; mapVideo=0.0; vWidth=720; dar1=45:34; aCodec=aac


Not sure what to do about this. It seems to be because ffmpeg is unable to detect the Kpbs. Hence it is re-encoding the audio track. Note the "DEBUG:pyTivo.video.transcode:failed at aKbps" and the later on aKbps=None.

I suppose I could say if I don't have an aKbps but I'm remuxing is to mp4 then it's ok but this is part of the standard pyTivo audio algorithms and I'm loathed to change this without understanding the implications for other systems.

Can you update the mkv file to contain the correct info or perhaps try a different version of ffmpeg?

I'm guessing this is the same problem you are having with the other files you thought might be re-encoding the audio.


You may be right. I will try an older build of FFmpeg to see if they've had a design change. I have over a hundred of similarly made files so editing these is not really an option based on time required.
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Mon Aug 01, 2011 3:04 pm    Post subject: Reply with quote

I have been working on some personal additions to the remux code that I am hoping someone can help me with. What I have done is added an option for a user set temp work folder to remux the video in. The default code is to keep the .pyTivo-temp file in the same folder as the original file however this is very slow when using a network share. The file has to be read from the network, processed, and written back over the network, only to be read again when pushed. With a temp folder set to the local drive it cuts out much of this and speeds up the remux 4x for myself.

I have completed all the necessary edits except for sending the proper URL to the tivo mind server. I am not really able to follow where this is getting created. Right now in transcode.py - mp4_remux I am returning newname to video.py as:

Code:

outFile = os.path.join(temp_path, file + '.pyTivo-temp')
newname = outFile


This is returned to video.py and sets f['name] = new_path and here:
Code:

url = f['url'] + quote(f['name'])


is where I have issues. It seems to add my full path to the original file share path which creates a file not found error.

I suppose I need to create a conditional test to set the proper URL but I am unsure which function to use that converts my path into a pushable URL.

Does anyone have recommendations? Once I have this complete I will post my edits up in case anyone else wishes to use them.
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Mon Aug 01, 2011 4:45 pm    Post subject: Reply with quote

Iluvatar wrote:

This is returned to video.py and sets f['name] = new_path and here:
Code:

url = f['url'] + quote(f['name'])


is where I have issues. It seems to add my full path to the original file share path which creates a file not found error.

I suppose I need to create a conditional test to set the proper URL but I am unsure which function to use that converts my path into a pushable URL.


It looks like push() function is where it is joining a base url with the share info:
Code:

baseurl = 'http://%s:%s/%s' % (ip, port, container)
        if config.getIsExternal(tsn):
            exturl = config.get_server('externalurl')
            if exturl:
                baseurl = exturl
            else:
                ip = self.readip()
                baseurl = 'http://%s:%s/%s' % (ip, port, container)
 
   path = self.get_local_base_path(handler, query)

        files = query.get('File', [])
        for f in files:
            file_path = path + os.path.normpath(f)
            queue.append({'path': file_path, 'name': f, 'tsn': tsn,
                          'url': baseurl})


I'm not certain how to interpret what it is doing though. It seems really entangled with a lot of things that I may break if I change.
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2008
Location: Maryland

PostPosted: Mon Aug 01, 2011 6:41 pm    Post subject: Reply with quote

I can do a temp directory patch, give me a day or so.
_________________
My pyTivo fork . My page
Back to top
View user's profile Send private message Visit poster's website
Iluvatar



Joined: 29 Feb 2008
Posts: 335

PostPosted: Mon Aug 01, 2011 7:06 pm    Post subject: Reply with quote

wmcbrine wrote:
I can do a temp directory patch, give me a day or so.


hmm alright. Well here is what I have done so far in case it is useful for you. Everything is done except integration into video.py and a function in transcode.py that may not work on windows (hadn't gotten around to changing it yet.) I haven't tested it with metadata yet either.

config.py
Code:

def get_temp(fname):
    logger = logging.getLogger('pyTivo.config')
    if config.has_option('Server', fname):
        tpath = config.get('Server', fname)
        tpath = os.path.normpath(tpath)

        if os.path.exists(tpath):
            return tpath
   
        logger.error('Bad %s path: %s' % (fname, tpath))
    return None


transcode.py - mp4_remux function
remove @line 691
Code:

outFile = inFile + '.pyTivo-temp'
newname = basename + '.pyTivo-temp'


and add

Code:

temp_path = config.get_temp('temp_path')

file = inFile.split('/')[-1]   # may not be mswindows compatible
   
if temp_path:
    outFile = os.path.join(temp_path, file + '.pyTivo-temp')
    newname = outFile
else:
    outFile = inFile + '.pyTivo-temp'
    newname = basename + '.pyTivo-temp'


help.txt in plugins -> settings

Code:

temp_path

Default Setting: None
Valid Entries: Any operating system path
Required: No
Skill: Basic
Description: Sets the base path to temporarily store your media content
that is being remuxed before being sent to your TiVo.  If content is located
on network share this will significantly speed up the remux.  If not set
or the path is not valid pyTivo will use the existing base path of your
media content for temporary storage.
Example Settings: Windows = C:\videos\temp | Linux = /home/user/media/temp
Available In: Server
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> pyTivo All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 4 of 7

 
Jump to:  
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
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO

Get pytivo at SourceForge.net. Fast, secure and Free Open Source software downloads
[ Time: 0.1671s ][ Queries: 12 (0.0112s) ][ GZIP on - Debug on ]