Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

録画後エンコード始まらない。 #276

Closed
renren13 opened this issue May 30, 2019 · 4 comments
Closed

録画後エンコード始まらない。 #276

renren13 opened this issue May 30, 2019 · 4 comments

Comments

@renren13
Copy link

環境

  • OS:centos7.6
  • Architecture: x64

過去にquestionで投稿されていた方と似た症状に思います。
録画完了後にエンコードするように設定して予約しているのですが録画終了後エンコードが始まっていません。
また一部ですがエンコードが始まる番組もあります。その番組との違いがわからず苦戦しております。

自動的にエンコードされていない番組を録画済みの一覧からサムネイル右上「・・・」からencodeをクリックしても「エンコードキューへ追加しました」と表示されますが確認してみると追加されていなく変換がされません。

その時のepgstationのエラーログです。
ログとgoogle先生を行ったり来たりしましたがお手上げ状態です。
お力をおかしいただければと思います。

[2019-05-31T00:04:06.756] [INFO] system - push encode: /storage/2019年05月30日21時00分00秒-櫻井・有吉THE夜会SP【櫻井翔と妻夫木聡&佐藤隆太親友アポなし旅in湯布院】[字].ts 0
[2019-05-31T00:04:06.757] [INFO] system - encode start: /storage/2019年05月30日21時00分00秒-櫻井・有吉THE夜会SP【櫻井翔と妻夫木聡&佐藤隆太親友アポなし旅in湯布院】[字].ts H264
[2019-05-31T00:04:06.763] [INFO] system - create new encode child: 1559228646763
[2019-05-31T00:04:06.842] [DEBUG] system - -y -analyzeduration 10M -probesize 32M -i /storage/2019年05月30日21時00分00秒-櫻井・有吉THE夜会SP【櫻井翔と妻夫木聡&佐藤隆太親友アポなし旅in湯布院】[字].ts -movflags faststart -map 0 -ignore_unknown -max_muxing_queue_size 1024 -vf yadif,scale=-2:720 -preset veryfast -aspect 16:9 -c:v libx264 -crf 23 -f mp4 -c:a aac -ar 48000 -ab 192k -ac 2 /storage/2019年05月30日21時00分00秒-櫻井・有吉THE夜会SP【櫻井翔と妻夫木聡&佐藤隆太親友アポなし旅in湯布院】[字].mp4

[2019-05-31T00:04:06.848] [DEBUG] system - ffmpeg version git-2019-05-26-fc0de1c Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
configuration: --enable-gpl --enable-libx264 --enable-nonfree
libavutil 56. 28.100 / 56. 28.100
libavcodec 58. 52.102 / 58. 52.102
libavformat 58. 27.103 / 58. 27.103
libavdevice 58. 7.100 / 58. 7.100
libavfilter 7. 54.101 / 7. 54.101
libswscale 5. 4.101 / 5. 4.101
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100

[2019-05-31T00:04:06.876] [DEBUG] system - [mpeg2video @ 0x2324d40] Invalid frame dimensions 0x0.

[2019-05-31T00:04:06.983] [DEBUG] system - Last message repeated 13 times
[mpegts @ 0x231c880] start time for stream 3 is not set in estimate_timings_from_pts

[2019-05-31T00:04:06.991] [DEBUG] system - [mpegts @ 0x231c880] PES packet size mismatch

