[FFmpeg-user] Quicktime IMX encode failing on v2.1

Steve Kelly steve at aatw.com
Thu Nov 21 21:04:35 CET 2013


Thanks for that, had a look another look at the options list and by adjusting, I've go the video to encode by using:

/usr/local/bin/ffmpeg -i "Input.mpg" -vf "scale=720:576:1,pad=720:608:0:32" -vcodec mpeg2video -r 25 -pix_fmt yuv422p -minrate 50000k -maxrate 50000k -b:v 50000k -intra -flags +ildct+low_delay -dc 10 -intra_vlc 0 -non_linear_quant 0 -qmin 1 -qmax 3 -top 1 -bufsize 2000000 -rc_init_occupancy 2000000 -an -y "Output.m2v"

ie -flags2 was removed. I'm not sure if this is correct, but either way it works.

The audio is then generated with:

/usr/local/bin/ffmpeg -i  "Input.mpg" -vn -ar 48000 -acodec pcm_s16le -y "Output.wav"

However the mux stage generates a file which is no longer a valid IMX file. The MUX command is: 

/usr/local/bin/ffmpeg -i "Output.m2v" -i "Output.wav" -c:v copy -c:a copy -vtag mx5p -vbsf imxdump -y "Output_IMX.mov"

Although this command generates an output that can be played, this used to generate a valid IMX D10 Quicktime file and it no longer does. The video codec shows as mpeg2video not mx5p

General
Complete name                            : Output_IMX.mov
Format                                   : MPEG-4
Format profile                           : QuickTime
Codec ID                                 : qt  
File size                                : 1.96 GiB
Duration                                 : 5mn 26s
Overall bit rate mode                    : Constant
Overall bit rate                         : 51.5 Mbps
Writing application                      : Lavf55.19.104

Video
ID                                       : 1
Format                                   : m2v1
Codec ID                                 : m2v1
Duration                                 : 5mn 26s
Bit rate mode                            : Constant
Bit rate                                 : 50.0 Mbps
Width                                    : 720 pixels
Height                                   : 608 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Scan type                                : Interlaced
Scan order                               : Top Field First
Bits/(Pixel*Frame)                       : 4.569
Stream size                              : 1.90 GiB (97%)
Language                                 : English


Compared to previously:

General
Complete name                            : FFMPEG_07_IMX.mov
Format                                   : MPEG-4
Format_Commercial_IfAny                  : IMX 50
Format profile                           : QuickTime
Codec ID                                 : qt  
File size                                : 1.39 GiB
Duration                                 : 3mn 51s
Overall bit rate mode                    : Constant
Overall bit rate                         : 51.5 Mbps
Writing application                      : Lavf52.111.0

Video
ID                                       : 1
Format                                   : MPEG Video
Format_Commercial_IfAny                  : IMX 50
Format version                           : Version 2
Format profile                           : 4:2:2 at Main
Format settings, BVOP                    : No
Format settings, Matrix                  : Default
Format settings, GOP                     : N=1
Muxing mode                              : MXF
Codec ID                                 : mx5p
Duration                                 : 3mn 51s
Bit rate mode                            : Constant
Bit rate                                 : 50.0 Mbps
Width                                    : 720 pixels
Height                                   : 576 pixels
Original height                          : 608 pixels
Display aspect ratio                     : 1.184
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:2:2
Bit depth                                : 8 bits
Scan type                                : Interlaced
Scan order                               : Top Field First
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 4.823
Stream size                              : 1.35 GiB (97%)
Language                                 : English


Am I missing something fundamental, i.e. has the new version overhauled the way IMX files are encoded? I see mxf_d10 in the format list, but nothing for Quicktime IMX.




On 21 Nov 2013, at 16:44, Tim Nicholson <nichot20 at yahoo.com> wrote:

> On 20/11/13 20:40, Steve Kelly wrote:
>> We're migrating from 0.7 to 2.1 (2.1 built from fully updated ports tree on FreeBSD 9.1) and experiencing some issues converting to Quicktime PAL IMX 50Mb/s.
>> 
>> [...]
>> 
>> I found one suggestion that "flags 2 +ivlc+non_linear_q" should become "-flags2 -intra_vlc -non_linear_quant", so the command is now:
>> 
>> /usr/local/bin/ffmpeg -i "Input.mpg" -vf "scale=720:576:1,pad=720:608:0:32" -vcodec mpeg2video -r 25 -pix_fmt yuv422p -minrate 50000k -maxrate 50000k -b:v 50000k -intra -flags +ildct+low_delay -dc 10 -flags2 -intra_vlc -non_linear_quant -ps 1 -qmin 1 -qmax 3 -top 1 -bufsize 2000000 -rc_init_occupancy 2000000 -rc_buf_aggressivity 0.25 -an -y "Output.m2v"
>> 
>> This fails with: 
>> 
>> Input #0, mpeg, from 'Input.mpg':
>>  Duration: 00:05:26.12, start: 0.957178, bitrate: 52933 kb/s
>>    Stream #0:0[0x1e0]: Video: mpeg2video (4:2:2), yuv422p(tv), 720x576 [SAR 16:15 DAR 4:3], max. 50000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
>>    Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
>> [NULL @ 0x8088dba20] Unable to find a suitable output format for '1'
>> 1: Invalid argument
>> 
> 
> So the "1" is being interpreted as an output file name, possibly because
> you say "-flags2 -intra_vlc -non_linear_quant..." so that -intra_vlc is
> interpreted as removing flag intra_vlc from flags2, but his is not a
> valid flag according to my list (on a slightly different build). Is this
> what you meant?
> 
> 
>> 
>> I can't find any info on the latest error with search, any suggestions appreciated.
>> 
>> [..]
> 
> 
> -- 
> Tim
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user



More information about the ffmpeg-user mailing list