VLC screen:// wont produce a file using :sout= - vlc

Why won't this produce a file? It does everything right but saving to an actual file .. I am using Linux, Vlc 1.1.9, compiled without skins2, qt or ncurses interfaces...
vlc :sout=#transcode{vcodec=mp4,acodec=mp4a,vb=800,scale=1}:std{access=file,mux=mp4,dst="~/file.mp4"} screen:// screen-fps=12 screen-caching=100
Note this also does the same thing - shows the screen:// fine, but will not output to a file:
vlc :sout=#transcode{vcodec=h264,acodec=none,vb=800}:std{access=file,mux=avi,dst="/root/file.avi"} screen:// screen-fps=12 screen-caching=100

Try this
vlc -vvv (PORT (UDP, HTTP)) --ts-dump-file video.ts and add more commands
vlc -vvv (PORT (UDP, HTTP)) --sout-all file/ogg,mpg,ts:filename and add more commands
Thats above code shuld work!

Related

vlc command line: -vv and -vvv give zero detail

I am chasing a command line vlc conversion (mp4 and wav to mp3) . The problem is that vlc creates a zero byte output file.
I have tried the -vv and -vvv options, hoping vlc would give me a hint about what is going on, but the presence of these switches does nothing.
How to get some hints from vlc?
Example command line:
vlc.exe -I -vvv dummy "c:\temp\test\arc\test.aac" --sout=#transcode{acodec=mp3,ab=48,channels=2,samplerate=192000}:standard{access=file,mux=ts,dst="C:\data\personal\test\cardbuilding\audio-files\hinative\test2.mp3"} vlc://quit
OK, found out how to get detailed logging for VLC when it runs from a command line.
Open VLC interactively
Tools | Preferences | All (radio at bottom)
Advanced | Logger
Turn on logging, set file, set detail level
Close VLC
Now when you use the vlc.exe command line, you will get a log.
Alternate method (better, as all control remains on the cmd line, but not yet tested by me):
vlc --file-logging --logfile abc.txt --log-verbose 3
(where 3 = Debug)
That is the good news.
The bad news is... at least in my case, the logged information is not helping me figure out the problem.

Using vlc command line for capture device frin a network URL

I'm trying to capture a video using vlc.
The procedure is standard using the GUI :
enter the url e.g http://some_site_some_video.mp4/playlist.m3u8 in the network protocol capture device tool (ctrl+n) in the next screen enter the path so save the file and that's it.
Tried using VLC docs, and the closest command I found was vlc -I dummy -vvv input_stream --sout
but
vlc -I dummy -vvv http://some_site_some_video.mp4/playlist.m3u8 --sout home/me/videos
Didn't work.
Is it the right command to use?

alsa://hw:1,0 is not accessible before login to KDE (Kubuntu 14.04)

I have an audio stream
cvlc -vvv alsa://hw:1,0 --sout '#transcode{acodec=mp3,ab=128}:standard{access=http,mux=ogg,dst=192.168.0.106:8081}'
and it works if i logged in KDE, but if i see login window (where you need to type password kde login) i cannot open alsa device.
I got
vlc cannot open MRL 'alsa://hw:1,0'.
Is it possible to have access to alsa without login to KDE?
Any suggestions are welcomed.
alsa is KDE independent; before logging in, from a console (ctrl+alt+F1) use this command: aplay -l, it will show all audio devices; I think kde has some script to change the soundcard stack

VLC recording rtsp stream

I have a problem with recording rtsp stream with VLC player. Actually my method works in MacOS X, but doesn't in Windows. Command line:
vlc -vvv rtsp://admin:admin#192.168.0.151/live/h264/ --sout="#transcode{vcodec=mp4v,vfilter=canvas{width=800,height=600}}:std{access=file,mux=mp4,dst=C:\123.mp4}"
On MacOS it works fine, but under Windows it creates unreadable file. MediaInfo output:
General
Complete name : C:\123.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 1.08 MiB
Any suggestions?
Seems like your destination URL is not correct. Try this:
vlc -vvv rtsp://admin:admin#192.168.0.151/live/h264/ --sout="#transcode{vcodec=mp4v,vfilter=canvas{width=800,height=600}}:std{access=file,mux=mp4,dst=C:\\123.mp4}"
For Linux users, ffmpeg alone works straight away.
If you want to watch the stream while recording, write to a .mkv instead of a .mp4.
This example will overwrite the file video.mp4 in your home folder without asking due to the -y param, and the original codecs are kept.
ffmpeg -i rtsp://192.168.42.1/live -vcodec copy -acodec copy -y ~/video.mp4
NB: This example url is for an Ambarella Xiaomi Mijia 4K camera, like many wifi ip cameras, you have to activate the stream via telnet first, for this particular model the command to be sent before reading the stream via rtsp://:
echo '{"msg_id":257,"token":0}' | telnet 192.168.42.1 7878

start capturing with command line in libpcap format

I try to start capturing with Wireshark using command line but the default output file is pcap extension but Wireshark - pcapng file type and I need libpcap file type.
My command is
tshark.exe" -i interfacenumber -W MyFile.pcap
I also tried
tshark.exe" -i 1 -F libpcap -W MyFile.pcap
and in this case no file created on my disk although I can see the packets in the command line window
tshark.exe -i 1 -F libpcap -w MyFile.pcap`
is the right answer (note the lower case 'w').
(-W does something different. There's lot's of tshark options, so you need to look carefully at the tshark -h output to make sure you're using the right option).
Since the -F libpcap option is not working for me either, I'm using another command line tool in the same directory:
editcap -F libpcap currentFile.pcap(ng) libpcapConvertedFile.pcap where "currentFile.whatever" is the pcapng-formatted file and "libpcapConvertedFile.whatever" is the outputted legacy libpcap format.
I run this once tshark is done capturing the original file.
I think that in the newest Wireshark versions (1.8.x or 1.10.x) you cannot start capturing in libpcap format and the default format is pcapng (also pcap extension - try to use verion 1.6.x)
That's what solve my problem
http://www.wireshark.org/download/win64/all-versions/
http://www.wireshark.org/download/win32/all-versions/

Resources