Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

FrancoisMace
Hello everybody,

I am currently trying to generate uncompressed AVIs from individual files containing fields (for 1080i) or frames (for 720p) formatted in v210.
I have already found some references on how to use FFMPEG to achieve generating an uncompressed AVI with v210 formats, but I have ran into two problems and I am hoping somebody might help me.

1. First of, for the generation on the uncompressed AVI in 1080i25, the issue I have is to know how I can actually generate the AVI with an aspect ratio of 1920x1080, knowing that my individual v210 files represent fields and how I can specify the actual field number of the first inserted field. I have used the following command:

ffmpeg -s 1920x540 -vcodec v210 -f image2 -pix_fmt yuv422ple -i ./Decoded_5/NewMobCal_YUV10_1080i25//50000000/NM_1080i_%05d.v210 -vcodec v210 -r 25 -s 1920x540 -vframes 20 -y ./NewMobCal_YUV10_1080i25_50000.avi

However, this generates a (working) AVI but with aspect ratio 1920x540 and where the image bounces a little bit up and downard (one frame over two) because fields are used as frames.

2. Secondly, when I try to generate a 720p AVI, I ran into an error. My original files are actually v210 with aspect ratio 1284x720 and I would like to be able to use the -cropright 4 option to come back to the actual 720p aspect ratio but I figured I should first manage to have the AVI generation working.

My command line is the following:

ffmpeg -s 1284x720 -vcodec v210 -f image2 -pix_fmt yuv422ple -i ./Decoded_5/NewMobCal_YUV10_720p50/50000000/NM_720p_%05d.v210 -vcodec v210 -r 50 -s 1284x720 -vframes 20 -y ./NewMobCal_YUV10_720p50_50000.avi

And the error messages I got are:

FFmpeg version SVN-r19283, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --disable-static --enable-shared
  libavutil     50. 3. 0 / 50. 3. 0
  libavcodec    52.32. 0 / 52.32. 0
  libavformat   52.36. 0 / 52.36. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0. 7. 1 /  0. 7. 1
  built on Mar 23 2011 11:04:29, gcc: 4.4.3
Input #0, image2, from './Decoded_5/NewMobCal_YUV10_720p50/50000000/NM_720p_%05d.v210':
  Duration: 00:00:20.16, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: v210, yuv422ple, 1284x720, 25 tbr, 25 tbn, 25 tbc
[v210 @ 0x21d1030]bits per raw sample: 0 != 10-bit
Output #0, avi, to './NewMobCal_YUV10_720p50_50000.avi':
    Stream #0.0: Video: v210, yuv422ple, 1284x720, q=2-31, 200 kb/s, 50 tbn, 50 tbc
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
[v210 @ 0x21cf9e0]packet too small
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
Error while decoding stream #0.0
...
Error while decoding stream #0.0
Error while decoding stream #0.0
    Last message repeated 503 times
[image2 @ 0x21ce390]Could not open file : ./Decoded_5/NewMobCal_YUV10_720p50/50000000/NM_720p_00504.v210
frame=    0 fps=  0 q=0.0 Lsize=       6kB time=10000000000.00 bitrate=   0.0kbits/s    
video:0kB audio:0kB global headers:0kB muxing overhead inf%

My sequence has files starting with NM_720p_00000.v210 and ending at NM_720p_00503.v210. Each of this file is generatied with the same methodology as the one used for my 1080i fields (so I am pretty confident the files are ok) and the file size is 2465280 bytes (corresponding to the expected size of a v210 1284x720 image 1284x720/6*16).

Thank you in advance for your help and suggestions.
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Tim Nicholson
On 02/09/11 12:40, FrancoisMace wrote:

