CasparCG / server

CasparCG Server is a Windows and Linux software used to play out professional graphics, audio and video to multiple outputs. It has been in 24/7 broadcast production since 2006. Ready-to-use downloads are available under the Releases tab https://casparcg.com.
GNU General Public License v3.0
904 stars 269 forks source link

Ffmpeg consumer video filters ignored #1057

Closed PeterAkakpo closed 6 years ago

PeterAkakpo commented 6 years ago

Expected Behaviour

Video filters should be applied to both FILE and STREAM command.

Current Behaviour

Applying filters like -vcodec, -acodec, -vf, -preset, including their short versions, do not work. You get a message saying that those options were unused. All these options works fine in version 2.1

Steps to Reproduce

Start casparcg server 2.2 and play a video. Now issue a command like ADD 1-99 FILE rec.mp4 -vcodec libx264. Or ADD 1-99 FILE rec.mp4 -c:v libx264 or

Environment

Attachments

TKooijmans commented 6 years ago

I Noticed this to with all 2.2 build sofar...

pkeuter commented 6 years ago

Because all the parameters you mention are the shorthand versions. And as @baltedewit has already mentioned here: https://github.com/CasparCG/server/issues/984#issuecomment-385640417, you cannot use these anymore. Try using -codec:video for example.

TKooijmans commented 6 years ago

do you have a list of examples of the long versions? Does this also work for streaming settings?

PeterAkakpo commented 6 years ago

Can someone point me to an ffmpeg link that documents these long versions of ffmpeg options? From my Search, I am yet to come across any document that talks about an option like "-codec:video". If this is casparcg specific, then I think a full documentation of these options should be made available. There's been too much silence on this issue.

mint-dewit commented 6 years ago

FFmpeg officially deprecated them, they have not made full a full list available unfortunately. You should request this list upstream. It may be such that other applications are ignoring the deprecation of these options, but it's technically not an issue with CasparCG. Just a documentation issue in FFmpeg.

There's been too much silence on this issue.

Because this is a duplicate issue.

PeterAkakpo commented 6 years ago

@baltedewit , the issue that you referred to for which this is a duplicate is not even getting the necessary response.

pkeuter commented 6 years ago

@PeterAkakpo If you find a full list of commands, you're welcome to make a PR for the wiki!

PeterAkakpo commented 6 years ago

What is the rational behind the usage of depreciated ffmpeg option in this new version of casparcg. Any reason why the current ffmpeg options are not suitable for caspacg 2.2

mint-dewit commented 6 years ago

What is the rational behind the usage of depreciated ffmpeg option in this new version of casparcg.

The short hand parameters are deprecated and no longer accepted. By ditching them we are thus not using deprecated options.

Any reason why the current ffmpeg options are not suitable for caspacg 2.2

The short hand parameters are not suitable because they are deprecated and will eventually be removed from ffmpeg.

TKooijmans commented 6 years ago

I don't have problems with other longer options, but what are they? With CasperCG2.1 I could create a live stream with this, ADD 1 STREAM rtmp://media.omroepgelderland.nl/live/zwaluwtest -pix_fmts yuv420p -format flv -vcodec libx264 -crf 28 -vf scale=1280:720 -c:a libvo_aacenc -b:a 96k -tune film -preset veryfast

now with CasperCG 2.2 nothing works anymore. How can I do this now? Please show above options with the longer format FFmpeg

example 2 I like to record a mp4 file with following parameters, (works with CasperCG 2.1) -pix_fmt yuv420p -vcodec libx264 -preset ultrafast -tune film -crf 24 -x264opts tff=1 How do we do this with CasperCG2.2? What string needs to be send to the server to get a file like this?

dimitry-ishenko commented 6 years ago

@PeterAkakpo @TKooijmans This should answer your questions: http://bfy.tw/JO8Z Skip sections 3 and 4 before you get overwhelmed. You can refer to them as needed if you need to clarify anything from other sections.

TKooijmans commented 6 years ago

