Transcoding to vcd target - cannot get the syntax correct.

450 views
Skip to first unread message

matt...@gmail.com

unread,
Jul 24, 2012, 10:41:08 AM7/24/12
to ffmbc-...@googlegroups.com
Apologies if this is a basic issue, but I cannot get quite a simple command line to run, and I assume I'm just getting something wrong in the syntax.

Source = IMX50 in a MOV wrapper.
Destination = vcd

Attempt 1

ffmbc -i "Q:\Input.mov" -target vcd -t 120 "E:\ffmbc_vcd.mpg"

Output

FFmbc version 0.7-rc7
Copyright (c) 2008-2012 Baptiste Coudurier and the FFmpeg developers
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Q:\Input.mov':
  Metadata:
    creation_time: 2012-07-23 10:30:31
    timecode: 00:58:52:09
  Duration: 00:24:00.00, start: 0.000000, bitrate: 53150 kb/s
    Stream #0.0(eng): Video: mpeg2video (4:2:2), yuv422p, 720x608i tff [PAR 152:
135 DAR 4:3], 50000 kb/s, 25.00 fps
    Metadata:
      codec_name: MPEG IMX 625/50 (50 Mb/s)
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Stream #0.2(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Stream #0.3(eng): Data: unknown (tmcd)
Incompatible pixel format 'yuv422p' for codec 'mpeg1video', auto-selecting forma
t 'yuv420p'
[scale @ 01BB4D80] w:720 h:608 fmt:yuv422p -> w:352 h:288 fmt:yuv420p flags:0x4
Error, target vcd only supports 352x288(pal) or 352x240(ntsc) resolutions

Understandable error, so I decide to add a crop to remove the VBI data, and then a scale to the desired size:

Attempt 2

ffmbc -i "Q:\Input.mov" -vf "crop=720:576:0:32,scale=352:288" -target vcd -t 120 "E:\ffmbc_vcd.mpg"

Output

FFmbc version 0.7-rc7
Copyright (c) 2008-2012 Baptiste Coudurier and the FFmpeg developers
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Q:\Input.mov':
  Metadata:
    creation_time: 2012-07-23 10:30:31
    timecode: 00:58:52:09
  Duration: 00:24:00.00, start: 0.000000, bitrate: 53150 kb/s
    Stream #0.0(eng): Video: mpeg2video (4:2:2), yuv422p, 720x608i tff [PAR 152:
135 DAR 4:3], 50000 kb/s, 25.00 fps
    Metadata:
      codec_name: MPEG IMX 625/50 (50 Mb/s)
    Stream #0.1(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Stream #0.2(eng): Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s
    Stream #0.3(eng): Data: unknown (tmcd)
Incompatible pixel format 'yuv422p' for codec 'mpeg1video', auto-selecting forma
t 'yuv420p'
[scale @ 01BB4E80] w:720 h:608 fmt:yuv422p -> w:352 h:288 fmt:yuv420p flags:0x4
[crop @ 01BB5320] w:352 h:288 -> w:720 h:576
[crop @ 01BB5320] Invalid too big or non positive size for width '720' or height
 '576'
Error opening filters!

So, it seems to be scaling then cropping. I get the same results when I do this without the filter crop:

ffmbc -i "Q:\Input.mov" -vf "crop=720:576:0:32" -target vcd -t 120 "E:\ffmbc_vcd_2.mpg"

Interestingly, when I run the above command line with a different target:

ffmbc -i "Q:\Input.mov" -vf "crop=720:576:0:32" -target dvd -t 120 "E:\ffmbc_dvd.mpg"

It doesn't complain, but also doesn't crop the vbi lines.

Somebody please point me in the right direction!!

Many Thanks

matt...@gmail.com

unread,
Jul 25, 2012, 6:32:16 AM7/25/12
to ffmbc-...@googlegroups.com, matt...@gmail.com
This is driving me a little mad!!

I can get everything working with this:

ffmbc -i "Q:\Input.mov" -vf "crop=720:576:0:32,yadif=0:0:0,scale=352:288" -sameq -t 120 "E:\ffmbc_mpg_crop_yadif_scale.mpg"

But as soon as I replace -sameq with -target vcd I get the same errors:


Incompatible pixel format 'yuv422p' for codec 'mpeg1video', auto-selecting format 'yuv420p'
[yadif @ 01BB5B80] mode:0 parity:0 auto_enable:0
[scale @ 01BB5460] w:720 h:608 fmt:yuv422p -> w:352 h:288 fmt:yuv420p flags:0x4
[crop @ 01BB5840] w:352 h:288 -> w:720 h:576
[crop @ 01BB5840] Invalid too big or non positive size for width '720' or height
 '576'
Error opening filters!

It seems that -target takes precedence over any other information in the command line, which is strange because the following line worked without issues:

ffmbc -i "Q:\Input.mov" -target xdcamhd422 -vtag xd5b -tff -threads 16 -vf scale=1920:1080:interl=-1 "Q:\Output.mov"

matt...@gmail.com

unread,
Jul 25, 2012, 6:58:06 AM7/25/12
to ffmbc-...@googlegroups.com, matt...@gmail.com
Apologies for the multiple posts, I keep trying alternative methods and finding new bits of information.

So I thought I should try and run the command line with ffmpeg:

ffmpeg -i "Q:\Input.mov" -vf "crop=720:576:0:32,yadif=0:0:0,scale=352:288" -target vcd -t 120 "E:\Output.mpg"

This produced a different error:

Could not determine norm (PAL/NTSC/NTSC-Film) for target.
Please prefix target with "pal-", "ntsc-" or "film-",
or set a framerate with "-r xxx".

Changing the command line to -target pal-vcd seemed to fix the problem in ffmpeg, but introduces a different error to ffmbc:

ffmbc: failed to set value 'pal-vcd' for option 'target'

So I guess there is a change of syntax across the two systems.

Baptiste Coudurier

unread,
Jul 25, 2012, 3:44:27 PM7/25/12
to ffmbc-...@googlegroups.com
Hi,

On 07/25/2012 03:58 AM, matt...@gmail.com wrote:
> Apologies for the multiple posts, I keep trying alternative methods and finding new bits of information.
>
> So I thought I should try and run the command line with ffmpeg:
>
> ffmpeg -i "Q:\Input.mov" -vf "crop=720:576:0:32,yadif=0:0:0,scale=352:288" -target vcd -t 120
> "E:\Output.mpg"

Yes, there is a problem validating the vcd target, there is an issue filled for it,
and it will be fixed in the next rc.

--
Baptiste COUDURIER
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
Reply all
Reply to author
Forward
0 new messages