You'd have to add the demuxed dts core with -map separately as a separate input -i , if you wanted ffmpeg to do the muxing. It can encode and mux at the same time, but the tsmuxer step would have be done first, and separately
There can be other reasons for "freezing" and "pixelation" . But if a <20Mbps stream plays ok with the same settings otherwise, you have your answer, so do that test first
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 61 to 90 of 165
Thread
-
-
Yes with the exact same parameters, the same source file, the 19Mbps plays perfectly while the 25 and 28.2Mbps did not, that was the only changed parameter in the whole script.
-
And was it just 1 video @19Mbps, 1 audio stream , no others ?
That sort of limits your quality significantly , and limits your ability to put the other tracks in
Once you're happy the bitrate is the reason , then you might want to investigate soft pulldown, or other image processing techniques eg. a mild degrainer/denoiser will significantly help compression, since mpeg2 @ 19Mb/s for this type of content (grainy, action scenes) is going to fall apart with lots of compression artifacts -
Yep just one AC-3 audio track and one video track @19Mbps, See script in one of Pandy's earlier posts. If the bitrate is not the limit it has to be something else, I wish I can get a hold of one of the guys who worked in the D-VHS encoding business. For now all what I can do is try different parameters and see which one sticks. It's like bench-marking the format.
-
JVC D-VHS manual says 28.2Mbps but not says if this is nett or gross bitrate (by nett i mean without error correction and by gross real "PHY" bitrate with error correction - for sure some modulation and some ECC must be used by D-VHS). It looks like 25.0512Mbps is absolute maximum nett bitrate - i would try bitrate between ATSC 19.3904 and 25.0512Mbps - perhaps 22 or 23 will be ok then those bits can be allocated for other ES (audio, sub etc). Closed caption is different story - ffmpeg has limited closed caption data processing so they can be carried as private data together with video ES.
Once again DTS is overhyped especially with anything lower ythan 1.5MBps and in fact it require external amplifier and based on EBU Evaluations of Multichannel Audio Codecs DTS doesn't provide subjectively higher than AC-3 quality (thus waste of bits that can be allocated for something more useful). -
Hey Pandy, Since ATSC standard @ 1920 × 1080 pixel (16:9, square pixels) allows frame rates 23.976p, 24p, 29.97p, 30p, 59.94i, 60i, I think D-VHS transport stream standard should support them. I wonder if you could rewrite the script to keep the frame rate unaltered since my source files are 30p at most anyway.
Also unlike ATSC ,I bet D-VHS supports 25p and 50i but I don't have such source files.Last edited by dellsam34; 5th Jan 2019 at 10:02.
-
The line that is changing the framerate for the script in post#31 is the telecine line
pix_fmts yuv420p is rendundant with a BD source (it's already 4:2:0) , so deactivating the entire line is still ok
if source is 4:2:2, you have to change other parameters if you want to encode 4:2:2, or if that's not supported, then you need to specify an interlaced 4:2:2 to 4:2:0 conversion
Code:@set vproc="pp=ac,telecine=pattern=2332,format=pix_fmts=yuv420p"
Code:@rem set vproc="pp=ac,telecine=pattern=2332,format=pix_fmts=yuv420p"
Code:@set vproc="pp=ac"
https://ffmpeg.org/ffmpeg-filters.html#pp
I'm not to familiar with ffmpeg's pp filterLast edited by poisondeathray; 5th Jan 2019 at 10:56.
-
Thanks, Learning as I go, I will deactivate that line and report back.
-
There are two ffmpeg commandlines there - one uncommented (without REM before ffmpeg) - this one doesn't modify framerate at all and assume progressive source (encoding is progressive) and second commented (by REM before ffmpeg) and this one encode interlace with assumption TFF, also 4 different configurations of video filter exist there - 3 commented and inactive, those are responsible for 3 different methods of converting progressive 23.976 fps to interlace 29.97 fps (three different telecine approaches). Perhaps one of them is "soft telecine" (as message about changing PTS is presented) - this one where filter "telecine 2332" is used.
There is no easy way to create single script able to deal with all framerates and progressive and interlace at the same time. Before using ffmpeg you must be aware if your source is progressive vs interlace and framerate (for example to create CVBS NTSC framerate must be 29.97 or 59.94)
Once again to be clear - delivered script https://forum.videohelp.com/threads/391572-M2TS-to-MPEG-2-1080i/page2#post2538708 provide both (interlace and progressive) h.262 encoding but only progressive path is active and there is no framerate conversion .
---
Please use script from https://forum.videohelp.com/threads/391572-M2TS-to-MPEG-2-1080i/page2#post2538708
poisondeathray referenced to older version - now both should have core identical - perhaps i should change or remove older script - not my favorite method as i like to see how things evolve over time to trace changes and understand older vs newer .
ac filter ( https://www.ffmpeg.org/ffmpeg-filters.html#pp - 'ac High quality pp filter combination (ha|a|128|7,va|a,dr|a' ) is mostly focused on deringing and deblocking that may reduce quality for re-encoded content - it is not very fancy but better add than not IMHO https://trac.ffmpeg.org/wiki/Postprocessing .
For MPEG-2 (i use H.262) probably more advanced preprocessing should be used - 18Mbps is barely sufficient...Last edited by pandy; 5th Jan 2019 at 14:45.
-
Although I don't remember what they are, additional frame rates and resolutions were added to the ATSC 1.0 spec in 2009 and if I recall correctly, 2007 was the last year D-VHS recorders were produced, so don't be surprised if some of the progressive frame rates you listed (23.976p, 24p, 29.97p, and 30p) for 1920x1080 resolution are not supported by your recorder.
Also, beyond the possibility that 25p, 50p, and 50i were not part of the ATSC spec until 2009, the TVs made for N. America in the era in which D-VHS recorders were produced typically didn't support 25p, 50p or 50i input, so support for those framerates may not have been included in your player.
In practice, digital cable broadcasters and OTA DTV broadcasters in the US don't use all the available framerates listed in the current ATSC 1.0 spec for MPEG-2 1920 × 1080 content. I have personally never seen recordings of MPEG-2 1920 × 1080 broadcasts which use anything other than 29.97i/59.94i. (Note that 59.94i and 29.97i are different notations describing the same frame rate. 29.97i counts frames. 59.94i counts fields. Since there are 2 interlaced fields per frame, they are equivalent.)Ignore list: hello_hello, tried, TechLord, Snoopy329 -
25p and 50i (I didn't mention 50p) are not for ATSC, They are for European D-VHS tapes, I'm aware my deck doesn't support them, I just said they are part of the D-VHS international standard.
And I have a working file that is 29.97fps 1080x1920 that recorded and played fine in the deck at least according to mediainfo see post #14 unless it means fields not frames.Last edited by dellsam34; 5th Jan 2019 at 14:23.
-
My post said that "Note that 59.94i and 29.97i are different notations describing the same frame rate." Since that was not clear, 29.97i always means 29.97 interlaced frames per second. 59.94i always means 59.94i interlaced fields per second. Divide 59.94 by 2 (there are two fields per frame) to find the actual frame rate, 29.97.
[Edit] Software varies regarding the notation used. I've seen instances where MediaInfo displayed 29.97fps in its properties, but another program used 59.94fps to describe the same file.Last edited by usually_quiet; 5th Jan 2019 at 16:47.
Ignore list: hello_hello, tried, TechLord, Snoopy329 -
Fair but first claim is not entirely correct as you can have 59.94i with field rate higher i.e. in case of double interlace 119.88. This is fair assumption if broadcast standards are considered only.
Second - it may be situation where progressive 29.97 content is pulldowned/telecined to twice higher framerate to satisfy some strict requirements (like BD where 1280x720p29.97 seem to be not allowed) Some software may recognize this and provide real frame rate and second software may not recognize soft telecine and report higher framerate. -
Does any of this apply to US ATSC TV or US digital cable MPEG-2 broadcasts in practice? That is what I was discussing with dellsam34. When it is from film sources the MPEG-2 1080i TV I have recorded from US digital cable or ATSC TV appears to have been hard telecined for broadcast. Commercials are often not film-based. The difference is not hard to see with an editor.
Ignore list: hello_hello, tried, TechLord, Snoopy329 -
D-VHS can exceed ATSC limits, I'm trying to see how far the D-VHS standard can go, ATSC 18.xx/19.xx Kbps with 60i can be recorded with no problem I have done it already. D-Theater tapes topped 25Mbps which is clearly not an ATSC standard.
-
ATSC is highly limited and D-VHS seem offer more formats than ATSC. Consider ATSC as subset of what D-VHS support, lowest common denominator. And broadcast practices may not use some of features supported by default on every codec due simplification of signal flow in live signal (where usually any source is fed to real time encoder and is is re-encoded). I could imagine soft telecine on VOD services that offer streaming from internal broadcaster library over for example DOCSIS.
-
...and how is this information relevant to solving delsam34's problem? That scenario didn't exist during the time that D-VHS recorders were still in production. If you know the specific encoding requirements for MPEG-2 on D-Theater tapes, that would be far more helpful. So far I haven't found them.
Ignore list: hello_hello, tried, TechLord, Snoopy329 -
FYI seem script i've provided works fine with D-VHS and for sure it will be NOK from ATSC perspective. D-VHS is less limited than ATSC due a way how signal flow within system thus soft telecine will be beneficial but not mandatory as CVBS output require 29.97, HDMI works nicely with 23.976 or 24 fps.
-
Ok some new test results, I started off using Pandy's script (It does convert DTS-HD to AC-3) from 28.2Mbps all the way down to 23Mbps, 28.2, 25, 24Mbps all gave freezing and pixelisation from the worst to the least, @ 23Mbps I managed to get the Terminator sample to play flawlessly but I got occasional freezing on TDAT sample, I bet if I go down to 22Mbps it will play out good.
All my source samples are 23.976 (24000/1001) FPS, I would like to keep the frame rate intact and try once again all video bitrates.
How D-Theater tapes managed to get 25Mbps that's beyond me, I wish that someone has the pro equipment to dump a sample from a D-Theater cassette and analyze it, I know a member from avsforum is or at least was able to do this, We are exchanging PM's but the communication process is too slow, I'll try to squeeze some info from him. -
Some good news, I got a cooked sample from the avsforum member it is at 25Mbps and he did mention he converted the 23.976p content to 29.97 interlaced with 3:2 pulldown, Mediainfo doesn't show me so, It shows 23.976 (24000/1001) FPS, The file did record and playback flawlessly. Can anyone analyze it and let me know?
-
This is soft telecine MPEG-2. You can create own soft telecine by using or DGPulldown Donald A. Graft or by using TSMuxeR .
You can analyse MPEG-2 by using DGDecode. -
The guy who sent me that file is the guy who developed the IEEE1394 software with JVC for the 40K and later models, He said he remembers making a 24p D-VHS recording for someone back in the day but he no longer remembers the legal frame rates for D-VHS format
He sent me these commends:
Code:ffmpeg -i Terminator.m2ts -c:v mpeg2video -b:v 22000000 -bufsize 9781248 -maxrate 23000000 -acodec ac3 -muxrate 25000000 terminator.ts You can try this command line that does the conversion in ffmpeg. However, it's not going to do 3:2 pulldown, it's just going to repeat a frame every 4 frames. But it's pretty difficult to see the difference: ffmpeg -i Terminator.m2ts -c:v mpeg2video -r 30/1.001 -b:v 22000000 -bufsize 9781248 -maxrate 23000000 -acodec ac3 -muxrate 25000000 terminator.ts
-
In my script there are 3 different methods for hard telecine (from simple like in this script to more fancy, even one with framerate motion interpolation) - issue with hard telecine is waste of bits - that's why it is better to use soft telecine (this can be automated by script).
But it is not clear to me why you think about telecine if seem everything works fine with progressive source. From your perspective biggest issue is to search for maximum error free bitrate allowed by D-VHS, also VBV buffer size seem to be still valid question (guy provided 597*16384, formal ANSI/SCTE requirement for broadcast exchange materials maximum allowed is 488*16384 - if your MPEG-2 decoder have small RAM then it may be also source of issues) - leaving this to you as i have no access to D-VHS (in fact i don't have VHS VCR from many years - belt broken).
And if you encode interlace then you need to tell this to ffmpeg - at least use in ffmpeg "-flags:v +ilme+ildct -top 1" -
I tried to leave the 23.97 fps unchanged in that ffmpeg command and the video freezed to death, So in my understanding a conversion to 30/1.001 is a must for D-VHS (Progressive or Interlaced I don't know, MediaInfo shows resulting file is progressive).
I tried other video sources even youtube *.mp4 and they all seem to work fine with no issues.
Pandy if you don't mind can you simplify the script and put the command "ffmpeg -i Input.xxx -c:v mpeg2video -r 30/1.001 -b:v 22000000 -bufsize 9781248 -maxrate 23000000 -acodec ac3 -muxrate 25000000 Output.ts" in it? -
You have to add soft pulldown to the 23.976 stream. Again, ffmpeg can't do that part
So you encode 23.976 progressive normally . You can use ffmpeg if you want for that part, but export an elementary stream (*.m2v) instead, then you run that through dgpulldown . It has a GUI or can run commandline . Or , since your 23.976 which "freezed to death" is already encoded, you can demux the video stream with tsmuxer to .m2v (then run that through dgpulldown)
Once it adds the flags , you can remux it either with tsmuxer or ffmpeg -
-
Hard. The difference is quality
Applying -r 30/1.001 to a 23.976 source in ffmpeg means it will add duplicate frames to make up the difference to get 29.97. You are encoding 25% more frames for nothing. Or to put it another way, your frames get about 25% less bitrate, so the quality is going to be worse.
23.976 with means it's physically encoded as 23.976, but the flags signal repeat fields, to make it compatible with NTSC equipment. It "looks" like 29.97, but it's actually 23.976 progressive. With soft pulldown, that same amount of bitrate is spread across fewer frames,
Since the cooked sample worked, and that was soft, you verified that soft works. -
I think with 25Mbps total I'm happy, knowing that most D-Theater tapes were at that bitrate I should say I got close enough to the limits of D-VHS, I doubt is I do a soft pulldown in another program and use the same code will allow me to raise the bitrate more than 25Mbps, Although I will give it a try later. But I'm open for suggestions if someone wants to offer a new method I will be happy to try it.
Last edited by dellsam34; 7th Jan 2019 at 18:54.
-
-
Don't get me wrong but is very crude command line - you don't get better quality from it.
Technically you can create new script and copy paste this line but... It is bad, uneffcient and simply not worth time spent on encoding (i mean lot of efforth put on line to do this so why compromise quality - do job correctly).
As poisondeathray pointed new script can do:
First encoding source to separate two files - separate so called ES for audio and separate ES for video, video progressive 23.976fps (or rather 24000/1001).
after this dgpulldown will add to progressive MPEG-2 soft telecine (so called pulldown) and after all ffmpeg may create from those two ES's a TS file.
Or TSMuxeR can do last two steps (and also AFAIR is scriptable).
Similar Threads
-
Convert 5 individual 1080i m2ts with Dolby AC3 to MP4 1080p 50fps
By bloodhand in forum Video ConversionReplies: 61Last Post: 11th Feb 2017, 14:16 -
Jitter in encoded SD MPEG-2 from MBAFF H.264 1080i file - why?
By Killer3737 in forum Video ConversionReplies: 21Last Post: 4th Nov 2014, 12:25 -
Replacing multiple M2TS files with one large M2TS - possible??
By kpic in forum Authoring (Blu-ray)Replies: 0Last Post: 1st Nov 2014, 01:55 -
What to do with 1080i
By WildW in forum Video ConversionReplies: 5Last Post: 20th Sep 2014, 18:39 -
de interlacing 1080i
By kujija in forum EditingReplies: 3Last Post: 23rd Jul 2014, 10:42