I tried this but got nothing working sofar, Is there anyone who gets the libx264 options working?

Please try, ADD 1 FILE "myfile.mp4 -codec:video libx264" according FFmpeg documentation, this shoud work ADD 1 FILE "myfile.mp4 -c:v libx264 -crf=25" I also tried ADD 1 FILE "myfile.mp4 -codec:v libx264 -crf=25" even with the simple libx264 command a error occur (unable to find a suitable outputformat.. , please see this log

2018-08-14 11:39:37.382] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -codec:v libx264 -crf=25"\r\n [2018-08-14 11:39:37.382] [info] ffmpeg[myfile.mp4 -codec:v libx264 -crf=25] Initialized. [2018-08-14 11:39:37.382] [error] [ffmpeg] [NULL @ 0000000042AD5D00] Unable to find a suitable output format for 'myfile.mp4 -codec:v libx264 -crf=25' [2018-08-14 11:39:37.382] [error]
[2018-08-14 11:39:37.382] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:39:37.382] [error] [ffmpeg] [NULL @ 0000000042AD5D00] Unable to find a suitable output format for 'myfile.mp4 -codec:v libx264 -crf=25' [2018-08-14 11:39:37.382] [error]
[2018-08-14 11:39:37.385] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:39:37.385] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:39:37.385] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:39:37.385] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:39:37.385] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:39:37.385] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:39:37.385] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:39:37.385] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:39:37.385] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:39:37.385] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:39:37.385] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:39:37.385] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:39:37.385] [error]
[2018-08-14 11:39:37.385] [error]

[2018-08-14 11:39:37.385] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:39:37.385] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:39:37.385] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:39:37.385] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:39:37.385] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:39:37.385] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:39:37.385] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:39:37.385] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:39:37.385] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:39:37.385] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:39:37.385] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:39:37.385] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:39:37.385] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:39:37.385] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:39:37.385] [error]
[2018-08-14 11:39:37.416] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:39:37.416] [info] ffmpeg[myfile.mp4 -codec:v libx264 -crf=25] Uninitialized. [2018-08-14 11:40:03.174] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -codec:v libx264"\r\n [2018-08-14 11:40:03.174] [info] ffmpeg[myfile.mp4 -codec:v libx264] Initialized. [2018-08-14 11:40:03.174] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:40:03.174] [error] [ffmpeg] [NULL @ 0000000018F888C0] Unable to find a suitable output format for 'myfile.mp4 -codec:v libx264' [2018-08-14 11:40:03.174] [error]
[2018-08-14 11:40:03.174] [error] [ffmpeg] [NULL @ 0000000018F888C0] Unable to find a suitable output format for 'myfile.mp4 -codec:v libx264' [2018-08-14 11:40:03.174] [error]
[2018-08-14 11:40:03.185] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:40:03.185] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:40:03.185] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:40:03.185] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:40:03.185] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:40:03.185] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:40:03.185] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:40:03.185] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:40:03.185] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:40:03.185] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:40:03.185] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:40:03.185] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:40:03.185] [error]
[2018-08-14 11:40:03.185] [error]

[2018-08-14 11:40:03.185] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:40:03.185] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:40:03.185] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:40:03.185] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:40:03.185] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:40:03.185] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:40:03.185] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:40:03.185] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:40:03.185] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:40:03.185] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:40:03.185] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:40:03.185] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:40:03.185] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:40:03.185] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:40:03.185] [error]
[2018-08-14 11:40:03.216] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:40:03.216] [info] ffmpeg[myfile.mp4 -codec:v libx264] Uninitialized. [2018-08-14 11:40:27.341] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -c:v libx264"\r\n [2018-08-14 11:40:27.342] [info] ffmpeg[myfile.mp4 -c:v libx264] Initialized. [2018-08-14 11:40:27.342] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:40:27.342] [error] [ffmpeg] [NULL @ 00000000343B4940] Unable to find a suitable output format for 'myfile.mp4 -c:v libx264' [2018-08-14 11:40:27.342] [error]
[2018-08-14 11:40:27.342] [error] [ffmpeg] [NULL @ 00000000343B4940] Unable to find a suitable output format for 'myfile.mp4 -c:v libx264' [2018-08-14 11:40:27.342] [error]
[2018-08-14 11:40:27.345] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:40:27.345] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:40:27.345] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:40:27.345] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:40:27.345] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:40:27.345] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:40:27.345] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:40:27.345] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:40:27.345] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:40:27.345] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:40:27.345] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:40:27.345] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:40:27.345] [error]
[2018-08-14 11:40:27.345] [error]

