VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. Freelance scientist Chemist116's Avatar
    Join Date
    May 2017
    Location
    Perú
    Search Comp PM
    I need help to get a code for capture video and audio from my Avermedia video card. I've read the documentation here. But I don't get the idea very clear. If possible I need to tell ffmpeg to get data from the card (audio and video) and record it as mpg and to specify a reasonable file size. Let's say using the library libx264 and crf 18 or 24. Can somebody help me?.
    Quote Quote  
  2. Member Bernix's Avatar
    Join Date
    Apr 2016
    Location
    Europe
    Search Comp PM
    Hi,
    I believe there is a way to do this in VLC player. But default it is setup to capture whole multiplex. To change it go to Preference - on the bottom show all then look for input/codecs and disable Prefer native stream recording. Save. Restart Vlc, open your station (you should prepare playlist with tv's multiplexes frequencies).
    Press record and video should be in user\videos\something.mpg
    Isn't better to compress the video afterwards, when editing? Remove start, commercials, end?

    Not answered ffmpeg OP quesiton

    Bernix
    Quote Quote  
  3. I use something like:

    Code:
    @SETLOCAL
    @IF EXIST "folder where ffmpeg is located eg C:\FFMPEG" SET PATH=%PATH%;"folder where ffmpeg is located eg C:\FFMPEG"
    @set OUTDIR=camera
    @if not exist ..\%cd%\%OUTDIR% (mkdir ..\%cd%\%OUTDIR%)
    
    @set SAVESTAMP=%DATE:/=-%_%TIME::=-%
    @set SAVESTAMP=%SAVESTAMP:.=-%
    
    @rem echo Possible presets: ultrafast superfast veryfast faster fast medium slow slower veryslow placebo
    @rem echo Possible tunes: film animation grain stillimage psnr ssim fastdecode zerolatency
    @echo Time start is: %SAVESTAMP%
    
    @rem set devce="HP Webcam [2 MP]"
    @rem set vidsiz=1600x1200
    
    @set devce="Philips PCVC750K Camera; Video"
    @set vidsiz=640x480
    
    @SET x264opts="level=4.0:qp=18:qpmin=4:cabac=1:threads=auto:nr=500:no-psnr:no-ssim"
    
    @echo If everything is OK then starting in 2 seconds...
    @CHOICE /T:Y,2
    
    @ffmpeg -rtbufsize 512M -video_size %vidsiz% -f dshow -i video=%devce% -c:v libx264 -preset faster -tune fastdecode -x264opts %x264opts% -x264-params %x264opts% -vf "hqdn3d=8:8:8:8,decimate=cycle=2,drawtext='fontfile=Envy_Code_R_Bold.ttf:fontsize=24:fontcolor=black@0.9:box=1:boxcolor=white:boxborderw=8:x=(w-tw)/2:y=8+th:text=%%{localtime\: %%d\\\/%%m\\\/%%y %%H\\\:%%M\\\:%%S }',format='pix_fmts=yuv420p'" -shortest -movflags faststart -y -f mp4 "%cd%\%OUTDIR%\camera_%SAVESTAMP%.mp4"
    
    @ENDLOCAL
    @Pause
    To detect your capture devices and supported capture size (plus other parameters) use something like:
    Code:
    ffmpeg -list_devices true -f dshow -i dummy
    Then query once again but instead using dummy you must use device name with something like:
    Code:
    ffmpeg -list_options true -f dshow -i video="Your Video Device"
    H.264 encoding is purely up to you, same as additional filtering consider scripts provided above as working template. I was able to record video with mediocre computer for many hours and file size was acceptable - as you can see - two different capture devices was used - this explain why single script has two different capture devices and video size.

    Good luck.
    Quote Quote  



Similar Threads