![]() |
|
|
|||
|
Need help with Video/DVD script
Well after trying a zillion GUI video apps none of which are ready for
prime time I decided to get a shell script working first. Since I'm not very good at this I have to patch up someone else's work. Here is the script I'm trying to get to go... http://rsgibson.com/Mp42DVD.htm I've fixed two errors where they make a call to an option of ffmpeg that is now obsolete. After followups to another thread I've come to the conclusion why this is such a PITA now is the result of problems with a server crash that apparently resulted in code modification for ffmpeg, breaking these older scripts and GUI front ends. Where I'm puzzled is where it seems to fail and spout error codes... (This is close to the end of the script located on the web page cited above) ## WRITE LAVC CONFIG ## cat > ffmpeg.cfg <<_EOF [mpeg2video] mbd = 2 trell = 1 cmp = 2 subcmp = 2 vqcomp = 0.7 vqblur = 0.3 _EOF Now I'm not sure but I think mpeg2video is supposed to be an ffmpeg switch (also investigated mplayer). However in the versions I have --help and man pages do not have anything to say about this. As a result I can't figure how to change the script. I have a small test avi I'm trying to convert into a dvd-video structure (audio_ts and video_ts). Later of course, when this is fixed it will get a real test, albeit mine is proper, just small and is a video capture. All codecs are present and accounted for. When I first crank it up in the directory of the source file (test.avi) these structures appear... audiodump.wav ffmpeg.cfg ffmpeg.log test test.avi - test.avi is the source and apparently "test" at this beginning phase is the target. I'm puzzled as to why (or why not) "test" has no file extension. After a while in the next phase (PCM -> AC3) these structures are present... audiodump.wav ffmpeg.cfg ffmpeg.log test test.ac3 test.avi Looks good now as it's making an ac3 audio file.... Then I get this section that shows it's starting to grumble... transcode-video.XysKeB -vf eq2=0.8:1:0.04:1.1 "test.avi" -osdlevel 0 > /dev/null 2>&1 [import_mplayer.so] tcextract -i /tmp/mplayer2transcode-video.XysKeB -x yuv420p -t yuv4mpeg [export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video). [export_ffmpeg.so] Selected dvd profile, ntsc video type for video [export_ffmpeg.so] Set interlacing to bottom-first [export_ffmpeg.so] Set frame rate to unknown [export_ffmpeg.so] warning: X resolution is not 720, 704 or 352 as required [export_ffmpeg.so] warning: Y resolution is not 576, 480, 288 or 240 as required [export_ffmpeg.so] Set GOP size to 18 [export_ffmpeg.so] Starting 1 thread(s) [export_ffmpeg.so] Display aspect ratio calculated as 1.777778 [export_ffmpeg.so] Sample aspect ratio calculated as 1.160998 [mpeg2video @ 0xa49438b0]rc buffer underflow <-------***ERROR HERE*** encoding frames [0-3500], 10.06 fps, CFT: 0:02:25, ( 0| 0|20) [transcode] encoded 3625 frames (0 dropped, 0 cloned), clip length 151.19 s transcode v1.1.0-beta0 (C) 2001-2003 Thomas Oestreich, 2003-2008 Transcode Team [transcode] V: AV demux/sync | (1) sync AV at initial MPEG sequence [transcode] V: import frame | 720x480 1.50:1 encoded @ 16:9 [transcode] V: clip frame (<-) | 784x512 [transcode] V: bits/pixel | 0.000 (unknown) [transcode] V: decoding fps,frc | 0.000,0 [transcode] V: multi-pass | (mode=2) reading data (pass2) from ffmpeg.log [transcode] V: video format | YUV420 (4:2:0) aka I420 [transcode] A: import format | 0x2000 AC3 [48000,16,2] [transcode] A: export format | 0x55 MPEG ES Layer 3 [48000,16,2] 192 kbps [transcode] V: export format | unknown (module dependant) [transcode] V: encoding fps,frc | 23.976,1 [transcode] A: bytes per frame | 8008 (8008.000000) [transcode] A: adjustment | 0@1000 [transcode] V: IA32/AMD64 accel | sse3 sse2 sse mmx cmove asm [transcode] V: video buffer | 10 @ 784x512 [0x2] [transcode] A: audio buffer | 10 @ 48000x2x16 [import_raw.so] v0.3.2 (2002-11-10) (video) RGB/YUV | (audio) PCM [import_mplayer.so] v0.1.2 (2007-11-01) (video) rendered by mplayer | (audio) rendered by mplayer [filter_hqdn3d.so] v1.0.2 (2003-08-15) High Quality 3D Denoiser #1 [filter_hqdn3d.so] Settings luma=8.00 chroma=8.00 luma_strength=7.00 chroma_strength=8.00 [export_ffmpeg.so] v0.3.17 (2007-11-02) (video) Lavc51.44.0 | (audio) MPEG/AC3/PCM [import_raw.so] tcextract -x pcm -i "audiodump.wav" -d 0 | tcextract -a 0 -x pcm -d 0 -t raw [import_mplayer.so] mplayer -slave -benchmark -noframedrop -nosound -vo yuv4mpeg:file=/tmp/mplayer2transcode-video.nPsP8I -vf eq2=0.8:1:0.04:1.1 "test.avi" -osdlevel 0 > /dev/null 2>&1 [import_mplayer.so] tcextract -i /tmp/mplayer2transcode-video.nPsP8I -x yuv420p -t yuv4mpeg [export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 compliant video). [export_ffmpeg.so] Selected dvd profile, ntsc video type for video [export_ffmpeg.so] Set interlacing to bottom-first [export_ffmpeg.so] Set frame rate to unknown [export_ffmpeg.so] warning: X resolution is not 720, 704 or 352 as required [export_ffmpeg.so] warning: Y resolution is not 576, 480, 288 or 240 as required [export_ffmpeg.so] Set GOP size to 18 [export_ffmpeg.so] Starting 1 thread(s) [export_ffmpeg.so] Display aspect ratio calculated as 1.777778 [export_ffmpeg.so] Sample aspect ratio calculated as 1.160998 [export_ffmpeg.so] warning: Usage of this module for audio encoding is deprecated. [export_ffmpeg.so] warning: Consider switch to export_tcaud module. [export_ffmpeg.so] Selected dvd profile for audio [export_ffmpeg.so] Resampling filter inactive [export_ffmpeg.so] Set number of audio channels to 2 [export_ffmpeg.so] Set number of audio bits to 16 [export_ffmpeg.so] No audio resampling necessary, using 48000 Hz [export_ffmpeg.so] Set audio codec to ac3 [transcode] PCM -> AC3 [extract_pcm.c] critical: error while writing data: Success|20) And then the files are cleaned up leaving... test <----- The product of the failed conversion test.avi Test is a video file (mpgv codec) with no sound. If you can help me on this I'd sure appreciate it. I've been trying to get this going for 3 months :-( TIA -- Email - rsgibson@verizon.borg Replace borg with net "Ubuntu" - an African word, meaning "Slackware is too hard for me". |
|
|||
|
Re: Need help with Video/DVD script
On Sat, 12 Jul 2008 12:58:01 -0400, Ron Gibson wrote:
> Well after trying a zillion GUI video apps none of which are ready for > prime time I decided to get a shell script working first. > > Since I'm not very good at this I have to patch up someone else's work. > > Here is the script I'm trying to get to go... > > http://rsgibson.com/Mp42DVD.htm > > I've fixed two errors where they make a call to an option of ffmpeg that > is now obsolete. After followups to another thread I've come to the > conclusion why this is such a PITA now is the result of problems with a > server crash that apparently resulted in code modification for ffmpeg, > breaking these older scripts and GUI front ends. > > Where I'm puzzled is where it seems to fail and spout error codes... > (This is close to the end of the script located on the web page cited > above) > > ## WRITE LAVC CONFIG ## > cat > ffmpeg.cfg <<_EOF > [mpeg2video] > mbd = 2 > trell = 1 > cmp = 2 > subcmp = 2 > vqcomp = 0.7 > vqblur = 0.3 > _EOF > > Now I'm not sure but I think mpeg2video is supposed to be an ffmpeg > switch (also investigated mplayer). However in the versions I have > --help and man pages do not have anything to say about this. As a result > I can't figure how to change the script. > > I have a small test avi I'm trying to convert into a dvd-video structure > (audio_ts and video_ts). Later of course, when this is fixed it will get > a real test, albeit mine is proper, just small and is a video capture. > All codecs are present and accounted for. > > When I first crank it up in the directory of the source file (test.avi) > these structures appear... > > audiodump.wav > ffmpeg.cfg > ffmpeg.log > test > test.avi > > - test.avi is the source and apparently "test" at this beginning phase > is the target. I'm puzzled as to why (or why not) "test" has no file > extension. > > After a while in the next phase (PCM -> AC3) these structures are > present... > > audiodump.wav > ffmpeg.cfg > ffmpeg.log > test > test.ac3 > test.avi > > Looks good now as it's making an ac3 audio file.... > > Then I get this section that shows it's starting to grumble... > > transcode-video.XysKeB -vf eq2=0.8:1:0.04:1.1 "test.avi" -osdlevel 0 > > /dev/null 2>&1 > [import_mplayer.so] tcextract -i /tmp/mplayer2transcode-video.XysKeB -x > yuv420p -t yuv4mpeg > [export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 > compliant video). > [export_ffmpeg.so] Selected dvd profile, ntsc video type for video > [export_ffmpeg.so] Set interlacing to bottom-first [export_ffmpeg.so] > Set frame rate to unknown [export_ffmpeg.so] warning: X resolution is > not 720, 704 or 352 as required > [export_ffmpeg.so] warning: Y resolution is not 576, 480, 288 or 240 as > required > [export_ffmpeg.so] Set GOP size to 18 [export_ffmpeg.so] Starting 1 > thread(s) [export_ffmpeg.so] Display aspect ratio calculated as 1.777778 > [export_ffmpeg.so] Sample aspect ratio calculated as 1.160998 > [mpeg2video @ 0xa49438b0]rc buffer underflow <-------***ERROR HERE*** > encoding frames [0-3500], 10.06 fps, CFT: 0:02:25, ( 0| 0|20) > [transcode] encoded 3625 frames (0 dropped, 0 cloned), clip length > 151.19 s > transcode v1.1.0-beta0 (C) 2001-2003 Thomas Oestreich, 2003-2008 > Transcode Team > [transcode] V: AV demux/sync | (1) sync AV at initial MPEG sequence > [transcode] V: import frame | 720x480 1.50:1 encoded @ 16:9 > [transcode] V: clip frame (<-) | 784x512 [transcode] V: bits/pixel > | 0.000 (unknown) [transcode] V: decoding fps,frc | 0.000,0 [transcode] > V: multi-pass | (mode=2) reading data (pass2) from ffmpeg.log > [transcode] V: video format | YUV420 (4:2:0) aka I420 [transcode] A: > import format | 0x2000 AC3 [48000,16,2] [transcode] A: > export format | 0x55 MPEG ES Layer 3 [48000,16,2] 192 kbps > [transcode] V: export format | unknown (module dependant) [transcode] > V: encoding fps,frc | 23.976,1 [transcode] A: bytes per frame | 8008 > (8008.000000) [transcode] A: adjustment | 0@1000 [transcode] V: > IA32/AMD64 accel | sse3 sse2 sse mmx cmove asm [transcode] V: video > buffer | 10 @ 784x512 [0x2] [transcode] A: audio buffer | 10 @ > 48000x2x16 [import_raw.so] v0.3.2 (2002-11-10) (video) RGB/YUV | (audio) > PCM [import_mplayer.so] v0.1.2 (2007-11-01) (video) rendered by mplayer > | (audio) rendered by mplayer > [filter_hqdn3d.so] v1.0.2 (2003-08-15) High Quality 3D Denoiser #1 > [filter_hqdn3d.so] Settings luma=8.00 chroma=8.00 luma_strength=7.00 > chroma_strength=8.00 > [export_ffmpeg.so] v0.3.17 (2007-11-02) (video) Lavc51.44.0 | (audio) > MPEG/AC3/PCM > [import_raw.so] tcextract -x pcm -i "audiodump.wav" -d 0 | tcextract -a > 0 -x pcm -d 0 -t raw > [import_mplayer.so] mplayer -slave -benchmark -noframedrop -nosound -vo > yuv4mpeg:file=/tmp/mplayer2transcode-video.nPsP8I -vf eq2=0.8:1:0.04:1.1 > "test.avi" -osdlevel 0 > /dev/null 2>&1 [import_mplayer.so] tcextract -i > /tmp/mplayer2transcode-video.nPsP8I -x yuv420p -t yuv4mpeg > [export_ffmpeg.so] Using FFMPEG codec 'mpeg2video' (FourCC 'mpg2', MPEG2 > compliant video). > [export_ffmpeg.so] Selected dvd profile, ntsc video type for video > [export_ffmpeg.so] Set interlacing to bottom-first [export_ffmpeg.so] > Set frame rate to unknown [export_ffmpeg.so] warning: X resolution is > not 720, 704 or 352 as required > [export_ffmpeg.so] warning: Y resolution is not 576, 480, 288 or 240 as > required > [export_ffmpeg.so] Set GOP size to 18 [export_ffmpeg.so] Starting 1 > thread(s) [export_ffmpeg.so] Display aspect ratio calculated as 1.777778 > [export_ffmpeg.so] Sample aspect ratio calculated as 1.160998 > [export_ffmpeg.so] warning: Usage of this module for audio encoding is > deprecated. > [export_ffmpeg.so] warning: Consider switch to export_tcaud module. > [export_ffmpeg.so] Selected dvd profile for audio [export_ffmpeg.so] > Resampling filter inactive [export_ffmpeg.so] Set number of audio > channels to 2 [export_ffmpeg.so] Set number of audio bits to 16 > [export_ffmpeg.so] No audio resampling necessary, using 48000 Hz > [export_ffmpeg.so] Set audio codec to ac3 [transcode] PCM -> AC3 > [extract_pcm.c] critical: error while writing data: Success|20) > > And then the files are cleaned up leaving... > > test <----- The product of the failed conversion test.avi > > Test is a video file (mpgv codec) with no sound. > > If you can help me on this I'd sure appreciate it. I've been trying to > get this going for 3 months :-( > > TIA Hi Ron, Your post is a bit off-topic for Slackware, but anyway... 1/ I too get buffer underflow errors when using ffmpeg. Usually I don't worry about them! I'm on Slackware 12.0. And ffmpeg options are always changing! 2/ I tried your script on an .avi file with sound. I am using transcode 1.0.6rc2, so I removed the two --progress... options as thay aren't supported with this version. I got buffer underflow from ffmpeg. The script ran all the way through and produced an .mpg file. There were some error messages, and the resulting mpg sound is at the wrong speed. I also tried on an .avi file without sound. This fails with: transcode] critical: invalid filename "audiodump.wav" INFO: [mplex] mplex version 1.9.0 (2.2.7 $Date: 2006/02/01 22:23:01 $) **ERROR: [mplex] Unable to open file mars.ac3 for reading. 3/ There is what I guess to be a newer version of your script (version 8)at: http://tinyurl.com/6lbuwe I ran this without having to make an edits. But I got the same problems as when using your script. Make sure that youi have the latest versions if you can. 4/ I gave up using transcode a long time ago. I tend to use mplayer/mencoder or ffmpeg. Good luck, Peter |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|