Using mencoder to record a video - webcam

I'm trying to use mencoder to record a video. The following command was taken from an online tutorial:
mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o filename.avi
The output is as follows:
MEncoder SVN-r37379 (C) 2000-2015 MPlayer Team
210 audio & 441 video codecs
success: format: 9 data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski#zpr.uni-koeln.de>
comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was used instead.
Selected device: UVC Camera (046d:0825)
Capabilities: video capture streaming
supported norms:
inputs: 0 = Camera 1;
Current input: 0
Current format: YUYV
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn't got a tuner!
Unable to open '/dev/dsp': No such file or directory
Unable to open '/dev/dsp': No such file or directory
Unable to open '/dev/dsp': No such file or directory
v4l2: ioctl set mute failed: Invalid argument
v4l2: 0 frames successfully processed, 0 frames dropped.
============ Sorry, this file format is not recognized/supported =============
=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===
Cannot open demuxer.
Exiting...
user#ArchBox:~/Dropbox$ mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:ade[15838:17998:0117/045341:ERROR:cert_verify_proc_nss.cc(922)] CERT_PKIXVerifyCert for api.tldr.io failed err=-8181
How do I address these errors?

Some more information about your system would be helpful.
As far as i know, /dev/dsp should be your oss device.
At first you should check the correct device.
ls /dev/dsp*
On my system, it's /dev/dsp0
If you use the alsa sound system, check your cards with
cat /proc/asound/cards
and change the command tosomething like
alsa:adevice=plughw.1,0
This site could also be helpful:
https://wiki.ubuntuusers.de/Videograbbing/

Related

Gstreamer Playbin fails to play video on Virtual Machine

I have hard time getting the playbin element working on a VM. When I run the pipeline:
gst-launch-1.0 playbin uri=https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm
I get the following error:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'source': gst.soup.session=context, session=(SoupSession)NULL, force=(boolean)false;
Got context from element 'sink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'playsink': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Redistribute latency...
ERROR: from element /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstGLImageSinkBin:glimagesinkbin0/GstGLColorConvertElement:glcolorconvertelement0: Failed to convert video buffer
Additional debug info:
gstglcolorconvertelement.c(218): gst_gl_color_convert_element_prepare_output_buffer (): /GstPlayBin:playbin0/GstPlaySink:playsink/GstBin:vbin/GstGLImageSinkBin:glimagesinkbin0/GstGLColorConvertElement:glcolorconvertelement0
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...
Does anyone know why the element glcolorconvertelement0 fails to convert the video buffer?
I'm currently working on a VM with xubuntu (18.04.1), with the last gstreamer pakage installed (1.14.1).
Additional info: I've got the same error also when I try to play a local .mp4 file. Outside of the VM it all works just fine.
Thanks to you all
I managed to figure it out. It's as simple as changing the (virtual) video card on the VM Screen settings.
VM Screen Settings

Fastlane upload to crashlytics fails with error fetching remote file

My Error :
Fastlane upload to crashlytics fails with the following error :
[12:59:37]: Error fetching remote file: Exit status of command 'unzip
'C:/Users/xxxx/Library/CrashlyticsAndroid/crashlytics-devtools.zip' -d
'C:/Users/xxxx/Library/CrashlyticsAndroid'' was 2 instead of 0.
Archive: C:/Users/xxxx/Library/CrashlyticsAndroid/crashlytics-devtools.zip
warning [C:/Users/xxxx/Library/CrashlyticsAndroid/crashlytics-devtools.zip]: 30829 extra bytes at beginning or within zipfile (attempting to process anyway)
file #1: bad zipfile offset (local header sig): 30829 (attempting to re-compensate)
inflating:
C:/Users/xxxx/Library/CrashlyticsAndroid/crashlytics_build.xml
error: invalid compressed data to inflate bad CRC 00000000 (should
be 313e1340)
file #2: bad zipfile offset (local header sig): 839 (attempting to re-compensate)
file #2: bad zipfile offset (local header sig): 839
file #3: bad zipfile offset (local header sig): 34909
Fastlane env : my fastlane environment is here https://github.com/fastlane/fastlane/issues/12161
fastlane is not officially supported on Windows (yet). My suggestion is to do this on macOS. (I also commented this on your GitHub issue).
Download the zip from here and extract where fastlane fails to unzip crashlytics-devtools.zip.
For me the path is C:/Users/{your-user}/Library/CrashlyticsAndroid/crashlytics-devtools.zip