[2018-08-14 11:40:27.345] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:40:27.345] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:40:27.345] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:40:27.345] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:40:27.345] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:40:27.345] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:40:27.345] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:40:27.345] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:40:27.345] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:40:27.345] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:40:27.345] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:40:27.345] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:40:27.345] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:40:27.345] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:40:27.345] [error]
[2018-08-14 11:40:27.377] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:40:27.377] [info] ffmpeg[myfile.mp4 -c:v libx264] Uninitialized. [2018-08-14 11:40:58.694] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -codec:v libx264"\r\n [2018-08-14 11:40:58.694] [info] ffmpeg[myfile.mp4 -codec:v libx264] Initialized. [2018-08-14 11:40:58.694] [error] [ffmpeg] [NULL @ 0000000021855D80] Unable to find a suitable output format for 'myfile.mp4 -codec:v libx264' [2018-08-14 11:40:58.694] [error]
[2018-08-14 11:40:58.694] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:40:58.694] [error] [ffmpeg] [NULL @ 0000000021855D80] Unable to find a suitable output format for 'myfile.mp4 -codec:v libx264' [2018-08-14 11:40:58.694] [error]
[2018-08-14 11:40:58.705] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:40:58.705] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:40:58.705] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:40:58.705] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:40:58.705] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:40:58.705] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:40:58.705] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:40:58.705] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:40:58.705] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:40:58.705] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:40:58.705] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:40:58.705] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:40:58.705] [error]
[2018-08-14 11:40:58.705] [error]

[2018-08-14 11:40:58.705] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:40:58.705] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:40:58.705] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:40:58.705] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:40:58.705] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:40:58.705] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:40:58.705] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:40:58.705] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:40:58.705] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:40:58.705] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:40:58.705] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:40:58.705] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:40:58.705] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:40:58.705] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:40:58.705] [error]
[2018-08-14 11:40:58.737] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:40:58.737] [info] ffmpeg[myfile.mp4 -codec:v libx264] Uninitialized. [2018-08-14 11:41:28.565] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 codec:v libx264"\r\n [2018-08-14 11:41:28.566] [info] ffmpeg[myfile.mp4 codec:v libx264] Initialized. [2018-08-14 11:41:28.566] [error] [ffmpeg] [NULL @ 0000000021A22400] Unable to find a suitable output format for 'myfile.mp4 codec:v libx264' [2018-08-14 11:41:28.566] [error]
[2018-08-14 11:41:28.566] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:41:28.566] [error] [ffmpeg] [NULL @ 0000000021A22400] Unable to find a suitable output format for 'myfile.mp4 codec:v libx264' [2018-08-14 11:41:28.566] [error]
[2018-08-14 11:41:28.585] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:41:28.585] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:41:28.585] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:41:28.585] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:41:28.585] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:41:28.585] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:41:28.585] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:41:28.585] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:41:28.585] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:41:28.585] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:41:28.585] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:41:28.585] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:41:28.585] [error]
[2018-08-14 11:41:28.585] [error]

