Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
transcode --export_prof dvd-ntsc emits 720x576 frames?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
danorris
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2004
Posts: 108

PostPosted: Fri May 06, 2005 1:28 am    Post subject: transcode --export_prof dvd-ntsc emits 720x576 frames? Reply with quote

I'm trying to transcode an XviD source file into an NTSC DVD-compatible MPEG stream. But for some reason, transcode is emitting frames at 720x576 even though I'm using "-y ffmpeg --export_prof dvd-ntsc". This seems to be dependent on the import frame size. Most of my source video is TV material at 576x432, and on those files, --export_prof dvd-ntsc does emit the correct NTSC DVD frame size of 720x480. However, the file I'm working on now came from an anamorphic PAL DVD and has an import frame size of 512x288. Is it possible that somehow transcode is detecting that the import file came from a PAL source and incorrectly deciding I want to produce PAL-compliant output?

What's weirder is that even if I pass in "-Z 720x480", it still produces 720x576 frames. In fact I can't make any of the resize options work.

Here's my best attempt at a transcode commandline. I'm doing some unusual things that require some explanation. As I said, the source was a PAL DVD. But the material on the DVD (an American TV show) was originally shot at 23.976 fps, so the frame rate had to be brought up to 25. Apparently, they did this simply by speeding up the video from the 23.976 fps source material. The result is that it runs about 4% faster than it should, and the audio is noticeably higher in pitch. I haven't a clue why they didn't bother to resample it. But in any case, to fix this, I'm forcing transcode to treat the input as 23.976 fps instead of what it really is (25 fps). Prior to running transcode, I have extracted the audio track and used sox to slow the audio down 4% so that it synchronizes with the video when the fps is forced down. I'm using the -p option to tell transcode to read the audio from my modified PCM file instead of from the (incorrectly high-pitched) track in the AVI. I'm then using -J modfps to bring the whole smash back up to 29.97 fps.

Here's the commandline:

Code:
transcode -i source.avi          # see tcprobe output below
          -f 23.976,1            # slow down the video to its correct speed
          -p out-slow.wav        # use external audio, slowed down 4% with sox
          -y ffmpeg              # use ffmpeg export module
          --export_prof dvd-ntsc # NTSC DVD profile (why doesn't this work?)
          --export_fps 29.970,4  # specify target fps for -J modfps
          --export_asr 2         # display aspect ratio should be 16:9
          -J modfps=clonetype=3  # bring fps up to 29.97, interpolating frames
          -Z 720x480             # this seems to have no effect?!?
          -m out.ac3 -o out


Here's what tcprobe thinks about the input file (note that I previously used avisplit to extract the first 60 seconds of the source video so that I could play around with it more easily):

Code:
% tcprobe -i source.avi
[tcprobe] RIFF data, AVI video
[avilib] V: 25.000 fps, codec=XVID, frames=1792, width=512, height=288
[avilib] A: 48000 Hz, format=0x55, bits=0, channels=2, bitrate=131 kbps,
[avilib]    2987 chunks, 1130832 bytes, VBR
[tcprobe] summary for sample.avi, (*) = not default, 0 = not detected
import frame size: -g 512x288 [720x576] (*)
       frame rate: -f 25.000 [25.000] frc=3
      audio track: -a 0 [0] -e 48000,0,2 [48000,16,2] -n 0x55 [0x2000] (*)
                   bitrate=131 kbps
           length: 1792 frames, frame_time=40 msec, duration=0:01:11.680


And here's what it thinks about the output (notice the incorrect frame size):

Code:
% tcprobe -i out.m2v
[tcprobe] MPEG elementary stream (ES)
[tcprobe] summary for tout.m2v, (*) = not default, 0 = not detected
import frame size: -g 720x576 [720x576]
     aspect ratio: 4:3 (*)
       frame rate: -f 29.970 [25.000] frc=4 (*)
   no audio track: use "null" import module for audio


Thanks for reading all of this. I will greatly, greatly appreciate any help you can offer. Thanks in advance!
Back to top
View user's profile Send private message
danorris
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2004
Posts: 108

PostPosted: Fri May 06, 2005 4:17 am    Post subject: Reply with quote

I can make it work manually (without --export_prof) with this commandline:

Code:
transcode -i source.avi -f 23.976,1 -p out-slow.wav   \
          -y ffmpeg -F mpeg2video -w 2000             \
          --encode_fields t                           \
          -J modfps=clonetype=3 --export_fps 29.970,4 \
          -Y 0,-8,0,-8 -Z 704x480,fast                \
          --export_asr 3 --export_par 5               \
          -N 0x2000 -E 48000,16,2                     \
          -m out.ac3 -o out


So I guess it must be something wrong with the probing that --export_prof does to figure out the correct clipping / resizing values? Anyway, it's working now, but still, if anyone knows why the export profile isn't working for me, I'd appreciate a note. Thanks again.

P.S., I just learned from a friend that the 23.976 fps => 25 fps speedup is actually the standard way of converting NTSC material to PAL, even though it causes pitch shifting with the audio. He says it's cheaper to do it that way and a lot simpler for the studios, and retains the original image quality. Seems odd to me, but, oh well.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
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