• 阜阳网络达人“点赞”颍泉绿化提升专项工作 2019-04-23
  • 《国家人文历史》往期杂志汇总 2019-04-22
  • 一师一团土地确权登记颁证工作全面展开 2019-04-14
  • 德州扑克赌场披“俱乐部”外衣 打竞技旗号难掩赌博实质 2019-04-12
  • 自治区党委召开常委(扩大)会议 陈全国主持 2019-04-12
  • 17年来首次!塔利班组织宣布停火3天 与阿富汗民众自拍 2019-04-04
  • 2022年冬奥会筹备进行时 2019-04-03
  • 人家80年前就造航母,我们现在才造航母,基础不一样。 2019-04-03
  • 葡萄牙首都上演城市节狂欢 2019-04-01
  • RED EARTH红地球展现自我丝绒唇膏全新发布 2019-03-24
  • 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • Welcome to

    Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

     

    Go Back   Doom9's Forum > Capturing and Editing Video > Capturing Video

    Reply
     
    Thread Tools Search this Thread Display Modes
    Old 14th October 2018, 20:54   #1  |  Link
    Formerly davidh*****
     
    wonkey_monkey's Avatar
     
    Join Date: Jan 2004
    Posts: 1,676
    Trying to reencode a captured video, don't know what I'm doing...

    I've just recorded Doctor Who on BBC1 HD off Freeview using some cheap USB Freeview/capture stick I got a while ago. This gives me a .mpg file.

    I want to trim off the start and end and reencode the audio only - it's currently AAC and I want AC3 (Dolby Digital).

    The .mpg plays fine in MPC-HC and VLC, but any encoding I try to do with ffmpeg from it just gives me a lod of "Invalid DTS" and "Invalid timestamp" messages.

    So I tried dragging it into DGIndexNV so I could trim it a bit and "Output Trimmed TS". This gives me a TS file which also plays fine in MPC-HC and VLC.

    But when I try to reencode the trimmed TS file, firstly i get a few dozen "DTS discontinuity" errors from ffmpeg, then if I try to output an MKV it keeps saying "Starting new cluster due to timestamp." If I output an MP4 it doesn't give this error, but the file plays back very poorly in VLC and MPC-HC - full of stutters. Loading the MP4 into VirtualDub2, it looks like there are load of black frames dropped into the video.

    Can anyone give me some ideas on a) other ways to handle such an input or b) how to cut a bit of the original .mpg to upload somewhere so someone can take a look at it? Or c), some suggestions for decent capture software and not this weird "Total Media" thing that came with the stick?
    __________________
    My AviSynth filters / I'm the Doctor
    wonkey_monkey is online now   Reply With Quote
    Old 14th October 2018, 22:42   #2  |  Link
    Registered User
     
    manolito's Avatar
     
    Join Date: Sep 2003
    Location: Berlin, Germany
    Posts: 2,453
    If your USB capture stick produces an .mpg file does this mean that the BBC broadcasts the HD content as HD MPEG2, or does the capture stick (with the help of the included capture software) reencode to MPEG2 on the fly during capturing?

    If the capture is reencoded on the fly then I think you can get better results skipping the real time conversion to MPEG2 by using VDub for capturing in the native broadcast format (most likely AVC/AAC in a TS container).

    If the BBC really broadcasts in HD MPEG2 then maybe you can specify the output container to be .ts instead of .mpg. In any case you will always get such ffmpeg errors during encoding of broadcast MPEG2 content. The only reliable solution for me has always been to convert TS to PS using software like ProjextX. This will demux the source while correcting all these timing problems.


    Good luck
    manolito

    //EDIT//
    For repairing .ts files from a broadcast there is a tool called TSDoctor (they have a 30 days trial period). It does not always fix all the errors, but worth a try...

    Last edited by manolito; 14th October 2018 at 22:54.
    manolito is offline   Reply With Quote
    Old 15th October 2018, 19:32   #3  |  Link
    Formerly davidh*****
     
    wonkey_monkey's Avatar
     
    Join Date: Jan 2004
    Posts: 1,676
    It's video is H.264/AVC. My USB stick just puts .mpg on whatever it records. I'd previously tried Windows Media Center or whatever it's called but it uses it's own weird format which I couldn't find anything to read. My previous use of these files was to reencode them via DGIndexNV which always worked fine, but trying to remux without reencoding is proving to be problematic.

    I think it may just be an FFMPEG issue. There's something about the BBC's video streams it just doesn't like - illegal picture references, problems with timestamps, and so on. The source files all play fine, though.

    I've now used DGIndexNV to trim and demux, ffmpeg to reencode AAC to AC3, manual cutting of the AC3 to sync, and MKVToolNix to mux. It seems to work, except that ffmpeg complained about some errors in the AAC stream and the audio drifts out of sync, so it probably just dropped the bad parts.
    __________________
    My AviSynth filters / I'm the Doctor
    wonkey_monkey is online now   Reply With Quote
    Old 15th October 2018, 19:37   #4  |  Link
    Registered User
     
    manolito's Avatar
     
    Join Date: Sep 2003
    Location: Berlin, Germany
    Posts: 2,453
    Could you upload a short sample?
    manolito is offline   Reply With Quote
    Old 15th October 2018, 20:12   #5  |  Link
    Formerly davidh*****
     
    wonkey_monkey's Avatar
     
    Join Date: Jan 2004
    Posts: 1,676
    These are some trimmed TS files output by DGIndexNV:

    //horman.net/switch.ts
    //horman.net/titles.ts

    The first file is the very start of my recording, which includes a switch in the main audio track from stereo to 5.1.

    The second file starts further along, so the main audio track is only 5.1.

    Both have a second audio description track and some subtitle streams.
    __________________
    My AviSynth filters / I'm the Doctor
    wonkey_monkey is online now   Reply With Quote
    Old 15th October 2018, 22:55   #6  |  Link
    Registered User
     
    manolito's Avatar
     
    Join Date: Sep 2003
    Location: Berlin, Germany
    Posts: 2,453
    Thanks for the samples...
    The format is very similar to the German public DVB-T2 format (with the exception that they always broadcast at 50 fps here). Even the dreaded AAC-LATM audio is there.

    Quote:
    Both have a second audio description track
    For the first "switch.ts" sample I cannot see a second audio description track. This file does cause trouble here, it does not play nicely in any of my software players. TSDoctor cannot even analyze it correctly, the start PCR is wrong, the user is told to repair the stream first (but no mention of how to do this).

    The other file "titles.ts" does work. TSDoctor does not find anything to repair, it just strips padding. You only get all these errors if you try to use FFmpeg on the file directly. I found that you always should repack such streams first to MKV using MKVToolNix. If you feed such MKVs to FFmpeg there will still be some messages: "Non-monotonous DTS in output stream", but all the other errors have disappeared.

    I converted this MKV with FFmpeg using "Copy" for the video and the subs, and converting both audio tracks to AC3. You can check it out here:
    https://www.sendspace.com/file/qdrjip

    With this sample it is hard to tell if audio is completely in sync, but it looks good to me. Please note that with such AAC-LATM source audio you will get huge audio delays of sometimes more than 1 sec. This can cause trouble if you need to decode the file depending on the source filter. With ffms2 and also with DSS2Mod this audio delay needs to be ignored.


    Cheers
    manolito
    manolito is offline   Reply With Quote
    Old 15th October 2018, 23:30   #7  |  Link
    Formerly davidh*****
     
    wonkey_monkey's Avatar
     
    Join Date: Jan 2004
    Posts: 1,676
    I used MKVToolNix as you suggested. Then I ran ffmpeg, and it did come up with a few DTS errors at the start, and a lot at the end, but otherwise it seems to have worked! The audio stays in sync the whole way through.

    The only remaining issue it that both VLC and MPC-HC have trouble playing the end credits, which are the only part of the video which is interlaced. Both players deinterlace by default, but the credits stutter. When I load it into VirtualDub2, it identifies a lot of frames (which it fails on/displays as dupes of the last good frame) in the credits as [+] type, (instead of P, B, I, or K).

    Here's a short sample, if you want to take look:

    //horman.net/credits.ts

    It includes a bit of the final scene which should playback okay before the credits start. I haven't included the whole credits, but as soon as the interlaced text disappears off the top of the screen, the background swirl plays normally again, as does the whole "Next Time" teaser. I guess i could reencode the credits and join them on, but I also can't guarantee there aren't such "bad" frames elsewhere in this or any other episode.

    Thanks for your help!
    __________________
    My AviSynth filters / I'm the Doctor
    wonkey_monkey is online now   Reply With Quote
    Old 16th October 2018, 02:32   #8  |  Link
    Registered User
     
    Join Date: Jul 2014
    Posts: 670
    Must be a player issue. Looks great playing this in VDub2 or MPC-HC:

    loadplugin("dgdecodenv.dll")
    dgsource("C:\Users\Don\Downloads\credits.dgi",deinterlace=1)

    There don't appear to be any "bad frames".
    videoh is offline   Reply With Quote
    Old 16th October 2018, 05:55   #9  |  Link
    Registered User
     
    manolito's Avatar
     
    Join Date: Sep 2003
    Location: Berlin, Germany
    Posts: 2,453
    No idea about the "credits.ts". I also cannot get the credits to scroll smoothly here, no matter which player I use. The weird thing is that the TS file is 25 fps, but after repacking it to MKV with MKVToolNix the rate is 43,425 FPS VFR. And trying to remux it to MKV with FFmpeg does not work at all.

    But of course I do not have DGDecodeNV, you probably should use this...
    manolito is offline   Reply With Quote
    Old 21st October 2018, 16:51   #10  |  Link
    Registered User
     
    Join Date: Jul 2012
    Location: Scarborough, Canada
    Posts: 850
    Out of curiosity I repacked the credits.ts file to mkv and it retained the 25 fps setting, but marked it as variable
    gonca is offline   Reply With Quote
    Old 25th October 2018, 20:03   #11  |  Link
    Formerly davidh*****
     
    wonkey_monkey's Avatar
     
    Join Date: Jan 2004
    Posts: 1,676
    It seems to cause problems with VLC, MPC-HC, VirtualDub2, and possibly ffmpeg itself - whether it's in MKV or TS - but happily it doesn't affect my TV, apart from perhaps a very slight stutter on the transition.

    So I use DGIndexNV to output a trimmed TS, use MKVToolNix to repack it to an MKV, then use ffmpeg to reencode audio only to AC3.
    __________________
    My AviSynth filters / I'm the Doctor
    wonkey_monkey is online now   Reply With Quote
    Reply


    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT +1. The time now is 23:05.


    Powered by vBulletin® Version 3.8.11
    Copyright ©2000 - 2019, vBulletin Solutions Inc.
  • 阜阳网络达人“点赞”颍泉绿化提升专项工作 2019-04-23
  • 《国家人文历史》往期杂志汇总 2019-04-22
  • 一师一团土地确权登记颁证工作全面展开 2019-04-14
  • 德州扑克赌场披“俱乐部”外衣 打竞技旗号难掩赌博实质 2019-04-12
  • 自治区党委召开常委(扩大)会议 陈全国主持 2019-04-12
  • 17年来首次!塔利班组织宣布停火3天 与阿富汗民众自拍 2019-04-04
  • 2022年冬奥会筹备进行时 2019-04-03
  • 人家80年前就造航母,我们现在才造航母,基础不一样。 2019-04-03
  • 葡萄牙首都上演城市节狂欢 2019-04-01
  • RED EARTH红地球展现自我丝绒唇膏全新发布 2019-03-24
  • 龙船礼 有讲究 百岁龙 抖精神 2019-03-17
  • 新加坡航空将开通 全球最长商业航线 2019-03-17
  • 传说中的自由飞“翔” 当厕所被狂风吹上天 2019-03-12
  • 导游强迫交易获刑 曾辱骂威胁强迫游客消费上万元--旅游频道 2019-03-09
  • 北京正式推出租赁型职工集体宿舍 每间居住人数不超8人 2019-03-09
  • 360彩票新时时彩 江苏时时彩代理 乐彩极速快3官网 内蒙古时时彩5个号走势图 智能定位的3d彩票软件 pk10赛车6码345678公式 六合彩开奖结果 重庆欢乐生肖全天计划 福彩3d专家独胆定胆 二分彩计划软件网页版 广东彩票36选7开奖 利来娱乐城 jk139本港现场报码 百家乐现金网 北京pk10高手赌法长期 足彩310报纸