[2018-08-14 11:41:28.585] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:41:28.585] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:41:28.585] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:41:28.585] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:41:28.585] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:41:28.585] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:41:28.585] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:41:28.585] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:41:28.585] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:41:28.585] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:41:28.585] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:41:28.585] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:41:28.585] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:41:28.585] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:41:28.585] [error]
[2018-08-14 11:41:28.618] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:41:28.619] [info] ffmpeg[myfile.mp4 codec:v libx264] Uninitialized. [2018-08-14 11:41:38.461] [info] Received message from 127.0.0.1: REMOVE 1 FILE "myfile.mp4 codec:v libx264"\r\n [2018-08-14 11:41:38.461] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:41:38.462] [info] ffmpeg[myfile.mp4 codec:v libx264] Uninitialized. [2018-08-14 11:41:38.462] [info] Sent message to 127.0.0.1:202 REMOVE OK\r\n [2018-08-14 11:49:42.640] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -c:v libx264"\r\n [2018-08-14 11:49:42.640] [info] ffmpeg[myfile.mp4 -c:v libx264] Initialized. [2018-08-14 11:49:42.640] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:49:42.640] [error] [ffmpeg] [NULL @ 00000000150AA740] Unable to find a suitable output format for 'myfile.mp4 -c:v libx264' [2018-08-14 11:49:42.640] [error]
[2018-08-14 11:49:42.641] [error] [ffmpeg] [NULL @ 00000000150AA740] Unable to find a suitable output format for 'myfile.mp4 -c:v libx264' [2018-08-14 11:49:42.641] [error]
[2018-08-14 11:49:42.648] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:49:42.648] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:49:42.648] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:49:42.648] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:49:42.648] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:49:42.648] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:49:42.648] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:49:42.648] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:49:42.648] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:49:42.648] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:49:42.648] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:49:42.648] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:49:42.648] [error]
[2018-08-14 11:49:42.648] [error]

[2018-08-14 11:49:42.648] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:49:42.648] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:49:42.648] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:49:42.648] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:49:42.648] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:49:42.648] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:49:42.648] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:49:42.648] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:49:42.648] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:49:42.648] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:49:42.648] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:49:42.648] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:49:42.648] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:49:42.648] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:49:42.648] [error]
[2018-08-14 11:49:42.678] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:49:42.679] [info] ffmpeg[myfile.mp4 -c:v libx264] Uninitialized. [2018-08-14 11:52:27.820] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -codec:video libx264"\r\n [2018-08-14 11:52:27.820] [info] ffmpeg[myfile.mp4 -codec:video libx264] Initialized. [2018-08-14 11:52:27.820] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:52:27.820] [error] [ffmpeg] [NULL @ 00000000154707C0] Unable to find a suitable output format for 'myfile.mp4 -codec:video libx264' [2018-08-14 11:52:27.820] [error]
[2018-08-14 11:52:27.820] [error] [ffmpeg] [NULL @ 00000000154707C0] Unable to find a suitable output format for 'myfile.mp4 -codec:video libx264' [2018-08-14 11:52:27.820] [error]
[2018-08-14 11:52:27.838] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:52:27.838] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:52:27.838] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:52:27.838] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:52:27.838] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:52:27.838] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:52:27.838] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:52:27.838] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:52:27.838] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:52:27.838] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:52:27.838] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:52:27.838] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:52:27.838] [error]
[2018-08-14 11:52:27.838] [error]

[2018-08-14 11:52:27.838] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:52:27.838] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:52:27.838] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:52:27.838] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:52:27.838] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:52:27.838] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:52:27.838] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:52:27.838] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:52:27.838] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:52:27.838] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:52:27.838] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:52:27.838] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:52:27.838] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:52:27.838] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:52:27.838] [error]
[2018-08-14 11:52:27.869] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:52:27.869] [info] ffmpeg[myfile.mp4 -codec:video libx264] Uninitialized. [2018-08-14 11:56:22.442] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -c:v libx264 -crf=25"\r\n [2018-08-14 11:56:22.442] [info] ffmpeg[myfile.mp4 -c:v libx264 -crf=25] Initialized. [2018-08-14 11:56:22.442] [error] [ffmpeg] [NULL @ 0000000018F85A40] Unable to find a suitable output format for 'myfile.mp4 -c:v libx264 -crf=25' [2018-08-14 11:56:22.442] [error]
[2018-08-14 11:56:22.442] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:56:22.442] [error] [ffmpeg] [NULL @ 0000000018F85A40] Unable to find a suitable output format for 'myfile.mp4 -c:v libx264 -crf=25' [2018-08-14 11:56:22.442] [error]
[2018-08-14 11:56:22.455] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:56:22.455] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:56:22.455] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:56:22.455] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:56:22.455] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:56:22.455] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:56:22.455] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:56:22.455] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:56:22.455] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:56:22.455] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:56:22.455] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:56:22.455] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:56:22.455] [error]
[2018-08-14 11:56:22.455] [error]

