VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 56
Thread
  1. I'm going to be getting a piece of archived TV footage in 25i or 576i format and wanted to do a little preparation work.

    Could anyone point me to an sample of this exact type of video, the interlaced part is very important.

    I will need to break the video into individual fields, 50 of them for every second of footage, and look at them individually, can I do that with something like ffmpeg? Is it possible to maintain the full size of the video on each field image, with the spaces between the alternate lines?

    And lastly, how can I put this 25i or 576i video onto a DVD disc while preserving the exact fields to guarantee that they will all be shown on a 50hz CRT PAL TV when played back?

    Thanks for any help on the matter, being used to thinking about frames leaves me a little confused when considering fields of interlaced video and want to take a hands on approach to learning about them.
    Last edited by matalog; 7th Sep 2024 at 04:22.
    Quote Quote  
  2. Originally Posted by matalog View Post
    I will need to break the video into individual fields, 50 of them for every second of footage, and look at them individually, can I do that with something like ffmpeg?
    For fields viewing you may use
    Code:
    ffplay -i "%~1" -loop 1 -an -sn -vf "setfield=tff,separatefields" -vf "setfield=bff,separatefields"
    Replace %~1 with the path to your file.
    Press p for pause and s for stepping through the fields, left or right for -/+10s steps, w for switching between TFF or BFF, q to quit.

    (It's probably more convenient to using VirtualDub2 or Avisynth for fields inspection though)
    Last edited by Sharc; 7th Sep 2024 at 05:04.
    Quote Quote  
  3. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Interlaced MPEG 2 for you to play with attached.
    Image Attached Files
    Quote Quote  
  4. Originally Posted by matalog View Post
    Is it possible to maintain the full size of the video on each field image, with the spaces between the alternate lines?
    Bob-deinterlacing will display the fields as full hight frames but with the spaces between the lines interpolated. I am currently not aware of a simple method to show the spaces between the lines .... It could be done in Avisynth I guess. e.g. by substituting one field by a solid black field. Just a thought.

    Edit:
    Something like this (similar for odd field):
    Code:
    ffms2("D:\Temp\matalog\mpeg2_interlaced.mpg")
    separatefields()
    e=selecteven()
    o=selectodd()
    e=BlankClip(color=color_black, width=720, height=576, pixel_type="YV12",fps=25).separatefields().assumeTFF().selecteven()
    interleave(e,o).weave()
    Image
    [Attachment 82005 - Click to enlarge]
    Image Attached Files
    Last edited by Sharc; 7th Sep 2024 at 07:02. Reason: Script corrected and file attached
    Quote Quote  
  5. That's amazing everyone, thanks for the great help so far.

    All that leaves is how to get the 576i footage onto a DVD while definitely maintaining the interlaced format, so that each field is drawn separately?
    Quote Quote  
  6. Originally Posted by matalog View Post
    That's amazing everyone, thanks for the great help so far.

    All that leaves is how to get the 576i footage onto a DVD while definitely maintaining the interlaced format, so that each field is drawn separately?
    Use standard interlaced DVD compliant mpeg2 encoding. The fields will be preserved and woven to frames. No need to separate or manipulate the fields.
    The PAL DVD standard is 25fps interlaced framerate, 720x576i, stored as frames containing the woven fields which gives 50 fields per second fieldrate. Nothing is lost. The player takes care of presenting the 50 half-height fields per second in adequate form to the TV (deinterlacing).
    For DVD authoring you would need a tool like AVS2DVD or DVDStyler or similar which will take care of producing the compliant DVD file structure etc.
    Last edited by Sharc; 7th Sep 2024 at 07:40.
    Quote Quote  
  7. Shall be no correction, just a bit shorter:

    instead of
    Code:
    BlankClip(color=color_black, width=720, height=576, pixel_type="YV12",fps=25)....
    Code:
    BlankClip(e)....
    Then also the first line with e=... makes sense.
    Quote Quote  
  8. Originally Posted by Sharc View Post
    Originally Posted by matalog View Post
    That's amazing everyone, thanks for the great help so far.

    All that leaves is how to get the 576i footage onto a DVD while definitely maintaining the interlaced format, so that each field is drawn separately?
    Use standard interlaced DVD compliant mpeg2 encoding. The fields will be preserved and woven to frames. No need to separate or manipulate the fields.
    The PAL DVD standard is 25fps interlaced framerate, 720x576i, stored as frames containing the woven fields which gives 50 fields per second fieldrate. Nothing is lost. The player takes care of presenting the 50 half-height fields per second in adequate form to the TV (deinterlacing).
    For DVD authoring you would need a tool like AVS2DVD or DVDStyler or similar which will take care of producing the compliant DVD file structure etc.
    Thanks again. When the fields are woven into frames, are they displayed exactly as they would have been on TV broadcast? This is not the case of it looking good for a human eye to be pleased, it video carries a light pulse that is flashing at 50 hz that a phototransistor will pick up, each field is different from the last.
    Quote Quote  
  9. Originally Posted by matalog View Post
    When the fields are woven into frames, are they displayed exactly as they would have been on TV broadcast?
    If you encode properly, yes. You will see one field at a time on a CRT. Modern progressive displays will show the video deinterlaced by some method (by the player or by the TV), some better than others.
    Quote Quote  
  10. Originally Posted by jagabo View Post
    Originally Posted by matalog View Post
    When the fields are woven into frames, are they displayed exactly as they would have been on TV broadcast?
    If you encode properly, yes. You will see one field at a time on a CRT. Modern progressive displays will show the video deinterlaced by some method (by the player or by the TV), some better than others.
    Great, I would like to know how to encode properly, can you tell me how to be sure to encode it properly for that?
    Quote Quote  
  11. Originally Posted by matalog View Post
    Originally Posted by jagabo View Post
    Originally Posted by matalog View Post
    When the fields are woven into frames, are they displayed exactly as they would have been on TV broadcast?
    If you encode properly, yes. You will see one field at a time on a CRT. Modern progressive displays will show the video deinterlaced by some method (by the player or by the TV), some better than others.
    Great, I would like to know how to encode properly, can you tell me how to be sure to encode it properly for that?
    Use appropriate tools like AVS2DVD or DVDStyler and let these tools do the job.
    Quote Quote  
  12. Thanks for all of the help everyone .
    Quote Quote  
  13. Use an editor that understands interlaced video, and an encoder that encodes interlaced, and use the correct field order.
    Quote Quote  
  14. Right, as another step of preparation and to test out the DVD burning, I have got some images I can encode, and I was able to get half height field images from ffmpeg using
    Code:
    ffmpeg -i video.avi -vf field=top top%d.png
    Code:
    ffmpeg -i video.avi -vf field=bottom bottom%d.png
    - so I know how it expects them to be.

    So how could I, with a set of prepared images of half the intended height, encode a set of top and bottom images into interlaced DVD compliant mpeg2 encoding for burning to DVD?
    Last edited by matalog; 7th Sep 2024 at 13:42.
    Quote Quote  
  15. In ffmpeg you can try something like (for TFF):
    Code:
    ffmpeg -i "%~1" -c:v mpeg2video -b:v 6000k -maxrate 8000k -bf 3 -b_strategy 2 -mbd rd -trellis 2 -cmp 2 -subcmp 2  -mpv_flags qp_rd -flags +ilme+ildct -vf scale=interl=1,setfield=tff,crop=704:576,setdar=4/3 -c:a ac3 -sn "%~1_.vob"
    For BFF: setfield=bff

    But keep in mind, this is not yet a DVD ....

    Much easier to load your sources into DVDStyler
    Quote Quote  
  16. Originally Posted by Sharc View Post
    In ffmpeg you can try something like (for TFF):
    Code:
    ffmpeg -i "%~1" -c:v mpeg2video -b:v 6000k -maxrate 8000k -bf 3 -b_strategy 2 -mbd rd -trellis 2 -cmp 2 -subcmp 2  -mpv_flags qp_rd -flags +ilme+ildct -vf scale=interl=1,setfield=tff,crop=704:576,setdar=4/3 -c:a ac3 -sn "%~1_.vob"
    For BFF: setfield=bff

    But keep in mind, this is not yet a DVD ....

    Much easier to load your sources into DVDStyler
    Do you mean that DVDStyler allows images to be inserted as half height individual fields in an interlaced video to be burned or VOB'd?
    Quote Quote  
  17. I understood you have a couple of 720x576i25 videos which you want to make a DVD of. Or is it individual pictures which you want to put on DVD?
    I am confused about your efforts to create fields and construct interlaced frames. Maybe I misunderstand.
    Can you upload a sample of your videos (few seconds) which you want to author as DVD?

    Added:
    Attached an interlaced DVD made of Alwyn's file of post#3 using DVDStyler
    Image
    [Attachment 82026 - Click to enlarge]

    Image
    [Attachment 82027 - Click to enlarge]
    Image Attached Files
    Last edited by Sharc; 7th Sep 2024 at 16:00.
    Quote Quote  
  18. Originally Posted by Sharc View Post
    I understood you have a couple of 720x576i25 videos which you want to make a DVD of. Or is it individual pictures which you want to put on DVD?
    I am confused about your efforts to create fields and construct interlaced frames. Maybe I misunderstand.
    Can you upload a sample of your videos (few seconds) which you want to author as DVD?
    Thanks for all of your replies .

    I am preparing for receiving a properly encoded 576i video from a broadcast archival, and throughout this thread I have been learning more and more, for which I am very grateful.

    I am now at the stage that I plan to use individual half height images to create an interlaced video that I only want to burn to DVD - absolutely maintaining the interlaced format, as individual Top and Bottom fields - in 576i (25i) format. I will be creating the images that I want for each field, and then encoding them like this: Top1.bmp,Bottom1.bmp,Top2.bmp,Bottom2.bmp.... etc. Those images will each become a field in the interlaced video.

    Well, that is the plan, and I do not have anything to show you samples of yet, as I am still formulating this .
    Quote Quote  
  19. Seems to me that you want to reinvent the wheel or putting the cart before the horse ....
    You don't have to create half-height images by yourself. The DVD authoring tools does this for you. You can also make slide shows from full size pictures using DVDStyler. The video format is correctly interlaced.
    Image Attached Files
    Last edited by Sharc; 7th Sep 2024 at 16:28.
    Quote Quote  
  20. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Any authoring DVD software or Blu-ray SD does this correctly for you with no special intervention from you, However if I choose between mpeg-2 compression and properly de-interlaced video, upscaled and encoded into a good quality modern codec like h.264, I choose the latter.
    Quote Quote  
  21. I have explained earlier in the thread that I will be working with fields that are not necessarily complimentary to the human eye, they will only need to contain information for a Phototransistor pointed at them during playback to decode, so rather than putting the cart before the horse, I am merely trying to understand how to encode such information. It is actually information transmitted at 50Hz even through a 25i source, each field contains a new bit of information in the form of light at a certain place on screen.

    The method is not usual, I agree, but it has been used, and I am going to have to recreate it, from a source video. I have to read data from the source video, which is not allowed to be shared, and then, turn that information into interlaced fields that carry the same or similar information for the next phototransistor to read.

    Maybe I have been explaining badly, or you have been not understanding due to the strange idea, but I would like to know how to do this. I honestly think that I have been given enough tips to do what I have to do, I was only asking a few answers ago, if there was an easier way to do it.
    Quote Quote  
  22. Originally Posted by matalog View Post
    I am now at the stage that I plan to use individual half height images to create an interlaced video that I only want to burn to DVD - absolutely maintaining the interlaced format, as individual Top and Bottom fields - in 576i (25i) format. I will be creating the images that I want for each field, and then encoding them like this: Top1.bmp,Bottom1.bmp,Top2.bmp,Bottom2.bmp.... etc. Those images will each become a field in the interlaced video.
    Something like this with leading zeros (eg, top00005.bmp):
    Code:
    t = ImageSource("top%05d.bmp", start=0, end=14)
    b = ImageSource("bottom%05d.bmp", start=0, end=14)
    Interleave(t, b)
    AssumeFieldBased()
    AssumeTFF()
    Weave()
    AssumeFPS(25000, 1000) # or 30000, 1001
    Last edited by jagabo; 7th Sep 2024 at 16:39.
    Quote Quote  
  23. Similar but starting from full size pictures (if available) and creating the 2 fields:
    Code:
    v1=ImageSource("pic1.bmp",start=0,end=100,fps=25)
    v2=ImageSource("pic2.bmp",start=0,end=100,fps=25)
    v1=v1.separatefields().selecteven() #field1
    v2=v2.separatefields().selectodd() #field2
    interleave(v1,v2).weave()
    Last edited by Sharc; 7th Sep 2024 at 17:44.
    Quote Quote  
  24. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    This photo sensor must be hell of sensitive to read one spot on a CRT screen (equivalent to one pixel), If I understand this correctly, by one photo sensor you are just looking for luma signal (dark to bright tones), otherwise you would need 3 RGB sensors. What about the signal timing such as horizontal and vertical signal bursts?

    You can still do this without a sensor by taking the composite signal out of a yellow RCA jack of a media player playing the luma signal only of the video file and feed it directly into the photo sensor pre-amp, It will be the same signal, The difference is without sensor the signal is cleaner and stronger and all the timing data is there if you want to use it. But since I don't know what the purpose of this experiment is, I think i'm just bambling.
    Quote Quote  
  25. @matalog: Reverting to your first post:

    I'm going to be getting a piece of archived TV footage in 25i or 576i format and wanted to do a little preparation work.
    Could anyone point me to an sample of this exact type of video, the interlaced part is very important.
    See post#3.

    I will need to break the video into individual fields, 50 of them for every second of footage, and look at them individually, can I do that with something like ffmpeg?
    See post#2

    Is it possible to maintain the full size of the video on each field image, with the spaces between the alternate lines?
    See post#4 (using Avisynth)

    And lastly, how can I put this 25i or 576i video onto a DVD disc while preserving the exact fields to guarantee that they will all be shown on a 50hz CRT PAL TV when played back?
    See post #17. Process the original archived interlaced TV footage 720x576i25 with the tool (e.g. with DVDStyler).
    Your DVD player and your PAL CRT TV will play the DVD authored interlaced video field by field by field ....at 50 fields per second, as per your request

    I am now at the stage that I plan to use individual half height images to create an interlaced video that I only want to burn to DVD - absolutely maintaining the interlaced format, as individual Top and Bottom fields - in 576i (25i) format. I will be creating the images that I want for each field, and then encoding them like this: Top1.bmp,Bottom1.bmp,Top2.bmp,Bottom2.bmp.... etc. Those images will each become a field in the interlaced video.
    See post #22, if you for some reason want to compile a video from individual field images, rather than using the original interlaced footage of your TV archive.

    Where is the missing point? I still don't get it .....
    Last edited by Sharc; 8th Sep 2024 at 08:03.
    Quote Quote  
  26. Originally Posted by dellsam34 View Post
    This photo sensor must be hell of sensitive to read one spot on a CRT screen (equivalent to one pixel), If I understand this correctly, by one photo sensor you are just looking for luma signal (dark to bright tones), otherwise you would need 3 RGB sensors. What about the signal timing such as horizontal and vertical signal bursts?

    You can still do this without a sensor by taking the composite signal out of a yellow RCA jack of a media player playing the luma signal only of the video file and feed it directly into the photo sensor pre-amp, It will be the same signal, The difference is without sensor the signal is cleaner and stronger and all the timing data is there if you want to use it. But since I don't know what the purpose of this experiment is, I think i'm just bambling.
    The area of the screen is around 15x15 not one single point. In the 80's they experimented with transmitting data though an alternating black/white square on screen, that is the type of thing I'm going to decode and encode again.
    Quote Quote  
  27. Where is the missing point? I still don't get it .....
    I'm not sure what you mean about missing point.

    I have been given enough information to do what I need, and I am grateful to all that replied.
    Quote Quote  
  28. Originally Posted by matalog View Post
    Where is the missing point? I still don't get it .....
    I'm not sure what you mean about missing point.

    I have been given enough information to do what I need, .....
    Well, eventually you lifted the veil for a better understanding of your case, preventing speculative or irrelevant solutions to some interlaced DVD problem. Thanks.
    Originally Posted by matalong
    ....In the 80's they experimented with transmitting data though an alternating black/white square on screen, that is the type of thing I'm going to decode and encode again.
    Last edited by Sharc; 8th Sep 2024 at 11:32.
    Quote Quote  
  29. Capturing Memories dellsam34's Avatar
    Join Date
    Jan 2016
    Location
    Member Since 2005, Re-joined in 2016
    Search PM
    Originally Posted by matalog View Post
    The area of the screen is around 15x15 not one single point. In the 80's they experimented with transmitting data though an alternating black/white square on screen, that is the type of thing I'm going to decode and encode again.
    Will this 15x15 (mm? inch?) square be displaying each pixel value or the average of an entire field? Is it luma only or both chroma and luma? This is important to better define the script, Good luck on your project.
    Quote Quote  
  30. Originally Posted by dellsam34 View Post
    Originally Posted by matalog View Post
    The area of the screen is around 15x15 not one single point. In the 80's they experimented with transmitting data though an alternating black/white square on screen, that is the type of thing I'm going to decode and encode again.
    Will this 15x15 (mm? inch?) square be displaying each pixel value or the average of an entire field? Is it luma only or both chroma and luma? This is important to better define the script, Good luck on your project.
    The 15x15 pixel block will either be all black when off or half (alternate lines) white when on. It is half white because only one field contains the information. The phototransistor will not care what method creates the light, as long as there is some light there when there should be and no (or considerably less) light there when there should be.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!