affdex VideoDetector failed to open a mp4 file

I'm new to the library and I'm writing a program to analyze videos following the tutorial. Here is my code snippet:
detector = new VideoDetector(24);
detector.setClassifierPath(classifierPath);
detector.setImageListener(this);
detector.setDetectAllExpressions(true);
detector.setDetectAllEmotions(true);
detector.setDetectAllEmojis(true);
detector.setDetectAllAppearances(true);
detector.setDetectAge(true);
detector.setDetectEthnicity(true);
detector.start();
detector.process("path to the video file");
I got the following exception:
Error opening video file:
Source: __cdecl FileVideoCapture::FileVideoCapture(const class boost::filesystem::path &,const float)(C:\Jenkins\workspace\affdexface-win64\src\modules\utils\FileVideoCapture.cpp LINE 12)
I'm not sure where does the "C:\Jenkins\workspace\" part come from? Could anyone help me?
Thanks!
Can you paste more information on the codec of the video file. Here are couple of ways in which you can find the codec information.
Can you verify the version of opencv_ffmpeg*.dll? In the SDK installer under Affectiva->AffdexSDK->bin we include either opencv_ffmpeg248 or opencv_ffmpeg248_64.dll based on x86 or x64. Can you verify that you are getting the error using the dll that is shipped?
Did you convert the video to a different file format using ffmpeg and then re-run the application?

Orthanc Pacs Server and dcm4che3 ToolKit command findscu

I install an Orthanc Server (PACS) with WebGui, and upload a few dicoms from osirix dicom sample. I have a some problem with command findscu from package dcm4che3. When I called /findscu -c TEST#127.0.0.1:4242 -m PatientName="WRIX" , I have an error:
org.dcm4che3.net.AssociationStateException: Sta1 - Idle
at org.dcm4che3.net.State.writeAReleaseRQ(State.java:223)
at org.dcm4che3.net.Association.release(Association.java:271)
at org.dcm4che3.tool.findscu.FindSCU.close(FindSCU.java:463)
at org.dcm4che3.tool.findscu.FindSCU.main(FindSCU.java:380)
in orthanc log:
E0713 16:20:51.875545 main.cpp:180] Unknown remote DICOM modality AET: "FINDSCU"
E0713 16:20:51.875589 CommandDispatcher.cpp:776] Find requests are disallowed for the AET "FINDSCU"
E0713 16:20:51.875603 CommandDispatcher.cpp:852] DIMSE failure (aborting association): DIMSE Caller passed in an illegal association
I think I need to add in orthanc.json FINDSCU how ?
You must declare your modality FINDSCUin the DicomModalitiesoption of the configuration file of Orthanc, otherwise Orthanc will refuse to answer for security reasons. More information is available in the Orthanc Book, in the section entitled "Understanding DICOM with Orthanc".

making VLC play external stream using VB.net

Hi I would like to programmatically make VLC play a video stream. I dont want to embed VLC just make it play. Normally I start VLC to play a local file like this
System.Diagnostics.Process.Start("VLC.exe", link to local file)
when I try the same process but supplying a vid stream I get an error saying the file cant be found.
System.Diagnostics.Process.Start("VLC.exe", "https://www.youtube.com/watch?v=y2C_3swE9sQ&list=PLrEnWoR732-BHrPp_Pm8_VleD68f9s14-&index=37")
It is supposed to be possible as per the instruction on VLC website:
To receive a HTTP stream, start VLC with : % vlc http://www.example.org/your_file.mpg but I can't seam to get it done.
Could someone point me in the right dirrection?
Your code works perfectly with VLC 2.2.1 which is the latest version.
To avoid The system cannot find the file specified error is better specify complete path of executable:
System.Diagnostics.Process.Start(
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe",
"https://www.youtube.com/watch?v=y2C_3swE9sQ&list=PLrEnWoR732-BHrPp_Pm8_VleD68f9s14-&index=37"
)
If you can't upgrade please note that this isn't a VB.NET problem but an incompatibility between new YouTube format and old versions of VLC: google vlc youtube.lua fix for a possible solution (not tested).