[2018-08-14 11:56:22.455] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:56:22.455] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:56:22.455] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:56:22.455] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:56:22.455] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:56:22.455] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:56:22.455] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:56:22.455] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:56:22.455] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:56:22.455] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:56:22.455] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:56:22.455] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:56:22.455] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:56:22.455] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:56:22.455] [error]
[2018-08-14 11:56:22.485] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:56:22.485] [info] ffmpeg[myfile.mp4 -c:v libx264 -crf=25] Uninitialized. [2018-08-14 11:58:23.460] [info] Received message from 127.0.0.1: ADD 1 FILE "myfile.mp4 -c:v libx265 -x265-params crf=26:psy-rd=1"\r\n [2018-08-14 11:58:23.461] [info] ffmpeg[myfile.mp4 -c:v libx265 -x265-params crf=26:psy-rd=1] Initialized. [2018-08-14 11:58:23.461] [info] Sent message to 127.0.0.1:202 ADD OK\r\n [2018-08-14 11:58:23.461] [error] [ffmpeg] [NULL @ 0000000023886500] Unable to find a suitable output format for 'myfile.mp4 -c:v libx265 -x265-params crf=26:psy-rd=1' [2018-08-14 11:58:23.461] [error]
[2018-08-14 11:58:23.461] [error] [ffmpeg] [NULL @ 0000000023886500] Unable to find a suitable output format for 'myfile.mp4 -c:v libx265 -x265-params crf=26:psy-rd=1' [2018-08-14 11:58:23.461] [error]
[2018-08-14 11:58:23.464] [error] Exception: C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\modules\ffmpeg\consumer\ffmpeg_consumer.cpp(553): Throw in function auto __cdecl caspar::ffmpeg::ffmpeg_consumer::initialize::::operator ()(void) const [2018-08-14 11:58:23.464] [error] Dynamic exception type: class boost::exception_detail::clone_impl [2018-08-14 11:58:23.464] [error] [struct boost::errinfo_apifunction __ptr64] = avformat_alloc_output_context2( &oc, nullptr, !format.empty() ? format.cstr() : nullptr, path.c_str()) [2018-08-14 11:58:23.464] [error] [struct boost::errinfoerrno ptr64] = 22, "Invalid argument" [2018-08-14 11:58:23.464] [error] [struct caspar::tag_stacktrace_info * ptr64] = 0# 0x000000013F8797CE in casparcg [2018-08-14 11:58:23.464] [error] 1# 0x000000013F8A8B70 in casparcg [2018-08-14 11:58:23.464] [error] 2# 0x000000013FA4F6A0 in casparcg [2018-08-14 11:58:23.464] [error] 3# 0x000000013FA51D80 in casparcg [2018-08-14 11:58:23.464] [error] 4# 0x000000013F8744E9 in casparcg [2018-08-14 11:58:23.464] [error] 5# crt_at_quick_exit in ucrtbase [2018-08-14 11:58:23.464] [error] 6# BaseThreadInitThunk in kernel32 [2018-08-14 11:58:23.464] [error] 7# RtlUserThreadStart in ntdll [2018-08-14 11:58:23.464] [error]
[2018-08-14 11:58:23.464] [error]

