Is there any way to do this same thing with FFMpeg? I haven't used AVISynth before and I'm not really getting on well with VirtualDub 2.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 31 to 57 of 57
Thread
-
-
Is there any way to do this same thing with FFMpeg?
Code:ffmpeg -f image2 -i "top%%5d.png" -i "bottom%%5d.png" -c:v mpeg2video -b:v 5000k -maxrate 8000k -bf 2 -b_strategy 2 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -mpv_flags qp_rd -flags +ilme+ildct -filter_complex vstack,il=l=i:c=i,framerate=25,scale=interl=1,setfield=tff,setdar=4/3 "output.vob"
Last edited by Sharc; 8th Sep 2024 at 18:09.
-
-
Yes. See the blue change in the commandline (setfield=bff).
Code:ffmpeg -f image2 -i "top%%5d.png" -i "bottom%%5d.png" -c:v mpeg2video -b:v 5000k -maxrate 8000k -bf 2 -b_strategy 2 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -mpv_flags qp_rd -flags +ilme+ildct -filter_complex vstack,il=l=i:c=i,framerate=25,scale=interl=1,setfield=bff,setdar=4/3 "output.vob"
Last edited by Sharc; 9th Sep 2024 at 04:38.
-
-
Thanks, although, i'm not sure that setfield=bff does actually make sure that the bottom field is put first, at least not with playback with
Code:ffplay -i "%~1" -loop 1 -an -sn -vf "setfield=tff,separatefields" -vf "setfield=bff,separatefields"
Code:ffmpeg -f image2 -i "bottom%5d.png" -i "top%5d.png" -c:v mpeg2video -b:v 5000k -maxrate 8000k -bf 2 -b_strategy 2 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -mpv_flags qp_rd -flags +ilme+ildct -filter_complex vstack,il=l=i:c=i,framerate=25,scale=interl=1,setfield=bff,setdar=4/3 "output.vob"
-
Yes, for changing the order you have to change the input sequence as well not just the flag. If you have doubts upload a short sample so I can check what it is. Flag and field order should be consistent.
Last edited by Sharc; 9th Sep 2024 at 16:31.
-
Here are 2 clips from the final output, nothing much to see, but they seem to be encoded correctly - to be decoded by the method used in the 1980's description.
All I changed in them was to have setfield=bff or setfield=tff. Can you see any difference that a PAL DVD player will discern?
Code:ffmpeg -f image2 -i "bottom%4d.bmp" -i "top%4d.bmp" -c:v mpeg2video -b:v 5000k -maxrate 8000k -bf 2 -b_strategy 2 -mbd rd -trellis 2 -cmp 2 -subcmp 2 -mpv_flags qp_rd -flags +ilme+ildct -filter_complex vstack,il=l=i:c=i,framerate=25,scale=interl=1,setfield=tff,setdar=4/3 "outputTEST2_TF.vob"
https://forum.videohelp.com/attachment.php?attachmentid=82107&stc=1&d=1725918201
https://forum.videohelp.com/attachment.php?attachmentid=82108&stc=1&d=1725918201 -
Pretty sure the original poster is trying to do this specifically:
https://www.youtube.com/watch?v=VRcs_TUpQ6g
Essentially the photodiode is collecting binary data that was transmitted from an old broadcast transmission.
In the original video, it probably didn't work because the original interlacing was not preserved at all conversion steps.
Here are a few possibilities that I don't think were considered in the above video to get that to read correctly:
1. Display the native data on a PAL-capable CRT (this is how it was originally transmitted and expected to be read) - As far as how to get that digital file into a format that the CRT can read, easiest thing would be to burn your archival copy onto a DVD and play it via composite to the CRT (in this case, it'd need to be a PAL-capable CRT). The DVD authoring software needs to know that you are making a PAL DVD though, or it will mess with the framerate.
2. "Line double" the interlaced footage and you'll be left with a progressive file that can be played on any LCD monitor with the original aspect ratio and the field rate then becomes the frame rate. (50i becomes 50p). This can also be done in hardware using something like the Retrotink 2x and a DVD interlaced source and you can then play that to any LCD monitor or TV via HDMI as 576p50fps
3. Separate each field into a progressive frame and just be ok with the half-height result which will still be plenty large enough for the photodiode to read from on a large LCD screen.Last edited by aramkolt; 9th Sep 2024 at 17:07.
-
Last edited by Sharc; 9th Sep 2024 at 17:18.
-
-
-
Attached the patterns for fields view (CRT or bob deinterlaced) and woven frames view (progressive LCD monitor) for the first 76 fields. Only you know which one is correct and what you need. The fields order should also be looked at together with the underlying natural interlaced video. If the order is wrong one would get jerky playback for motion scenes on a progressive monitor after deinterlacing.
Last edited by Sharc; 10th Sep 2024 at 05:40. Reason: typos
-
Attached the patterns for fields view (CRT or bob deinterlaced) and woven frames view (progressive LCD monitor) for the first 76 fields. Only you know which one is correct and what you need. The fields order should also be looked at together with the underlying natural interlaced video. If the order is wrong one would get jerky playback for motion scenes on a progressive monitor after deinterlacing.
-
It's what you will see as output from this Avisynth script, manually put into a table as you are not familiar with Avisynth
Code:v1=LWLibavVideoSource("outputTEST1_BF.vob").subtitle("BF") v2=LWLIbavVideoSource("outputTEST2_TF.vob").subtitle("TF") v1=v1.assumeBFF() v2=v2.assumeTFF() v1sep=v1.separatefields() v2sep=v2.separatefields() #---------display options----------------- stacked=stackhorizontal(v1,v2) #frames view stackedsep=stackhorizontal(v1sep,v2sep) #fields view return stacked #or stackedsep
Frame#15 (gray/gray in the table)
[Attachment 82124 - Click to enlarge]
Field#30 (black/white in the table)
[Attachment 82125 - Click to enlarge]
Field#31 (white/black in the table)
[Attachment 82126 - Click to enlarge]Last edited by Sharc; 10th Sep 2024 at 07:05.
-
I've just been testing ffplay vs your results, and they are not the same. Using:
Code:ffplay -i "outputTEST1_BF.vob" -loop 1 -an -sn -vf "setfield=tff,separatefields" -vf "setfield=bff,separatefields"
Code:ffplay -i "outputTEST2_TF.vob" -loop 1 -an -sn -vf "setfield=tff,separatefields" -vf "setfield=bff,separatefields"
What would be causing the difference to what you expected? And which would I expect a DVD player to do? -
The Avisynth/.pdf is more trustful I'd assume. Avisynth's LWLibavVideoSource filter decodes the stream like a DVD player.
The ffplay commandline switches the field playback order with the w key (requires a few frames for adjusting) and there might then be discrepancies between the flag and the true field order as well as issues with random seeking. Not sure.
I am away from home for a few days now with no access to my desktop.....Last edited by Sharc; 10th Sep 2024 at 09:48.
-
I have burned some files to a dvd and now that i'm using the phototransistor to read the consecutive fields, I don't seem to be getting any of the expected results. When I say expected results, I mean that I am not reading 0 and 1 fields from the phototransistor, the same as I encoded them to the box on screen with ffmpeg - nor are they what ffmpeg suggested they would be, nor the results from the pdf that Sharc shared.
I'm pretty sure that the phototransistor is mainly reliable, because when I play a file on the DVD that was 0,1,0,1,0,1,0,1 etc for each field, the result from the phototransistor is 0,1,0,1,0,1,0,1 etc.
Is there a way to forget about top and bottom, and just definitely make a video from field1.bmp,field2.bmp,field3.bmp,field4.bmp etc? -
Are you playing on an interlaced CRT or a progressive LCD? The only way to get 60 fields per second from a DVD is to encode interlaced; DVD doesn't support 60p mpg. Even then you may not get 60 fields on an LCD display since the video has to be deinterlaced.
What do you get with other patterns? Like 0,0,1,0,0,1,0,0,1 or 0, 1, 1, 0, 1, 1, 0, 1, 1 or 0, 0, 1, 1, 0, 0, 1, 1? A progressive LCD will attempt to deinterlace and produce unreliable output. What you get from patterns like that may give hints about what the player/TV are doing.Last edited by jagabo; 13th Sep 2024 at 19:11.
-
I'm playing videos made with ffmpeg for viewing at 25i played back on a PAL DVD player on a PAL CRT. I set each field individually either a black square or a white square, and now that I am actually using the DVD, they don't seem to be playing back in the expected order - apart from the 0,1,0,1,0,1,0,1,0,1 video.
I have not made other short patterns yet. I'm at work all day now. -
Check the field order of the DVD. The wrong field order with 0,1,0,1,0,1... will play back with a pairwise reversed pattern of 1,0,1,0,1,0... which looks the same. But most other patterns will be scrambled.
-
I have tested burning these 2 files to DVD using DVD Styler and they both playback on my PAL CRT like Test1BFF in your PDF, whereas the way that I want them to playback is your result for Test2TFF. Any ideas how to get them to play the way that I want?
-
-
I was able to just change the frames I used as images to put the first one as the one I wanted and encode the same way.
Thanks for all the help in this thread, I got what I needed to done.
Similar Threads
-
Converting NTSC dvd rip to 720x576 25i to play on PAL CRT TV?
By Leanoric in forum Newbie / General discussionsReplies: 27Last Post: 21st Nov 2023, 11:58 -
Editing Mix of 576i and 720p
By Sumsaris in forum EditingReplies: 16Last Post: 27th Jul 2023, 11:12 -
Live Gamer Portable 2 PLUS - GC513 - 576i is possible?
By rgr in forum CapturingReplies: 0Last Post: 24th Jul 2023, 05:31 -
HDMI USB Capture with 576i (uncompressed) support
By slikvik in forum CapturingReplies: 32Last Post: 15th Jun 2022, 01:49 -
SeparateFields().SelectEvery(4, 0, 3).Weave() for 576p to 576i not working
By slikvik in forum Video ConversionReplies: 12Last Post: 12th Jun 2022, 08:14