> Hello everybody,
>
> I am currently trying to generate uncompressed AVIs from individual files
> containing fields (for 1080i) or frames (for 720p) formatted in v210.
> I have already found some references on how to use FFMPEG to achieve
> generating an uncompressed AVI with v210 formats, but I have ran into two
> problems and I am hoping somebody might help me.
>
> 1. First of, for the generation on the uncompressed AVI in 1080i25, the
> issue I have is to know how I can actually generate the AVI with an aspect
> ratio of 1920x1080, knowing that my individual v210 files represent fields
> and how I can specify the actual field number of the first inserted field. I
> have used the following command:
>
> ffmpeg -s 1920x540 -vcodec v210 -f image2 -pix_fmt yuv422ple -i
> ./Decoded_5/NewMobCal_YUV10_1080i25//50000000/NM_1080i_%05d.v210 -vcodec
> v210 -r 25 -s 1920x540 -vframes 20 -y ./NewMobCal_YUV10_1080i25_50000.avi
>
> However, this generates a (working) AVI but with aspect ratio 1920x540 and
> where the image bounces a little bit up and downard (one frame over two)
> because fields are used as frames.

I presume I'm missing something here because you specify an output size
of 1920x540 and then complain when that's what you get.....

As for turning frames into interlaced fields, thats one of those bits of
magic that keeps slipping out of my personal FIFO so hopefully someone
else can jog our memories..
--
Tim

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                       
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

FrancoisMace
Hello Tim,

Thanks for your quick answer.

Indeed, my output image was specified as being 1920x540 since, when I specified 1920x1080, one hald of the ouptut AVI displayed completely green.

So the command line was there in order to illustrate what I manage to get working, although what is slipping out of your mind correspond to what I have tried to get.

The only notions of "interlacing" I found in the ffmpeg documentation seem to be related to the use of the AVC encoder/decoders which, since I am wanting to do an uncompressed AVI, do not interest me.


PS: Any thought about the issue I am getting with the 720p ?
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Thomas Worth-2
On Fri, Sep 2, 2011 at 6:50 AM, FrancoisMace <[hidden email]> wrote:

> Hello Tim,
>
> Thanks for your quick answer.
>
> Indeed, my output image was specified as being 1920x540 since, when I
> specified 1920x1080, one hald of the ouptut AVI displayed completely green.
>
> So the command line was there in order to illustrate what I manage to get
> working, although what is slipping out of your mind correspond to what I
> have tried to get.
>
> The only notions of "interlacing" I found in the ffmpeg documentation seem
> to be related to the use of the AVC encoder/decoders which, since I am
> wanting to do an uncompressed AVI, do not interest me.

It sounds like you are trying to extract fields from an interlaced
video and convert them to progressive (50i --> 50p). Am I correct? If
so, I don't think it's as simple as scaling each field vertically to
1080 lines because you will get that jittery effect due to the fields
being out of "registration." If I remember correctly, there is a bob
filter in VirtualDub that will perform a shift to better align the
fields and get rid of most of the jitter. That's a necessary step, and
unless you do it prior to encoding with FFmpeg I don't think it'll
look right.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Tim Nicholson
On 02/09/11 15:07, Thomas Worth wrote:
> On Fri, Sep 2, 2011 at 6:50 AM, FrancoisMace<[hidden email]>  wrote:
>> Hello Tim,
>>
>> Thanks for your quick answer.
>>
>> Indeed, my output image was specified as being 1920x540 since, when I
>> specified 1920x1080, one hald of the ouptut AVI displayed completely green.

Because you only supplied 540 lines of input...

>>
>> So the command line was there in order to illustrate what I manage to get
>> working, although what is slipping out of your mind correspond to what I
>> have tried to get.
>>
>> The only notions of "interlacing" I found in the ffmpeg documentation seem
>> to be related to the use of the AVC encoder/decoders which, since I am
>> wanting to do an uncompressed AVI, do not interest me.
>
> It sounds like you are trying to extract fields from an interlaced
> video and convert them to progressive (50i -->  50p). Am I correct? If