[2018-08-14 11:58:23.464] [error] 0# 0x000000013F8797CE in casparcg [2018-08-14 11:58:23.464] [error] 1# 0x000000013F8790FF in casparcg [2018-08-14 11:58:23.464] [error] 2# 0x000000013FD49897 in casparcg [2018-08-14 11:58:23.464] [error] 3# _C_specific_handler in VCRUNTIME140 [2018-08-14 11:58:23.464] [error] 4# _TypeMatch in VCRUNTIME140 [2018-08-14 11:58:23.464] [error] 5# RtlRestoreContext in ntdll [2018-08-14 11:58:23.464] [error] 6# 0x000000013F9664AA in casparcg [2018-08-14 11:58:23.464] [error] 7# 0x000000013F966EE5 in casparcg [2018-08-14 11:58:23.464] [error] 8# 0x000000013F942495 in casparcg [2018-08-14 11:58:23.464] [error] 9# 0x000000013F9454A0 in casparcg [2018-08-14 11:58:23.464] [error] 10# 0x000000013F8744E9 in casparcg [2018-08-14 11:58:23.464] [error] 11# crt_at_quick_exit in ucrtbase [2018-08-14 11:58:23.464] [error] 12# BaseThreadInitThunk in kernel32 [2018-08-14 11:58:23.464] [error] 13# RtlUserThreadStart in ntdll [2018-08-14 11:58:23.464] [error]
[2018-08-14 11:58:23.495] [warning] Assertion Failed: counter < 8 file:C:\Program Files (x86)\Jenkins\workspace\casparcg-server-dep\master\src\core\consumer\frame_consumer.cpp line:96 [2018-08-14 11:58:23.495] [info] ffmpeg[myfile.mp4 -c:v libx265 -x265-params crf=26:psy-rd=1] Uninitialized.

TKooijmans commented 6 years ago

I also tried this with Casper Client, it send this to the server ADD 1 FILE "Output.mp4" -vcodec libx264 -preset ultrafast the server replies also with unused options. So I think FFmpeg settings are not passed through the right way.

dimitry-ishenko commented 6 years ago

@TKooijmans I don't have a working 2.2 setup (and probably won't until it stabilizes), so I am shooting in the dark here, but I don't think you want the quotes in your commands. Try these without quotes:

ADD 1 FILE myfile.mp4 -codec:v libx264 -crf:v 25
TKooijmans commented 6 years ago

I used the quotes to be able to use spaces in filenames. If I try this ADD 1 FILE "myfile.mp4" -codec:v libx264 -b:v 8000k -preset:v fast -tune:v fastdecode I can set the bitrate, but CPU load is very high during recording. 100% versus 25% with CasperCG2.1 It seems you have to add :v or :a after each command to get it accepted. this works and gives a HD 50P 422 mp4 with 8mbit bitrate with ac audio 128k ADD 1 FILE "myfile 1.mp4" -codec:v libx264 -crf:v 23 -preset:v veryfast -codec:a aac -b:a 128k -ar:a 48k in this example pix_fmt420 is ignored ADD 1 FILE "myfile 1.mp4" -pix_fmt:v yuv420p -codec:v libx264 -crf:v 31 -preset:v ultrafast -codec:a aac -b:a 128k -ar:a 48k Futhermore capture rate is always 50P while my channel setting 1080i50

TKooijmans commented 6 years ago

I also got this working with MXF ADD 1 FILE "Test.mxf" -b:v 35000000 -codec:a pcm_s24le -codec:v mpeg2video -pix_fmt yuv420p -alternate_scan:v 1 -g:v 12 -bf:v 2 -minrate:v 35000k -maxrate:v 35000k -color_primaries:v bt709 -color_trc:v 1 -colorspace:v 1

-pix_fmt yuv420p is ignored however as is -pix_fmt:v yuv420p It's not possible to record interlaced files in 1080i50 format, the file recorder follows the framerate from the output consumer but it's always progressive. Also channel layout=stereo is ignored, above example always records 8 channels audio

