원본 영상이 top first인 인터레이스 영상인데 처음에 디인터레이스 필터를 적용하지 않고 인코딩하여 빗살무늬가 보이는 상태입니다.

그런데 지금 원본 영상이 소실되었고 잘못 인코딩된 영상만 있는 상태입니다... (아래 영상정보 남겨두었습니다.)

 

잘못 인코딩된 영상의 프레임레이트가 30000/1001이고, 다시 인코딩된 영상은 프레임레이트가 60000/1001이 되기를 원해서

다음과 같은 필터를 적용해서 인코딩하였지만 전부 실패했습니다. (물론 인코딩설정에서 프레임레이트를 60000/1001로 지정하였습니다.)

(1) 첫번째 시도

framerate=fps=60000/1001:interp_start=255:interp_end=255,

interlace,

bwdif=1:-1:0

빗살무늬가 사라지지 않았습니다.. (https://ffmpeg.org/ffmpeg-filters.html#toc-interlace 참조했습니다.)

(2) 두번째 시도

framerate=fps=60000/1001:interp_start=255:interp_end=255,

tinterlace=mode=3,

bwdif=1:-1:0

빗살무늬가 사라지지 않은 영상과 검은화면이 반복적으로 나옵니다.. (https://ffmpeg.org/ffmpeg-filters.html#toc-tinterlace 참조했습니다.)

 

아래 잘못인코딩된 영상정보에서 알 수 있듯 29970/1000도 시도해봤는데 안됬습니다..

아무리 찾아보고 공부해봐도 알 수 없어서 이렇게 질문글 올려봅니다.. 

 

1. 올바른 필터 적용방법을 알려주시면 감사하겠습니다...

 

2. Topaz video enhance AI도 갖고 있는데 혹시 이 프로그램으로 해결할 수 있는 방법이 있으면 알려주시면 감사하겠습니다...

 

3. 아래 원본영상 정보 보면 frame rate와 original frame rate가 다른데 둘이 어떤 차이가 있는지 궁금합니다.

 

4. 샤나인코더에서 쓸 수 있는 디인터레이스 필터중에 화질이 제일 좋은 필터가 뭔지 알고계신분 있나요..? yadif, bwdif 같은거요..

현재는 yadif보다는 bwdif가 좋다고 판단해서 bwdif를 쓰고 있고,

QTGMC가 제일 좋은건 알고 있지만 샤나인코더에서 쓸 수 있는것중에 가장 좋은 필터가 무엇인지 궁금해서 질문드립니다.

 

<잘못 인코딩된 영상의 mediainfo>

General
Complete name                            : 
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom)
File size                                : 6.35 GiB
Duration                                 : 1 h 58 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 7 686 kb/s
Encoded date                             : UTC 2019-12-12 03:14:54
Tagged date                              : UTC 2019-12-12 03:14:54

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 1 h 58 min
Source duration                          : 1 h 58 min
Bit rate                                 : 7 633 kb/s
Maximum bit rate                         : 13.8 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Variable
Frame rate                               : 29.970 (29970/1000) FPS
Minimum frame rate                       : 0.164 FPS
Maximum frame rate                       : 29.981 FPS
Original frame rate                      : 29.970 (30000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.123
Stream size                              : 6.30 GiB (99%)
Source stream size                       : 6.30 GiB (99%)
Tagged date                              : UTC 2019-12-12 03:16:32
Menus                                    : 3
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC SBR
Format/Info                              : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name                          : HE-AAC
Format settings                          : Explicit
Codec ID                                 : mp4a-40-2
Duration                                 : 1 h 58 min
Source duration                          : 1 h 58 min
Bit rate mode                            : Variable
Bit rate                                 : 58.3 kb/s
Nominal bit rate                         : 61.7 kb/s
Maximum bit rate                         : 85.2 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 23.438 FPS (2048 SPF)
Compression mode                         : Lossy
Stream size                              : 49.3 MiB (1%)
Source stream size                       : 49.3 MiB (1%)
Default                                  : Yes
Alternate group                          : 1
Tagged date                              : UTC 2019-12-12 03:16:32
Menus                                    : 3

Menu
ID                                       : 3
Codec ID                                 : text
Duration                                 : 1 h 52 min
Tagged date                              : UTC 2019-12-12 03:16:32
Bit rate mode                            : CBR
Menu For                                 : 1,2
Source duration                          : 350016
Source_Duration_FirstFrame               : 349974
Source frame count                       : 2
Source stream size                       : 28
Frame count                              : 324096
Stream size                              : 4537344
Bit rate mode                            : Constant

자세한 정보

General
Count                                    : 331
Count of stream of this kind             : 1
Kind of stream                           : General
Kind of stream                           : General
Stream identifier                        : 0
Count of video streams                   : 1
Count of audio streams                   : 1
Count of menu streams                    : 1
Video_Format_List                        : AVC
Video_Format_WithHint_List               : AVC
Codecs Video                             : AVC
Audio_Format_List                        : AAC LC SBR
Audio_Format_WithHint_List               : AAC LC SBR
Audio codecs                             : AAC LC SBR
Menu_Format_List                         : Timed Text
Menu_Format_WithHint_List                : Timed Text
Menu codecs                              : Timed Text
Complete name                            : 
Folder name                              : 
File name extension                      : 
File name                                : 
File extension                           : mp4
Format                                   : MPEG-4
Format                                   : MPEG-4
Format/Extensions usually used           : braw mov mp4 m4v m4a m4b m4p m4r 3ga 3gpa 3gpp 3gp 3gpp2 3g2 k3g jpm jpx mqv ismv isma ismt f4a f4b f4v
Commercial name                          : MPEG-4
Format profile                           : Base Media
Internet media type                      : video/mp4
Codec ID                                 : isom
Codec ID                                 : isom (isom)
Codec ID/Url                             : http://www.apple.com/quicktime/download/standalone.html
CodecID_Compatible                       : isom
File size                                : 6821389830
File size                                : 6.35 GiB
File size                                : 6 GiB
File size                                : 6.4 GiB
File size                                : 6.35 GiB
File size                                : 6.353 GiB
Duration                                 : 7099998
Duration                                 : 1 h 58 min
Duration                                 : 1 h 58 min 19 s 998 ms
Duration                                 : 1 h 58 min
Duration                                 : 01:58:19.998
Duration                                 : 01:58:12;02
Duration                                 : 01:58:19.998 (01:58:12;02)
Overall bit rate mode                    : VBR
Overall bit rate mode                    : Variable
Overall bit rate                         : 7686075
Overall bit rate                         : 7 686 kb/s
Frame rate                               : 29.970
Frame rate                               : 29.970 FPS
Frame count                              : 212548
Stream size                              : 3143880
Stream size                              : 3.00 MiB (0%)
Stream size                              : 3 MiB
Stream size                              : 3.0 MiB
Stream size                              : 3.00 MiB
Stream size                              : 2.998 MiB
Stream size                              : 3.00 MiB (0%)
Proportion of this stream                : 0.00046
HeaderSize                               : 3143777
DataSize                                 : 6818245994
FooterSize                               : 59
IsStreamable                             : Yes
Encoded date                             : UTC 2019-12-12 03:14:54
Tagged date                              : UTC 2019-12-12 03:14:54
File creation date                       : UTC 2022-07-12 19:04:42.677
File creation date (local)               : 2022-07-13 04:04:42.677
File last modification date              : UTC 2022-05-12 19:38:35.367
File last modification date (local)      : 2022-05-13 04:38:35.367

Video
Count                                    : 383
Count of stream of this kind             : 1
Kind of stream                           : Video
Kind of stream                           : Video
Stream identifier                        : 0
StreamOrder                              : 0
ID                                       : 1
ID                                       : 1
Format                                   : AVC
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format/Url                               : http://developers.videolan.org/x264.html
Commercial name                          : AVC
Format profile                           : High@L4
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4
Format settings, Reference frames        : 4 frames
Internet media type                      : video/H264
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 7098085
Duration                                 : 1 h 58 min
Duration                                 : 1 h 58 min 18 s 85 ms
Duration                                 : 1 h 58 min
Duration                                 : 01:58:18.085
Duration                                 : 01:58:12;02
Duration                                 : 01:58:18.085 (01:58:12;02)
Source duration                          : 7098070
Source duration                          : 1 h 58 min
Source duration                          : 1 h 58 min 18 s 70 ms
Source duration                          : 1 h 58 min
Source duration                          : 01:58:18.070
Bit rate                                 : 7632833
Bit rate                                 : 7 633 kb/s
Maximum bit rate                         : 13817208
Maximum bit rate                         : 13.8 Mb/s
Width                                    : 1920
Width                                    : 1 920 pixels
Height                                   : 1080
Height                                   : 1 080 pixels
Stored_Height                            : 1088
Sampled_Width                            : 1920
Sampled_Height                           : 1080
Pixel aspect ratio                       : 1.000
Display aspect ratio                     : 1.778
Display aspect ratio                     : 16:9
Rotation                                 : 0.000
Frame rate mode                          : VFR
Frame rate mode                          : Variable
Frame rate                               : 29.970
Frame rate                               : 29.970 (29970/1000) FPS
FrameRate_Num                            : 29970
FrameRate_Den                            : 1000
Minimum frame rate                       : 0.164
Minimum frame rate                       : 0.164 FPS
Maximum frame rate                       : 29.981
Maximum frame rate                       : 29.981 FPS
Original frame rate                      : 29.970
Original frame rate                      : 29.970 (30000/1001) FPS
FrameRate_Original_Num                   : 30000
FrameRate_Original_Den                   : 1001
Frame count                              : 212548
Source frame count                       : 212548
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Chroma subsampling                       : 4:2:0
Bit depth                                : 8
Bit depth                                : 8 bits
Scan type                                : Progressive
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.123
Stream size                              : 6766530795
Stream size                              : 6.30 GiB (99%)
Stream size                              : 6 GiB
Stream size                              : 6.3 GiB
Stream size                              : 6.30 GiB
Stream size                              : 6.302 GiB
Stream size                              : 6.30 GiB (99%)
Proportion of this stream                : 0.99196
Source stream size                       : 6766530795
Source stream size                       : 6.30 GiB (99%)
Source stream size                       : 6 GiB
Source stream size                       : 6.3 GiB
Source stream size                       : 6.30 GiB
Source stream size                       : 6.302 GiB
Source stream size                       : 6.30 GiB (99%)
Source_StreamSize_Proportion             : 0.99196
Tagged date                              : UTC 2019-12-12 03:16:32
Menus                                    : 3
Source_Delay                             : 6068
Source_Delay_Source                      : Container
Codec configuration box                  : avcC

Audio
Count                                    : 283
Count of stream of this kind             : 1
Kind of stream                           : Audio
Kind of stream                           : Audio
Stream identifier                        : 0
StreamOrder                              : 1
ID                                       : 2
ID                                       : 2
Format                                   : AAC
Format                                   : AAC LC SBR
Format/Info                              : Advanced Audio Codec Low Complexity with Spectral Band Replication
Commercial name                          : HE-AAC
Commercial name                          : HE-AAC
Format settings                          : Explicit
Format settings, SBR                     : Yes (Explicit)
Format settings, SBR                     : Yes (Explicit)
Format settings, PS                      : No (Explicit)
Format settings, PS                      : No (Explicit)
Format_AdditionalFeatures                : LC SBR
Codec ID                                 : mp4a-40-2
Duration                                 : 7099998
Duration                                 : 1 h 58 min
Duration                                 : 1 h 58 min 19 s 998 ms
Duration                                 : 1 h 58 min
Duration                                 : 01:58:19.998
Duration                                 : 02:00:35:01
Duration                                 : 01:58:19.998 (02:00:35:01)
Source duration                          : 7099990
Source duration                          : 1 h 58 min
Source duration                          : 1 h 58 min 19 s 990 ms
Source duration                          : 1 h 58 min
Source duration                          : 01:58:19.990
Bit rate mode                            : VBR
Bit rate mode                            : Variable
Bit rate                                 : 58271
Bit rate                                 : 58.3 kb/s
Nominal bit rate                         : 61696
Nominal bit rate                         : 61.7 kb/s
Maximum bit rate                         : 85200
Maximum bit rate                         : 85.2 kb/s
Channel(s)                               : 2
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Channel positions                        : 2/0/0
Channel layout                           : L R
Samples per frame                        : 2048
Sampling rate                            : 48000
Sampling rate                            : 48.0 kHz
Samples count                            : 340799904
Frame rate                               : 23.438
Frame rate                               : 23.438 FPS (2048 SPF)
Frame count                              : 166406
Source frame count                       : 166406
Compression mode                         : Lossy
Compression mode                         : Lossy
Stream size                              : 51715155
Stream size                              : 49.3 MiB (1%)
Stream size                              : 49 MiB
Stream size                              : 49 MiB
Stream size                              : 49.3 MiB
Stream size                              : 49.32 MiB
Stream size                              : 49.3 MiB (1%)
Proportion of this stream                : 0.00758
Source stream size                       : 51715155
Source stream size                       : 49.3 MiB (1%)
Source stream size                       : 49 MiB
Source stream size                       : 49 MiB
Source stream size                       : 49.3 MiB
Source stream size                       : 49.32 MiB
Source stream size                       : 49.3 MiB (1%)
Source_StreamSize_Proportion             : 0.00758
Default                                  : Yes
Default                                  : Yes
Alternate group                          : 1
Alternate group                          : 1
Tagged date                              : UTC 2019-12-12 03:16:32
Menus                                    : 3
Source_Delay                             : 12
Source_Delay_Source                      : Container

Menu
Count                                    : 104
Count of stream of this kind             : 1
Kind of stream                           : Menu
Kind of stream                           : Menu
Stream identifier                        : 0
StreamOrder                              : 2
ID                                       : 3
ID                                       : 3
Format                                   : Timed Text
Format                                   : Timed Text
Commercial name                          : Timed Text
Codec ID                                 : text
Duration                                 : 6752000
Duration                                 : 1 h 52 min
Duration                                 : 1 h 52 min 32 s 0 ms
Duration                                 : 1 h 52 min
Duration                                 : 01:52:32.000
Duration                                 : 01:52:32.000
Chapters_Pos_Begin                       : 94
Chapters_Pos_End                         : 94
Tagged date                              : UTC 2019-12-12 03:16:32
Bit rate mode                            : CBR
Menu For                                 : 1,2
Source duration                          : 350016
Source_Duration_FirstFrame               : 349974
Source frame count                       : 2
Source stream size                       : 28
Frame count                              : 324096
Stream size                              : 4537344
Bit rate mode                            : Constant

 

Facebook Twitter Pinterest Kakao
  • ?
    JKyle 2022.07.14 15:03

    단순한 문제가 아닙니다.

     

    어떻게 잘못 디인터레이싱됐는지 모르겠지만 빗살무늬가 보인다니(combing) 그냥 weaving했나 보군요. 잔상(ghosting)까지 보인다면 거의 복구 불가능이라고 생각됩니다. (인터레이스 영상을 디인터레이싱하는 여러 가지 방법은 위키백과 참고 (영문))

    단순히 weaving만 돼 있다면 이론상 하나의 프레임을 두 개의 필드로 분할해서 하나로 묶은 다음 다시 제대로 디인터레이싱하면 되겠죠. 그러나 잔상까지 보인다면 필드에도 잔상이 남기 때문에 방법이 없거나 극히 힘듭니다. (IVTC 제대로 안 하면 후자의 경우가 되죠.)

     

    FFmpeg는 작업 베이스가 프레임이 아니라 timestamp기 때문에 이런 작업엔 부적합합니다. 프레임/필드를 작업 베이스로 하는 AviSynth나 VapourSynth 써야 합니다.

     

    AviSynth에서 SeparateRows(2), QTGMC(또는 다른 디인터레이싱 필터)를 차례로 적용하는 방법이 생각나는데, 원본마다 문제가 다르기 때문에 원본을 놓고서 결과를 미리 보면서 하나하나 해결하는 방법밖에 없습니다. 이런 필터들을 어떻게 적용하는지는 AviSynth를 공부해야 하는데 이게 또 FFmpeg보다 더 복잡해서...

     

    AviSynth에서 필터를 적용하는 기초에 대해서는 AviSynth 위키 문서 참고 (영문)

    AviSynth를 이용하는 추천 프로그램들: StaxRipAvsPmod, VirtualDub2 등 (영문)

     

    그리고...

     

    FFmpeg에서 디인터레이싱 필터는 yadif, bwdif 둘 중 적절하게 고르시면 됩니다. 뭐든 정답은 없습니다. 원본 따라 가는 거지.

    Original frame rate와 frame rate는 그냥 FFmpeg에서 작업 중 timestamp에 맞춰서 수정한 거니 신경 안 써도 됩니다.

     

    아, Topaz video enhance AI는 안 써봐서 모르겠군요.

     
     
     
     

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수 추천 수
공지 샤나 사이트 일시 접속 불가 안내 Rina 2024.04.11 1268 0
공지 소리를 4가지로 분리하는 샤나보컬리무버 프로그램을 소개합니다. Rina 2024.03.22 3888 4
공지 샤나인코더 통합 검색 기능 개선(샤나인코더 우측 상단에 있는 검색창을 사용해 보세요.) Rina 2021.09.30 18846 2
공지 자유게시판에서는 자유롭게 글을 작성할 수 있지만 다음과 같은 내용은 삭제돼요 Rina 2020.03.18 16594 5
공지 일반 [필독] 질문 전에 반드시 읽으세요!!! 3 file JKyle 2019.09.16 32726 6
공지 일반 [알림] 질문 먹튀하지 마시기 바랍니다 => 본문 변경 금지 23 JKyle 2018.10.12 28296 16
3085 질문 화질저하없이 4k를 1080P로 변경하고싶습니다. 2 k 2023.09.21 2172 0
3084 질문 Wmv파일을 mkv로 인코딩시 이런 현상은 왜생기는건가요? 1 file Viollla 2023.09.20 656 0
3083 질문 인코딩시 '오류'의 원인을 모르겠습니다 5 file Viollla 2023.09.20 1038 0
3082 질문 UHD BLURAY HDR.DDP5.1 파일을 인코딩했는데 돌비 파일처럼 색감이 빠집니다 1 왕덕봉 2023.09.19 664 0
3081 질문 스트림카피+합치기시 내장자막.. 1 Reaction 2023.09.19 518 0
3080 질문 화질,음질 유지하면서 wmv파일에 srt 자막만 입히려고하는데 이렇게 설정해도 될까요? 2 Viollla 2023.09.18 731 0
3079 질문 8k 영상을 4k 정도로 낮추고 싶습니다. 1 체리09 2023.09.18 688 0
3078 질문 cpu점유율이 최대로 안잡힙니다. 1 아카르드 2023.09.16 894 0
3077 질문 합치기 모드시 합치는 중에서 너무 오래 걸립니다. 3 file 생각 2023.09.16 875 0
3076 질문 갤럭시폰 동영상 메타데이터의 gps 값 유지방법 질문 라희아빠 2023.09.15 445 0
3075 질문 라데온 RX 590 쓰는데 H264이랑 HEVC 인코딩 가속 쓸수 있나요? 체스터 2023.09.15 714 0
3074 질문 2160x3840 영상 해상도 줄이기 2 dfjjerj 2023.09.10 1142 0
3073 질문 이름 창 조정 무르거부크 2023.09.09 442 0
3072 질문 인코딩한 영상이 초반에 검은화면이 나와요 file siuuuuu 2023.09.09 707 0
3071 질문 메모리 부족 오류..? (Microsoft .Net Framework) 4 믠수 2023.09.09 981 0
3070 질문 깍두기 현상 1 dfjjerj 2023.09.09 689 0
3069 질문 휴대폰으로 촬영한 동영상 메타데이터 유지방법 3 file 라희아빠 2023.09.08 604 0
3068 질문 6버전부터 동영상 합치기가 안되요 3 샤쨩 2023.09.07 1021 0
3067 질문 영상 45도 회전후 위 아래 잘리는 문제 질문있습니다. 3 르네 2023.09.06 395 0
3066 일반 인코딩 보조창 통합 관련 건의 2 믠수 2023.09.05 623 1
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 ... 161 Next
/ 161