Thomas I think he has already extracted the individual fields and they
now exist as discrete image files. Now he wants to turn them back into
an interlaced video.

ISTR that mencoder managed that somewhat better than ffmpeg, but now
ffmpeg supports mencoder filters it may be possible directly. I think
having the input rate twice the output rate was involved somewhere.

Someone must remember.

However Francois is using a very old version of ffmpeg.


> so, I don't think it's as simple as scaling each field vertically to
> 1080 lines because you will get that jittery effect due to the fields
> being out of "registration." If I remember correctly, there is a bob
> filter in VirtualDub that will perform a shift to better align the
> fields and get rid of most of the jitter. That's a necessary step, and
> unless you do it prior to encoding with FFmpeg I don't think it'll
> look right.
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user


--
Tim

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                       
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

FrancoisMace
In reply to this post by FrancoisMace
Tim is indeed right, each of my v210 files for the 1080i represents a separate field.

I will try to take a look at a more recent version of ffmpeg and to see if I can get the mencoder filter to work.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Mark Himsley
In reply to this post by Tim Nicholson
On 02/09/2011 15:20, Tim Nicholson wrote:

> On 02/09/11 15:07, Thomas Worth wrote:
>> On Fri, Sep 2, 2011 at 6:50 AM, FrancoisMace<[hidden email]>  wrote:
>>> Hello Tim,
>>>
>>> Thanks for your quick answer.
>>>
>>> Indeed, my output image was specified as being 1920x540 since, when I
>>> specified 1920x1080, one hald of the ouptut AVI displayed completely green.
>
> Because you only supplied 540 lines of input...
>
>>>
>>> So the command line was there in order to illustrate what I manage to get
>>> working, although what is slipping out of your mind correspond to what I
>>> have tried to get.
>>>
>>> The only notions of "interlacing" I found in the ffmpeg documentation seem
>>> to be related to the use of the AVC encoder/decoders which, since I am
>>> wanting to do an uncompressed AVI, do not interest me.
>>
>> It sounds like you are trying to extract fields from an interlaced
>> video and convert them to progressive (50i -->  50p). Am I correct? If
>
> Thomas I think he has already extracted the individual fields and they
> now exist as discrete image files. Now he wants to turn them back into
> an interlaced video.
>
> ISTR that mencoder managed that somewhat better than ffmpeg, but now
> ffmpeg supports mencoder filters it may be possible directly. I think
> having the input rate twice the output rate was involved somewhere.
>
> Someone must remember.

I haven't completely understood Francois' requirements, but if Francois
is wanting to convert frames into fields then that's what the tinterlace
filter does. There's the version in FFmbc, there's the version in the mp
filters of FFmpeg (and therefore also in mencoder), and there's the
patch that Stefano has posted to ffmpeg-devel - and which he said "I'm
going to apply the patch in a few days if I see no comments..." a few
days ago.

If I've understood right, Francois has half-height frames that he wants
to interlace, then he'll want tinterlace mode 0: "Move odd frames into
the upper field of the new frame, even into the lower field, generating
a double height frame at half framerate"


>
> However Francois is using a very old version of ffmpeg.
>

True enough.

--
Mark
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

FrancoisMace
Hello Mark,

Thank you for your answer. Your completely right about what I am trying to do:

I have a bunch of files formated in v210. Each file refers to one of the two fields of the image, the even numbered one corresponds to the bottom field and the odd one correspond to the top field.

