diff --git a/req_compile/cmdline.py b/req_compile/cmdline.py
index 73ce41f..baf7f1f 100644
--- a/req_compile/cmdline.py
+++ b/req_compile/cmdline.py
@@ -3,7 +3,6 @@ from __future__ import print_function
 
 import argparse
 import datetime
-import itertools
 import logging
 import os
 import shutil
@@ -157,30 +156,39 @@ def _create_req_from_path(path):
     Returns:
 
     """
-    dist = req_compile.metadata.extract_metadata(path)
-    dist.meta = True
+    try:
+        dist = req_compile.metadata.extract_metadata(path)
+    except req_compile.metadata.MetadataError:
+        dist = None
+
     if dist is None:
         raise ValueError(
-            'Input arg "{}" is not directory containing setup.py or requirements file'.format(path))
+            'Input arg "{}" is not directory containing a valid setup.py'.format(path))
     return dist
 
 
-def _create_input_reqs(input_arg):
+def _create_input_reqs(input_arg, extra_sources):
     input_arg = input_arg.strip()
     if input_arg == '-':
         stdin_contents = sys.stdin.readlines()
 
         def _create_stdin_input_req(line):
             try:
-                return _create_input_reqs(line)
+                result = _create_req_from_path(line)
+                extra_sources.append(line)
+                return utils.parse_requirement('{}=={}'.format(*result.to_definition(None)))
             except ValueError:
-                return (utils.parse_requirement(line),)
+                return utils.parse_requirement(line)
 
-        return DistInfo('-', None, list(itertools.chain(*[_create_stdin_input_req(line)
-                                                          for line in stdin_contents])), meta=True)
+        reqs = (_create_stdin_input_req(line.strip())
+                for line in stdin_contents
+                if line.strip())
+        reqs = (req for req in reqs if req is not None)
+        return DistInfo('-', None, reqs, meta=True)
 
     if os.path.isfile(input_arg):
         return RequirementsFile.from_file(input_arg)
+
     return _create_req_from_path(input_arg)
 
 
@@ -211,14 +219,15 @@ def run_compile(input_args,
         else:
             input_args = ('.',)
 
-    input_reqs = [_create_input_reqs(input_arg) for input_arg in input_args]
-    if extra_sources:
-        # Add the sources provided to the search repos
-        repo = MultiRepository(*([SourceRepository(source) for source in extra_sources] + [repo]))
+    input_reqs = [_create_input_reqs(input_arg, extra_sources) for input_arg in input_args]
 
     constraint_reqs = None
     if constraint_files is not None:
-        constraint_reqs = [_create_input_reqs(input_arg) for input_arg in constraint_files]
+        constraint_reqs = [_create_input_reqs(input_arg, extra_sources) for input_arg in constraint_files]
+
+    if extra_sources:
+        # Add the sources provided to the search repos
+        repo = MultiRepository(*([SourceRepository(source) for source in extra_sources] + [repo]))
 
     try:
         results, roots = perform_compile(input_reqs, repo, extras=extras,

req-compile does not handle stdin paths correctly.
When following docs for compiling a group of projects I get the following exception (using req-compile as an example package):

```
(.venv) C:\repos\req-compile>req-candidates --paths-only | req-compile -v
INFO:req_compile.metadata:Extracting metadata for C:\repos\req-compile
DEBUG:req_compile.metadata:Extracting directly from a source directory
INFO:req_compile.metadata:Attempting to fetch metadata from setup.py
DEBUG:req_compile.metadata:Setting root to C:\Users\NATHAN~1\AppData\Local\Temp\tmpuyi0wfb9_NonExtractor_req-compile
INFO:req_compile.metadata:Parsing setup.py setup.py
INFO:req_compile.metadata:Parsing from setup.cfg
Traceback (most recent call last):
  File "C:\repos\req-compile\.venv\Scripts\req-compile-script.py", line 11, in <module>
    load_entry_point('req-compile', 'console_scripts', 'req-compile')()
  File "c:\repos\req-compile\req_compile\cmdline.py", line 407, in compile_main
    run_compile(args.requirement_files,
  File "c:\repos\req-compile\req_compile\cmdline.py", line 214, in run_compile
    input_reqs = [_create_input_reqs(input_arg) for input_arg in input_args]
  File "c:\repos\req-compile\req_compile\cmdline.py", line 214, in <listcomp>
    input_reqs = [_create_input_reqs(input_arg) for input_arg in input_args]
  File "c:\repos\req-compile\req_compile\cmdline.py", line 179, in _create_input_reqs
    return DistInfo('-', None, list(itertools.chain(*[_create_stdin_input_req(line)
TypeError: 'DistInfo' object is not iterable
```
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index 5e50ce9..10c3d8f 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -1,14 +1,17 @@
+import os
+
+import pkg_resources
 import pytest
 
-from req_compile.cmdline import compile_main
-import os
+from six import StringIO
+
+from req_compile.cmdline import compile_main, _create_input_reqs
 
 from req_compile.dists import DistInfo
 from req_compile.repos.findlinks import FindLinksRepository
 from req_compile.repos.pypi import PyPIRepository
 from req_compile.repos.solution import SolutionRepository
 from req_compile.repos.source import SourceRepository
-from req_compile import utils
 
 
 @pytest.fixture
@@ -62,3 +65,41 @@ def test_source_dirs_dont_hit_pypi(mocker, basic_compile_mock):
     compile_main(['source/myproj'])
     perform_compile_args = basic_compile_mock.mock_calls[0][1]
     assert perform_compile_args[0][0].name == 'myproj'
+
+
+@pytest.fixture
+def mock_stdin(mocker):
+    fake_stdin = StringIO()
+
+    def _write(value):
+        fake_stdin.write(value)
+        fake_stdin.seek(0, 0)
+
+    mocker.patch('sys.stdin', fake_stdin)
+    return _write
+
+
+def test_stdin_paths(mock_stdin):
+    """Verify that paths work correctly from stdin"""
+    mono_dir = os.path.join(os.path.dirname(__file__), 'repos', 'monorepo')
+    mono1 = os.path.join(mono_dir, 'pkg1')
+    mono2 = os.path.join(mono_dir, 'pkg2')
+    mono3 = os.path.join(mono_dir, 'subdir', 'pkg3')
+    mock_stdin(mono1 + '\n' + mono2 + '\n' + mono3 + '\n')
+
+    extra_sources = []
+    result = _create_input_reqs('-', extra_sources)
+
+    assert set(extra_sources) == {mono1, mono2, mono3}
+    assert set(result.reqs) == set(pkg_resources.parse_requirements(['pkg1==1.0.0', 'pkg2==2.0.1', 'pkg3==0.0.0']))
+
+
+def test_stdin_reqs(mock_stdin):
+    """Verify that lists of requirements work correctly from stdin, including comment and blank lines"""
+    mock_stdin('pytest\n# Comment\n\npytest-mock\n')
+
+    extra_sources = []
+    result = _create_input_reqs('-', extra_sources)
+
+    assert extra_sources == []
+    assert set(result.reqs) == set(pkg_resources.parse_requirements(['pytest', 'pytest-mock']))

pip install -e .[test]
parse_log_pytest
requirements.txt
pytest
3.6
requirements.txt test-requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astroid==2.11.7
attrs==22.2.0
certifi==2021.5.30
charset-normalizer==2.0.12
dill==0.3.4
idna==3.10
importlib-metadata==4.8.3
iniconfig==1.1.1
isort==5.10.1
lazy-object-proxy==1.7.1
mccabe==0.7.0
mock==5.2.0
packaging==21.3
platformdirs==2.4.0
pluggy==1.0.0
py==1.11.0
pylint==2.13.9
pyparsing==3.1.4
pytest==7.0.1
pytest-mock==3.6.1
-e git+https://github.com/sputt/req-compile.git@28ea4d20fcb788b4b641128f7dc828f5cdd3318b#egg=req_compile
requests==2.27.1
responses==0.17.0
six==1.17.0
tomli==1.2.3
typed-ast==1.5.5
typing_extensions==4.1.1
urllib3==1.26.20
wrapt==1.16.0
zipp==3.6.0

name: req-compile
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astroid==2.11.7
      - attrs==22.2.0
      - charset-normalizer==2.0.12
      - dill==0.3.4
      - idna==3.10
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - isort==5.10.1
      - lazy-object-proxy==1.7.1
      - mccabe==0.7.0
      - mock==5.2.0
      - packaging==21.3
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pylint==2.13.9
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-mock==3.6.1
      - requests==2.27.1
      - responses==0.17.0
      - six==1.17.0
      - tomli==1.2.3
      - typed-ast==1.5.5
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wrapt==1.16.0
      - zipp==3.6.0
prefix: /opt/conda/envs/req-compile

tests/test_cmdline.py::test_stdin_paths tests/test_cmdline.py::test_stdin_reqs
tests/test_cmdline.py::test_multiple_sources tests/test_cmdline.py::test_resolution_order tests/test_cmdline.py::test_source_dirs_dont_hit_pypi
req_compile/cmdline.py
req_compile/cmdline.py