I've been trying to get a profile set up that automates converting my Windows 7 HD WTV-based shows converted to an iPod friendly format with commercials cut out. I've followed some of the blog and forum posts (including on this site), but all of them seemed to have one problem or another so I've taken the pieces that I could to make one that works for me.
I've gotten 90% of the way there, but I'm not sure how to make the final conversion work - hopefully someone can help.
First, here's my profile:
Throttle DVRMStoMPEG
Get the value of Context["InputFile"] and set the value of Context ["OutputFile"]
Run C:\Windows\ehome\wtvconverter.exe "%InputFile%" "%OutputFile%"
Find Commercials in file
Get the value of Context["OutputFile"] and set the value of Context["InputFile"]
Cut commercials out of DVR-MS file
Convert file with Ffmpeg
It looks like nearly everything works correctly. I realize I probably have some incorrect context settings in there, but when I get to the last step I do have a .dvr-ms version of the program that has no commercials; I can play it in WMP perfectly fine and it looks great. But I am just unable to convert it to an MP4 to make it iPod friendly.
First I was using the version of ffmpeg.exe that came with the latest DTb, but it refused to start because it couldn't understand the audio portion of the source. Thinking that a later version might fix it, I went online and got the latest version of ffmpeg for Win32 that I could find. Now it starts the conversion, but ONLY does the audio - even though it understands the video portions of the source and destination, it doesn't convert any video. I've tried using the different Convert profile actions, but they didn't produce usable videos at all - only ffmpeg has even come close to working. Playing with the command-line parameters that ffmpeg uses also hasn't gotten me anywhere.
Does anyone have any idea what I might be doing wrong? I've tried everything I can think of and I'm out of ideas.
Below is the log of a sample run I did. Some of the times are short because it was a subsequent run so things like wtvconverter didn't need to do anything.
Ivan
InputFile=C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.wtv
Processing actions, this may take some time!!
Current Affinity: 3 System Mask: 3
Run Profile = Export3
ProcessId = 2184
DvrmsToolbox Version: 1.2.1.9
Throttle DVRMStoMPEG
FWThrottle: C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.wtv
WaitTime: 2 PollTime
Waiting to process file
Queue file
Duration = 00:00:01.0078125
Waiting for available worker: 11/12/2009 12:20 AM
Worker allocated: 11/12/2009 12:20 AM
Get the value of Context["InputFile"] and set the value of Context["OutputFile"]
Context["InputFile"] = C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.wtv
Context["OutputFile"] = C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms
Duration = 00:00:00.0458985
Run C:\Windows\ehome\wtvconverter.exe "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.wtv" "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms"
Run C:\Windows\ehome\wtvconverter.exe "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.wtv" "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms"
Duration = 00:00:05.0605469
Find Commercials in file
Duration = 00:00:00.0097656
Get the value of Context["OutputFile"] and set the value of Context["InputFile"]
Context["OutputFile"] = C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms
Context["InputFile"] = C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms
Duration = 00:00:00.0029297
Cut commercials out of DVR-MS file
Duration = 3477.591
Span created - 0, 790.3896
Span created - 891.393508, 1338.48715
Span created - 1489.340858, 1821.105625
Skip Span - 2925.258675, 3162.375883
Span created - 2032.363667, 3477.591
OutputFile=C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_0035daef4e-9b5b-4cb9-9668-ece5f50d6f9f.dvr-ms
Begin splice
.03%
.17%
.43%
.7%
<snip>
99.79%
99.95%
100%
End Splice
Duration = 00:05:45.2900285
Convert file with Ffmpeg
Calling: C:\Program Files (x86)\DVRMSToolbox\Applications\ConvertFfmpeg\Ffmpeg.exe -benchmark -y -i "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms" -s 720x400 -async 1 -deinterlace -vcodec libx264 -b 1200k -maxrate 1450k -bufsize 384 -coder 0 -level 13 -acodec libfaac -ar 48000 -ab 128000 -threads 8 "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.mp4"
Run C:\Program Files (x86)\DVRMSToolbox\Applications\ConvertFfmpeg\Ffmpeg.exe -benchmark -y -i "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms" -s 720x400 -async 1 -deinterlace -vcodec libx264 -b 1200k -maxrate 1450k -bufsize 384 -coder 0 -level 13 -acodec libfaac -ar 48000 -ab 128000 -threads 8 "C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.mp4"
FFmpeg version SVN-r18639, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --enable-memalign-hack --enable-postproc --enable-gpl --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libx264 --enable-libxvid --disable-ffserver --enable-avisynth --enable-pthreads
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.27. 0 / 52.27. 0
libavformat 52.32. 0 / 52.32. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 21 2009 13:44:38, gcc: 4.2.4 (TDM-1 for MinGW)
Input #0, asf, from 'C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.dvr-ms':
Duration: 00:50:14.69, start: 0.000000, bitrate: 17360 kb/s
Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
Stream #0.1: Invalid Codec type -1
Stream #0.2: Video: mpeg2video, yuv420p, 1920x1080 [PAR 64:45 DAR 1024:405], 38810 kb/s, 59.94 tbr, 1k tbn, 59.94 tbc
[libx264 @ 0x2c3ebf0]using SAR=243/173
[libx264 @ 0x2c3ebf0]frame MB size (45x25) > level limit (396)
[libx264 @ 0x2c3ebf0]VBV bitrate (1450) > level limit (768)
[libx264 @ 0x2c3ebf0]MB rate (67432) > level limit (11880)
[libx264 @ 0x2c3ebf0]using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[libx264 @ 0x2c3ebf0]VBV maxrate specified, but no bufsize.
[libx264 @ 0x2c3ebf0]profile Baseline, level 1.3
Output #0, mp4, to 'C:\Users\Public\Recorded TV\CBC News- The National_CBUTDT_2009_11_11_22_00_00.mp4':
Stream #0.0: Video: libx264, yuv420p, 720x400 [PAR 243:173 DAR 2187:865], q=2-31, 1200 kb/s, 60k tbn, 59.94 tbc
Stream #0.1: Audio: libfaac, 48000 Hz, 5.1, s16, 128 kb/s
Stream mapping:
Stream #0.2 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
[ac3 @ 0x2c02cf0]frame sync error
Error while decoding stream #0.0
frame= 0 fps= 0 q=0.0 size= 0kB time=3.20 bitrate= 0.1kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=6.63 bitrate= 0.1kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=10.05 bitrate= 0.0kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=14.44 bitrate= 0.0kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=18.60 bitrate= 0.0kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=22.98 bitrate= 0.0kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=27.18 bitrate= 0.0kbits/s
<snip>
frame= 0 fps= 0 q=0.0 size= 0kB time=3012.27 bitrate= 0.0kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=3013.06 bitrate= 0.0kbits/s
frame= 0 fps= 0 q=0.0 size= 0kB time=3013.89 bitrate= 0.0kbits/s
[ac3 @ 0x2c02cf0]incomplete frame
[ac3 @ 0x2c02cf0]invalid frame size
frame= 0 fps= 0 q=-1.0 Lsize= 42514kB time=3014.06 bitrate= 115.5kbits/s
video:0kB audio:41409kB global headers:0kB muxing overhead 2.665936%
[libx264 @ 0x2c3ebf0]final ratefactor: 25.84
Duration = 00:24:26.5155701
Total Duration = 00:30:19.2074542