I have taken a look at your suggestion to use the mp filter and to go for a more recent version of the ffmpeg software.  To do so, I have downloaded an available windows build (the latest 32 bit static build from http://ffmpeg.zeranoe.com/builds/).

However I am still experiencing some odd behavior:

Here is the command line launched and the obtained result:

./ffmpeg.exe -s 1920x540 -vcodec v210 -f image2 -pix_fmt yuv422p16le -i "PATH_TO_FILES\ParkRun_YUV10_1080i25\PR_1080i_%05d.v210" -pix_fmt yuv422p10le -vcodec v210 -vf mp=tinterlace:0 -vcodec v210 -pix_fmt yuv422p16le -r 25 -s 1920x540 "test.avi"

ffmpeg version N-32290-g6fc1299, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep  2 2011 00:40:00 with gcc 4.6.1
  configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
 --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
  libavutil    51. 14. 0 / 51. 14. 0
  libavcodec   53. 12. 0 / 53. 12. 0
  libavformat  53. 10. 0 / 53. 10. 0
  libavdevice  53.  3. 0 / 53.  3. 0
  libavfilter   2. 37. 0 /  2. 37. 0
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
Input #0, image2, from 'PATH_TO_FILE\ParkRun_YUV10_1080i25\PR_1080i_%05d.v210':
  Duration: 00:00:20.16, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: v210, yuv422p10le, 1920x540, 25 tbr, 25 tbn, 25 tbc
File 'test.avi' already exists. Overwrite ? [y/N] y
Incompatible pixel format 'yuv422p16le' for codec 'v210', auto-selecting format
'yuv422p10le'
[buffer @ 01ED2500] w:1920 h:540 pixfmt:yuv422p10le tb:1/1000000 sar:0/1 sws_param:
[mp @ 01ED2AC0] This is a unholy filter, it will be purified by the ffmpeg exorcist team which will change its syntax from dark -vf mp to light -vf.
Thou shalst not make spells or scripts that depend on it
[buffersink @ 01ED2780] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_mp_0' and the filter 'out'
[mp @ 01ED2AC0] auto-inserting filter 'auto-inserted scaler 1' between the filte r 'src' and the filter 'Parsed_mp_0'
[scale @ 01ED3960] w:1920 h:540 fmt:yuv422p10le -> w:1920 h:540 fmt:yuv420p flags:0x4
[scale @ 01ED29A0] w:1920 h:1080 fmt:yuv420p -> w:1920 h:1080 fmt:yuv422p10le flags:0x4
Output #0, avi, to 'test.avi':
  Metadata:
    ISFT            : Lavf53.10.0
    Stream #0.0: Video: v210 (v210 / 0x30313276), yuv422p10le, 1920x1080, q=2-31
, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0.0 -> #0.0 (v210 -> v210)
Press [q] to stop, [?] for help
[buffer @ 01ED2500] request_frame() called with no available frame!
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  1 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  1 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit
    Last message repeated 46 times
request_frame() called with no available frame!
frame=    1 fps=  0 q=0.0 Lsize=    5406kB time=00:00:00.04 bitrate=1107060.8kbi
ts/s dup=0 drop=46



Two behaviors I cannot explain:

- I do not undersand why a scaler filter is automatically insterted two times (goint from 422 to 420 and back)
- I do not understand why the output file size does not increase during the encoding process.

Thanks for your help!
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Mark Himsley
On 04/09/2011 19:01, FrancoisMace wrote:

> Hello Mark,
>
> Thank you for your answer. Your completely right about what I am trying to
> do:
>
> I have a bunch of files formated in v210. Each file refers to one of the two
> fields of the image, the even numbered one corresponds to the bottom field
> and the odd one correspond to the top field.
>
> I have taken a look at your suggestion to use the mp filter and to go for a
> more recent version of the ffmpeg software.  To do so, I have downloaded an
> available windows build (the latest 32 bit static build from
> http://ffmpeg.zeranoe.com/builds/).
>
> However I am still experiencing some odd behavior:
>
> Here is the command line launched and the obtained result:
>
> ./ffmpeg.exe -s 1920x540 -vcodec v210 -f image2 -pix_fmt yuv422p16le -i
> "PATH_TO_FILES\ParkRun_YUV10_1080i25\PR_1080i_%05d.v210" -pix_fmt
> yuv422p10le -vcodec v210 -vf mp=tinterlace:0 -vcodec v210 -pix_fmt
> yuv422p16le -r 25 -s 1920x540 "test.avi"
>
> ffmpeg version N-32290-g6fc1299, Copyright (c) 2000-2011 the FFmpeg
> developers
>    built on Sep  2 2011 00:40:00 with gcc 4.6.1
>    configuration: --enable-gpl --enable-version3 --enable-memalign-hack
> --enable-
> runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
> --enable-libo
> pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype
> --enable-libgsm --
> enable-libmp3lame --enable-libopenjpeg --enable-librtmp
> --enable-libschroedinger
>   --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx
> --enabl
> e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
>    libavutil    51. 14. 0 / 51. 14. 0
>    libavcodec   53. 12. 0 / 53. 12. 0
>    libavformat  53. 10. 0 / 53. 10. 0
>    libavdevice  53.  3. 0 / 53.  3. 0
>    libavfilter   2. 37. 0 /  2. 37. 0
>    libswscale    2.  0. 0 /  2.  0. 0
>    libpostproc  51.  2. 0 / 51.  2. 0
> Input #0, image2, from
> 'PATH_TO_FILE\ParkRun_YUV10_1080i25\PR_1080i_%05d.v210':
>    Duration: 00:00:20.16, start: 0.000000, bitrate: N/A
>      Stream #0.0: Video: v210, yuv422p10le, 1920x540, 25 tbr, 25 tbn, 25 tbc
> File 'test.avi' already exists. Overwrite ? [y/N] y
> Incompatible pixel format 'yuv422p16le' for codec 'v210', auto-selecting
> format
> 'yuv422p10le'
> [buffer @ 01ED2500] w:1920 h:540 pixfmt:yuv422p10le tb:1/1000000 sar:0/1
> sws_param:
> [mp @ 01ED2AC0] This is a unholy filter, it will be purified by the ffmpeg
> exorcist team which will change its syntax from dark -vf mp to light -vf.
> Thou shalst not make spells or scripts that depend on it
> [buffersink @ 01ED2780] auto-inserting filter 'auto-inserted scaler 0'
> between the filter 'Parsed_mp_0' and the filter 'out'
> [mp @ 01ED2AC0] auto-inserting filter 'auto-inserted scaler 1' between the
> filte r 'src' and the filter 'Parsed_mp_0'
> [scale @ 01ED3960] w:1920 h:540 fmt:yuv422p10le ->  w:1920 h:540 fmt:yuv420p
> flags:0x4
> [scale @ 01ED29A0] w:1920 h:1080 fmt:yuv420p ->  w:1920 h:1080
> fmt:yuv422p10le flags:0x4
> Output #0, avi, to 'test.avi':
>    Metadata:
>      ISFT            : Lavf53.10.0
>      Stream #0.0: Video: v210 (v210 / 0x30313276), yuv422p10le, 1920x1080,
> q=2-31
> , 200 kb/s, 25 tbn, 25 tbc
> Stream mapping:
>    Stream #0.0 ->  #0.0 (v210 ->  v210)
> Press [q] to stop, [?] for help
> [buffer @ 01ED2500] request_frame() called with no available frame!
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  1 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  1 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
> frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04
> bitrate=1107056.0kbit
>      Last message repeated 46 times
> request_frame() called with no available frame!
> frame=    1 fps=  0 q=0.0 Lsize=    5406kB time=00:00:00.04
> bitrate=1107060.8kbi
> ts/s dup=0 drop=46
>
>
>
> Two behaviors I cannot explain:
>
> - I do not undersand why a scaler filter is automatically insterted two
> times (goint from 422 to 420 and back)

Looking at the source, the mp tinterlace filter accepts these mplayer
formats only: IMGFMT_YV12, IMGFMT_IYUV, IMGFMT_I420.

And in the shim between FFmpeg and mplayer filter all three equate to
FFmpeg's YUV420P.

Therefore the FFmpeg filter chain has done the conversion to the only
available format in the tinterlace filter.

Stefano's new tinterlace filter will do all these - so, not the 10 bit
you're after, but better than 420.

  PIX_FMT_YUV420P,  PIX_FMT_YUV422P,  PIX_FMT_YUV444P,
  PIX_FMT_YUV444P,  PIX_FMT_YUV410P,  PIX_FMT_YUVA420P,
  PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P,
  PIX_FMT_YUVJ440P, PIX_FMT_GRAY8

Now I'm awake and can see you're using the EBU test material. Good man :-)

> - I do not understand why the output file size does not increase during the
> encoding process.

I don't quite understand your question.

But, at the input part you are not specifying the rate of your image
stream and therefore FFmpeg is defaulting to 25. You have 50 frames per
second at the input and 25 frames per second at the output, so add -r 50
before the -i. Then FFmpeg won't drop half your frames (the "drop=46" at
the end of your output.

--
Mark

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

FrancoisMace
Hello Mark,

Thanks for your reply.

I am indeed using the EBU test content. The purpose of my application is to have a way of vizualizing the ouptut of a hardware compression-decompression chain I have applied on the EBU test content for one of our customer, our tools handling only v210 yuv 10 bit files.

My last question is related to the fact that my output .avi file size does not increase with frames being added. I applied the changes you indicated and it seems that all the frames, except from the last one, are dropped, leaving the output.avi file with only one frame inside it, hence the line

 > frame=    1 fps=  0 q=0.0 size=    5406kB time=00:00:00.04 bitrate=1107056.0kbit

with the size parameter remaining always the same (size keeps being = 5460 kB).
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Thomas Worth-2
In reply to this post by Mark Himsley
> Looking at the source, the mp tinterlace filter accepts these mplayer
> formats only: IMGFMT_YV12, IMGFMT_IYUV, IMGFMT_I420.
>
> And in the shim between FFmpeg and mplayer filter all three equate to
> FFmpeg's YUV420P.
>
> Therefore the FFmpeg filter chain has done the conversion to the only
> available format in the tinterlace filter.
>
> Stefano's new tinterlace filter will do all these - so, not the 10 bit
> you're after, but better than 420.
>
>  PIX_FMT_YUV420P,  PIX_FMT_YUV422P,  PIX_FMT_YUV444P,
>  PIX_FMT_YUV444P,  PIX_FMT_YUV410P,  PIX_FMT_YUVA420P,
>  PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P,
>  PIX_FMT_YUVJ440P, PIX_FMT_GRAY8

Since v210 is still 4:2:2, is it possible that the filter will just
reduce precision to 8 bit? Or does it fail completely since it can't
match the pixel format exactly?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Mark Himsley
On 05/09/11 10:38, Thomas Worth wrote:

>> Looking at the source, the mp tinterlace filter accepts these mplayer
>> formats only: IMGFMT_YV12, IMGFMT_IYUV, IMGFMT_I420.
>>
>> And in the shim between FFmpeg and mplayer filter all three equate to
>> FFmpeg's YUV420P.
>>
>> Therefore the FFmpeg filter chain has done the conversion to the only
>> available format in the tinterlace filter.
>>
>> Stefano's new tinterlace filter will do all these - so, not the 10 bit
>> you're after, but better than 420.
>>
>>   PIX_FMT_YUV420P,  PIX_FMT_YUV422P,  PIX_FMT_YUV444P,
>>   PIX_FMT_YUV444P,  PIX_FMT_YUV410P,  PIX_FMT_YUVA420P,
>>   PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P,
>>   PIX_FMT_YUVJ440P, PIX_FMT_GRAY8
>
> Since v210 is still 4:2:2, is it possible that the filter will just
> reduce precision to 8 bit? Or does it fail completely since it can't
> match the pixel format exactly?

Yes. FFmpeg's filter chain logic adds format conversion when it's needed
- although I haven't looked into how it chooses the best quality format
to convert to. Maybe Stefano could describe that?

Personally I would format the filter line to force the conversion to the
format I want, using a scale filter followed by a format filter (format
conversion is done in the scale filter). I add the scale filter myself,
instead of letting the filter chain add a scale filter for me because,
by default, non-interlaced aware scale filters are added, which *can*
wreck the chroma of format conversions.

--
Mark
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Tim Nicholson
In reply to this post by Mark Himsley
On 04/09/11 10:12, Mark Himsley wrote:

> On 02/09/2011 15:20, Tim Nicholson wrote:
>> On 02/09/11 15:07, Thomas Worth wrote:
>>> On Fri, Sep 2, 2011 at 6:50 AM, FrancoisMace<[hidden email]>   wrote:
>>>> Hello Tim,
>>>>
>>>> Thanks for your quick answer.
>>>>
>>>> Indeed, my output image was specified as being 1920x540 since, when I
>>>> specified 1920x1080, one hald of the ouptut AVI displayed completely green.
>>
>> Because you only supplied 540 lines of input...
>>
>>>>
>>>> So the command line was there in order to illustrate what I manage to get
>>>> working, although what is slipping out of your mind correspond to what I
>>>> have tried to get.
>>>>
>>>> The only notions of "interlacing" I found in the ffmpeg documentation seem
>>>> to be related to the use of the AVC encoder/decoders which, since I am
>>>> wanting to do an uncompressed AVI, do not interest me.
>>>
>>> It sounds like you are trying to extract fields from an interlaced
>>> video and convert them to progressive (50i -->   50p). Am I correct? If
>>
>> Thomas I think he has already extracted the individual fields and they
>> now exist as discrete image files. Now he wants to turn them back into
>> an interlaced video.
>>
>> ISTR that mencoder managed that somewhat better than ffmpeg, but now
>> ffmpeg supports mencoder filters it may be possible directly. I think
>> having the input rate twice the output rate was involved somewhere.
>>
>> Someone must remember.
>
> I haven't completely understood Francois' requirements, but if Francois
> is wanting to convert frames into fields then that's what the tinterlace
> filter does. There's the version in FFmbc, there's the version in the mp
> filters of FFmpeg (and therefore also in mencoder), and there's the
> patch that Stefano has posted to ffmpeg-devel - and which he said "I'm
> going to apply the patch in a few days if I see no comments..." a few
> days ago.
>

Tinterlace...that's the one. I knew my memory wasn't completely
fubar....(just could not for the life of me remember its name, just knew
it was a mencoder one.)


> If I've understood right, Francois has half-height frames that he wants
> to interlace, then he'll want tinterlace mode 0: "Move odd frames into
> the upper field of the new frame, even into the lower field, generating
> a double height frame at half framerate"
>
>
>>
>> However Francois is using a very old version of ffmpeg.
>>
>
> True enough.
>


--
Tim

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                       
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Tim Nicholson
In reply to this post by Mark Himsley
On 05/09/11 11:29, Mark Himsley wrote:
> [...]
>
> Personally I would format the filter line to force the conversion to the
> format I want, using a scale filter followed by a format filter (format
> conversion is done in the scale filter). I add the scale filter myself,
> instead of letting the filter chain add a scale filter for me because,
> by default, non-interlaced aware scale filters are added, which *can*
> wreck the chroma of format conversions.
>

Now I didn't know that....

Which scaler do you use btw?

--
Tim

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                       
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Reply | Threaded
Open this post in threaded view
|

Re: Generating v210 uncompressed AVIs from v210 individual files in 720p and 1080i formats

Mark Himsley
On 06/09/11 08:19, Tim Nicholson wrote:
>
> Which scaler do you use btw?

Hi Tim,

It depends on what I'm doing. Sorry, I think it deserves a much longer
answer than that.

--
Mark



_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user