ronag commented 6 years ago

pix_fmt is deprecated, use a filter

TKooijmans commented 6 years ago

Ok this works but with both filtersettings combined (I try to capture HD 1080i50) and always 8 audio channels instead of 2. -filter:v format=yuv420p >>> sets format to 420 -filter:v tinterlace=4 >>> sets 50p to 25 fps interlaced topfield first (use a , to combine)

ADD 1 FILE "myfile 1.mp4" -codec:v libx264 -filter:v format=yuv420p,tinterlace=4 -crf:v 23 -preset:v veryfast -codec:a aac -b:a 128k -ar:a 48k

This result in a HD interlaced mp4 file in 420 format. with 8 audio channels MediaInfo still reports progressive however and it takes a nearly 100% CPU load! Width : 1 920 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Constant Frame rate : 25.000 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive

then the test with MXF capture (420 35 mbit) ADD 1 FILE "Test.mxf" -b:v 35000000 -codec:a pcm_s24le -codec:v mpeg2video -filter:v format=yuv420p,tinterlace=4 -alternate_scan:v 1 -g:v 12 -bf:v 2 -minrate:v 35000k -maxrate:v 35000k -color_primaries:v bt709 -color_trc:v 1 -colorspace:v 1

This seems ok except the audio channelmapping. This causes jerky audio with playback, don't know how to fix that.

premultiply commented 6 years ago

You have to set more options and filters to produce the correct output. For example the encoder needs to be told to encode as interlaced, the audio channels need to be routed, the color and videolevel options need to be set correctly, ... Remember that sometimes some options and flags needs to be set explicitly as FFMPEG can not guess what you want to write to your file. You need to lookup all the filters, options and their defaults and add everything needed.

And I would recommend interlace instead of tinterlace.

ronag commented 6 years ago

-filter:v fps=50,interlace,format=yuv420p is going to be faster.

ronag commented 6 years ago

You also need to set -flags:v +ilme+ildct... this is all ffmpeg specific stuff...

TKooijmans commented 6 years ago

examples please folks, this is so much different than with CasperCG 2.1. In the link of FFmpeg documentation most of the stuff does not work with CasperCG2.2. for example -map doesnot work...

PeterAkakpo commented 6 years ago

@TKooijmans ,.i agree, we need example, the explanations are becoming to much

TKooijmans commented 6 years ago

Right now try and error is the way to figure things out.. It saves everyone a lot of time if we have proper complete examples of how to capture

because simple ADD 1 newclip.mp4 does not work anymore...

premultiply commented 6 years ago

https://github.com/CasparCG/server/issues/884

5opr4ni commented 6 years ago

@TKooijmans Hi I am glad you ask all the relevant questions and we should really build an example db for all the new options. Just to make it clear, my sons name is Caspar not Casper => CasparCG ;)

TKooijmans commented 6 years ago

Is that the same as from that little ghost....?

PeterAkakpo commented 5 years ago

i am trying to split my recordings into time segments (30 minutes chunk), but all the segment options are being ignored

the following commands is not working

  1. Add 1-99 FILE c://recordings/%Y%m%d%H%M%S.mp4 -f segment -segment_time 1800 -reset_timestamps 1 -segment_list recordings.csv -strftime 1

the above command worked in version 2.1

2. Add 1-99 FILE c://recordings/%Y%m%d%H%M%S.mp4 -f:v segment -segment_time:v 1800 -reset_timestamps:v 1 -segment_list:v recordings.csv -strftime:v 1

any help will be appreciated

TKooijmans commented 5 years ago

Hi Peter, You can split files too if you just send a new record command to the same file with a different name. This works with v2.1 ADD FILE 1 Recordclip1.mxf after 30 minutes you send ADD FILE 1 Recordclip2.mxf

PeterAkakpo commented 5 years ago

thats a good workaround @TKooijmans , but i prefer the server to handle the auto splitting instead of the client