Hi, I'm new here so please be patient with me.
I'm sure someone must have requested this before but I've searched and searched and not really found anything.
I'm using a Ubuntu Linux system and have both Mencoder and ffmpeg
I have some video, originally recorded as 1080 50i.
I've checked and it is truly interlaced and not progressive.
I'm trying to create a normal PAL DVD from it, OK I know I can't have 1080 but 720x576 DVD quality will do for what I want.
I would like the resultant video to be interlaced, ie 25fps interlaced not progressive.
All attempts I have tried seem to result in 25fps progressive making movement quite jerky.
I have even created a 1080p50 from the original and tried to interlace this to 720x576 but the result seems to be 25fps progressive rather than true interlace.
What I'm looking for is a way to take the 1080p50 (or the original 1080i50) and create an interlaced 25fps 720x576. ie alternate lines from each of 2 50p frames, so the field (motion) rate is 50fps while the frame rate is 25fps.
I guess an interim 720x576 50p might be required to pluck the lines from. The resulting frame at 720x576 would show the normal interlacing lines which would play smoothly on a normal DVD.
Hopefully someone can suggest how to do this with Mencoder or ffmpeg.
Many thanks
+ Reply to Thread
Results 1 to 10 of 10
-
Last edited by bstewart; 29th Jul 2013 at 07:37. Reason: missed bracket
-
One problem with mencoder and FFmpeg, is they have problems decoding interlaced AVC transport streams (e.g. from camcorders). Glitches, frames out of order, and wrong frame rate are common issues
FFmbc decodes those streams better without errors. It can produce proper interlaced DVD output (50 unique fields per second) with flagging, proper interlaced aware scaling to SD, and conversion to SD colors (these last few things can be done with FFmpeg, it's the decoding issue that is primarily the problem)
In this example, I left " -acodec copy " assuming the original stream had compliant DVD audio. If you remove that, it will encode DVD compliant AC3 automatically
Code:ffmbc -i input.mts -vf colormatrix=bt709:bt601 -target dvd -acodec copy -b 7000k -tff output.mpg
-
Superb - top notch.
Downloaded FFmbc (struggled a bit to do this) and tried your command line.
My original 1080i50 was Sony MTS file so tried direct from that.
End result was exactly what I was looking for. properly interlaced for DVD.
Burned a dvd and tried it in my dvd player. Motion is now much smoother.
Strangely enough the freeze frame on the DVDplayer shows no interlacing so it must do this internally because checking the encoded vob with vlc interlace on/off clearly shows interlacing.
Absolutely brilliant - I'd never heard of FFmbc. - many thanks. -
Hi poisondeathray,
The example you gave worked perfectly from the original 1080i50 file (MTS) which is great.
I also tried it from a 1080p50 but this seemed to create a 25p file rather than interlaced.
Is there another option I'm missing to create interlaced from progressive 50?
cheers -
Yes, it doesn't work, or I don't know the proper switches from 1080p50 => 720x576i50 for ffmbc
But how did you get the 50p file ? Did you use yadif or something in ffmpeg ? I think interlaced AVC transport stream decoding might have been fixed in newest ffmpeg versions (maybe they borrowed the code from ffmbc), but if you used an older version, check for errors
Here is the problem, -vf interlace has been added to ffmpeg recently (for re-interlacing 50p=>50i), but not ffmbc yet (ffmbc tends to be more conservative, only adds things after they have been thoroughly tested) .
https://www.ffmpeg.org/ffmpeg-filters.html#interlace
So it's possible to do with ffmpeg, but first check your 50p files for errors
This assumes your input file is 1080p50 (only bob deinterlaced, no other things done to it yet):
Code:ffmpeg -i 50p_input.avi -aspect 16:9 -vf scale=720:576,colormatrix=bt709:bt601,interlace -c:v mpeg2video -b:v 7000k -maxrate 9000000 -minrate 0 -g 15 -bufsize 1835008 -packetsize 2048 -dc 9 -flags +ilme+ildct -alternate_scan 1 -top 0 -acodec copy -f vob output.mpg
-
BTW That should say -top 1 for top field first in the last post (not that it matters for SD encoding), and no b-frames were used (I would add -bf 2), of course you can change the other parameters, like bitrate, dc etc...
1080p50p => 576i50
Code:ffmpeg -i 50p_input.avi -aspect 16:9 -vf scale=720:576,colormatrix=bt709:bt601,interlace -c:v mpeg2video -bf 2 -b:v 7000k -maxrate 9000000 -minrate 0 -g 15 -bufsize 1835008 -packetsize 2048 -dc 9 -flags +ilme+ildct -alternate_scan 1 -top 1 -acodec copy -f vob output.mpg
MTS 1080i50 => 576i50
Code:ffmpeg -i input.mts -aspect 16:9 -vf scale=720:576:interl=1,colormatrix=bt709:bt601 -c:v mpeg2video -bf 2 -b:v 7000k -maxrate 9000000 -minrate 0 -g 15 -bufsize 1835008 -packetsize 2048 -dc 9 -flags +ilme+ildct -alternate_scan 1 -top 1 -acodec copy -f vob output.mpg
Last edited by poisondeathray; 29th Jul 2013 at 13:32.
-
I used yadif=1. The resulting file increased in size 3.8 times from 145.8MB to 554.4MB, it plays OK but has increased by 2 seconds from 1m08s to 1m10s (confused)
Code:ffmpeg -i in.MTS -vf yadif=1 -acodec ac3 -ab 192k -vcodec mpeg4 -f mp4 -y -sameq out.mp4
ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1.
Also tried with avconv version
avconv version 0.8.6-4:0.8.6-0ubuntu0.12.04.1 which got a bit further before complaining
No such filter: 'colormatrix'
I haven't tried installing the latest ffmpeg version 2.0 yet, guess that's my next step.
As a side issue I've subsequently found that my video editor "Kdenlive" doesn't seem to render the 1080i50 files properly but that's a separate issue - nothing seems easy with video! -
I would try a newer ffmpeg version. In fact, I would ditch those 50p files and start with the original clips - chances are they have decoding errors if you used an old binary that doesn't have c:v option . That might also be the reason for the time discrepancies. Another reason to discard the 50p version is you re-encoded the audio (instead of using -vcodec copy or -c:v copy). You can use -vcodec mpeg2video instead -c:v mpeg2video ; the latter is the newer notation for ffmpeg
-
I don't use linux much, but there must be some precompiled ffmpeg builds floating around. Everything ffmpeg on linux seems to be developed much faster than for windows or mac. Or you might have to compile it yourself, the builds you're using might only have the basic code, no external patches or libraries.
Did you try one of these static builds?
http://ffmpeg.gusari.org/static/
http://dl.dropboxusercontent.com/u/24633983/ffmpeg/index.html
Similar Threads
-
FFmpeg and mpeg2 interlaced encoding
By _MrC_ in forum Video ConversionReplies: 9Last Post: 3rd Jun 2013, 06:22 -
60i and ffmpeg or mencoder
By wiz561 in forum Video ConversionReplies: 9Last Post: 9th Jan 2012, 17:02 -
fFMpeg or Mencoder Help! :(
By Shohag_ifas in forum Video ConversionReplies: 0Last Post: 4th Feb 2011, 17:52 -
FFMPEG MENCODER murder and encoding
By Tom2me in forum ffmpegX general discussionReplies: 1Last Post: 29th Jul 2010, 11:44 -
H.264 ffmpeg vs mencoder
By tommcd64 in forum Video ConversionReplies: 1Last Post: 6th Jun 2010, 13:22