]> git.sesse.net Git - casparcg/commitdiff
[ffmpeg] Recompiled FFmpeg on Linux with --enable-libv4l2 and allow it to be used...
authorHelge Norberg <helge.norberg@svt.se>
Tue, 4 Oct 2016 10:49:10 +0000 (12:49 +0200)
committerHelge Norberg <helge.norberg@svt.se>
Tue, 4 Oct 2016 10:49:10 +0000 (12:49 +0200)
dependencies64/ffmpeg/bin/linux/libavcodec.so.56.41.100
dependencies64/ffmpeg/bin/linux/libavdevice.so.56.4.100
dependencies64/ffmpeg/bin/linux/libavfilter.so.5.16.101
dependencies64/ffmpeg/bin/linux/libavformat.so.56.36.100
dependencies64/ffmpeg/bin/linux/libavutil.so.54.27.100
dependencies64/ffmpeg/bin/linux/libpostproc.so.53.3.100
dependencies64/ffmpeg/bin/linux/libswresample.so.1.2.100
dependencies64/ffmpeg/bin/linux/libswscale.so.3.1.101
modules/ffmpeg/producer/ffmpeg_producer.cpp
modules/ffmpeg/producer/input/input.cpp

index 958a7d5bc2d928883773ab5aff35697ffe68047c..7deae83ecd97c33f09bcead32e6beae7593f5abb 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libavcodec.so.56.41.100 and b/dependencies64/ffmpeg/bin/linux/libavcodec.so.56.41.100 differ
index ce0f4f3c9aef6d0ced3e468557b747eec3ee462b..e6d2edabd725bc51b75a64a45bdd9013a9ea23fb 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libavdevice.so.56.4.100 and b/dependencies64/ffmpeg/bin/linux/libavdevice.so.56.4.100 differ
index 68e0d543780ea8c89ff55077646701e91d3ac9ab..2ff28ca7cefb53627d348c3abc4aa3ab77c8c949 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libavfilter.so.5.16.101 and b/dependencies64/ffmpeg/bin/linux/libavfilter.so.5.16.101 differ
index 9c6eca11085acd107aef417cfbcd8365632a1992..058ff926a7c76b62cd5175006d9a21de58eb0f12 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libavformat.so.56.36.100 and b/dependencies64/ffmpeg/bin/linux/libavformat.so.56.36.100 differ
index 6b63bb149d0c4f0dbc3c79c1b374e8d1eaaf0de8..fad830991b9c24d76b66fc85440d6950eac320d1 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libavutil.so.54.27.100 and b/dependencies64/ffmpeg/bin/linux/libavutil.so.54.27.100 differ
index 2a183634c28d0fe72525a91c34c15216b0007651..47ab16f0325a94a361204343b8c598d2d3753f57 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libpostproc.so.53.3.100 and b/dependencies64/ffmpeg/bin/linux/libpostproc.so.53.3.100 differ
index 5aa68b334f03f7120c1a1d1db2e50afd0b1849a5..14e55c7bac2ba7d50e90e4c6823e3c89ac969386 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libswresample.so.1.2.100 and b/dependencies64/ffmpeg/bin/linux/libswresample.so.1.2.100 differ
index d094ab7719049a5f7902b652c60f1c5daa6186e6..8fc4a85b37726a19678f9682354ac892f97808bb 100755 (executable)
Binary files a/dependencies64/ffmpeg/bin/linux/libswscale.so.3.1.101 and b/dependencies64/ffmpeg/bin/linux/libswscale.so.3.1.101 differ
index 79b68d9f4ed59127bbf2960416fbefb69e9e3a1f..8c098e26709dceab648642265bc60eaf6c8965e0 100644 (file)
@@ -565,7 +565,7 @@ void describe_producer(core::help_sink& sink, const core::help_repository& repo)
                ->text(L"H.264, FLV, WMV and several audio codecs as well as uncompressed audio.");
        sink.definitions()
                ->item(L"clip", L"The file without the file extension to play. It should reside under the media folder.")
-               ->item(L"url", L"If clip contains :// it is instead treated as the URL parameter. The URL can either be any streaming protocol supported by FFmpeg or dshow://video={webcam_name}.")
+               ->item(L"url", L"If clip contains :// it is instead treated as the URL parameter. The URL can either be any streaming protocol supported by FFmpeg, dshow://video={webcam_name} or v4l2://{video device}.")
                ->item(L"loop", L"Will cause the media file to loop between start and start + length")
                ->item(L"start", L"Optionally sets the start frame. 0 by default. If loop is specified this will be the frame where it starts over again.")
                ->item(L"length", L"Optionally sets the length of the clip. If not specified the clip will be played to the end. If loop is specified the file will jump to start position once this number of frames has been played.")
@@ -583,7 +583,8 @@ void describe_producer(core::help_sink& sink, const core::help_repository& repo)
        sink.example(L">> PLAY 1-10 folder/clip CHANNEL_LAYOUT film", L"given the defaults in casparcg.config this will specifies that the clip has 6 audio channels of the type 5.1 and that they are in the order FL FC FR BL BR LFE regardless of what ffmpeg says.");
        sink.example(L">> PLAY 1-10 folder/clip CHANNEL_LAYOUT \"5.1:LFE FL FC FR BL BR\"", L"specifies that the clip has 6 audio channels of the type 5.1 and that they are in the specified order regardless of what ffmpeg says.");
        sink.example(L">> PLAY 1-10 rtmp://example.com/live/stream", L"to play an RTMP stream.");
-       sink.example(L">> PLAY 1-10 \"dshow://video=Live! Cam Chat HD VF0790\"", L"to use a web camera as video input.");
+       sink.example(L">> PLAY 1-10 \"dshow://video=Live! Cam Chat HD VF0790\"", L"to use a web camera as video input on Windows.");
+       sink.example(L">> PLAY 1-10 v4l2:///dev/video0", L"to use a web camera as video input on Linux.");
        sink.para()->text(L"The FFmpeg producer also supports changing some of the settings via ")->code(L"CALL")->text(L":");
        sink.example(L">> CALL 1-10 LOOP 1");
        sink.example(L">> CALL 1-10 START 10");
index 72648037d8d9704374ebaacf0e3ee89d3dc3394e..445306f2121583abf06ca73d1124f054291edfdf 100644 (file)
@@ -252,17 +252,21 @@ struct input::implementation : boost::noncopyable
 
                auto resource_name                      = std::wstring();
                auto parts                                      = caspar::protocol_split(url_or_file);
+               auto protocol                           = parts.at(0);
+               auto path                                       = parts.at(1);
                AVInputFormat* input_format     = nullptr;
 
-               if (parts.at(0).empty())
-                       resource_name = parts.at(1);
-               else if (parts.at(0) == L"dshow")
+               static const std::set<std::wstring> PROTOCOLS_TREATED_AS_FORMATS = { L"dshow", L"v4l2" };
+
+               if (protocol.empty())
+                       resource_name = path;
+               else if (PROTOCOLS_TREATED_AS_FORMATS.find(protocol) != PROTOCOLS_TREATED_AS_FORMATS.end())
                {
-                       input_format = av_find_input_format("dshow");
-                       resource_name = parts.at(1);
+                       input_format = av_find_input_format(u8(protocol).c_str());
+                       resource_name = path;
                }
                else
-                       resource_name = parts.at(0) + L"://" + parts.at(1);
+                       resource_name = protocol + L"://" + path;
 
                AVFormatContext* weak_context = nullptr;
                THROW_ON_ERROR2(avformat_open_input(&weak_context, u8(resource_name).c_str(), input_format, &format_options), resource_name);