[2019-05-31T00:04:06.991] [DEBUG] system - [mpegts @ 0x231c880] Could not find codec parameters for stream 4 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 5 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 6 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 7 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 8 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 9 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 10 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 11 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x231c880] Could not find codec parameters for stream 12 (Unknown: none ([13][0][0][0] / 0x000D)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options

[2019-05-31T00:04:06.991] [DEBUG] system - Input #0, mpegts, from '/storage/2019年05月30日21時00分00秒-櫻井・有吉THE夜会SP【櫻井翔と妻夫木聡&佐藤隆太親友アポなし旅in湯布院】[字].ts':
Duration: 01:56:21.33, start: 57358.755344, bitrate: 16475 kb/s
Program 1048
Metadata:
service_name : TBS1

  service_provider: 
Stream #0:0[0x111]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, top first), 1440x1080 [SAR 4:3 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x112]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 191 kb/s
Stream #0:2[0x114]: Subtitle: arib_caption (Profile A) ([6][0][0][0] / 0x0006)
Stream #0:3[0x115]: Data: bin_data ([6][0][0][0] / 0x0006)

[2019-05-31T00:04:06.992] [DEBUG] system - Stream #0:4[0x840]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:5[0x850]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:6[0x857]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:7[0x858]: Unknown: none ([13][0][0][0] / 0x000D)

Stream #0:8[0x859]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:9[0x85e]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:10[0x85f]: Unknown: none ([13][0][0][0] / 0x000D)
Stream #0:11[0x860]: Unknown: none ([13][0][0][0] / 0x000D)

Stream #0:12[0x86e]: Unknown: none ([13][0][0][0] / 0x000D)

Program 1049
Metadata:
service_name : TBS2
service_provider:
Program 1432
Metadata:
service_name : TBS
service_provider:
Program 1183
Metadata:
service_name : ?G?|
service_provider:

[2019-05-31T00:04:06.992] [DEBUG] system - Automatic encoder selection failed for output stream #0:2. Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:2

[2019-05-31T00:04:06.996] [INFO] system - code { code : 0, signal: null }
[2019-05-31T00:04:06.996] [INFO] system - fin encode: /storage/2019年05月30日21時00分00秒-櫻井・有吉THE夜会SP【櫻井翔と妻夫木聡&佐藤隆太親友アポなし旅in湯布院】[字].mp4
[2019-05-31T00:04:06.998] [ERROR] system - Error: FileIsNotFound
at EventEmitter.listener.once (/root/EPGStation/dist/server/Model/IPC/IPCClient.js:442:28)
at Object.onceWrapper (events.js:277:13)
at EventEmitter.emit (events.js:189:13)
at IPCClient. (/root/EPGStation/dist/server/Model/IPC/IPCClient.js:45:31)
at Generator.next ()
at /root/EPGStation/dist/server/Model/IPC/IPCClient.js:7:71
at new Promise ()
at __awaiter (/root/EPGStation/dist/server/Model/IPC/IPCClient.js:3:12)
at process.IPCClient.process.on (/root/EPGStation/dist/server/Model/IPC/IPCClient.js:27:40)
at process.emit (events.js:189:13)

@advancedbear
Copy link
Contributor

#270 のコメントに書いたとおり、最新版のFFMpegがARIB Subtitleに中途半端な対応をしたことによる問題です。
FFmpegをソースからビルドする際、masterブランチを指定してビルドすることにより発生しています。

[2019-05-31T00:04:06.992] [DEBUG] system - Automatic encoder selection failed for output stream #0:2. Default encoder for format mp4 (codec none) is probably disabled. Please choose an encoder manually.
Error selecting an encoder for stream 0:2

とあるように、Stream #0:2が Stream #0:2[0x114]: Subtitle: arib_caption (Profile A) ([6][0][0][0] / 0x0006) といった形で字幕データとして認識されていますが、現在のFFmpegではMP4で出力する際のデフォルト字幕コーデックが指定されていません。
故に、「この字幕データを何でエンコードするか不明」という理由でエンコードがエラーになります。

暫定的な回避策は以下のとおりです。

  • FFmpegビルド時に、release/4.1 ブランチを指定してビルドする
    • こちらがオススメ。EPGStationの字幕表示機能に影響を与えません。
  • enc.js 内のFFmpeg変換オプションに -s:c copy を追加する。
    • エラーは起きなくなると思いますが、EPGStationの字幕表示機能で正常に動作するか不明です。
  • enc.js 内のFFmpeg変換オプションに -sn を追加する。
    • 字幕データが無視されます。EPGStationの字幕表示機能で字幕が表示されなくなります。

@renren13
Copy link
Author

ご回答ありがとうございます。
無事解決いたしました。
心より感謝いたします。

こちらの問題は、FFmpeg側の対策、アップデート待ちというの状況と理解しておりますがよろしいのでしょうか?

@advancedbear
Copy link
Contributor

f5735db にて -map 0 オプションが削除されたので、現時点でのEPGStationでは発生しない不具合のはずですが、根本原因としてはFFmpeg側の問題なので、そちらの正式リリース待ちですかね。

アップデート待ちという言い方もどうかなと思っていて、 @renren13 さんがご利用になっていた ffmpeg version git-2019-05-26-fc0de1c バージョンはいわゆるNightly build(=開発中バージョン)なので、コレを常用しようとしている事自体がそもそも間違いかなぁと。

常用目的ではmasterブランチではなくrelease/n.nブランチを利用するように解説していない、FFmpegのCompilationGuide側(や日本語解説サイト)にも問題はあると思いますが……。
少なくとも、現時点での最新リリース版(FFmpeg 4.1.3)では発生しない不具合です。

@renren13
Copy link
Author

renren13 commented Jun 1, 2019

そうなのですね、常用利用するのであれば開発中バージョンは避けるべきですよね。

お察しだとは思いますが私自身Linuxという環境に慣れていなく、その中解説サイトなどを参考にそのまま導入していった結果だと反省しております。
この度はご教授誠にありがとうございました。

こちらのコメントで閉じさせていただきます。誠にありがとうございました。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants