[Libav-user] Request for Help - Error - h264_v4l2m2m @ 0x114ac00] Could not find a valid device

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] Request for Help - Error - h264_v4l2m2m @ 0x114ac00] Could not find a valid device

libav-users mailing list
Dear All,

I am trying to use ffmpeg source code top encode video streams in linux. I used the code provided in this link https://ffmpeg.org/doxygen/3.2/muxing_8c_source.html to encode videos.

I got an error, when the code accessed the function ret = avcodec_open2(c, codec, &opt);

[h264_v4l2m2m @ 0x114ac00] Could not find a valid device
[h264_v4l2m2m @ 0x114ac00] can't configure encoder

May I know, why I get this error and how I could solve this?

Regards,

Adhuran.

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Error - h264_v4l2m2m @ 0x114ac00] Could not find a valid device

Richard Hussong
You need a V4L2 video device to use that encoder. If you haven't already done this, run "ls -l /dev/video*", and make sure there is a video device and you have permission to write to it. If that doesn't help, you should raise the logging level of libav and see if it tells you what went wrong.

- Richard


On Tue, Oct 8, 2019 at 1:22 PM Adhuran Adhuran via Libav-user <[hidden email]> wrote:
Dear All,

I am trying to use ffmpeg source code top encode video streams in linux. I used the code provided in this link https://ffmpeg.org/doxygen/3.2/muxing_8c_source.html to encode videos.

I got an error, when the code accessed the function ret = avcodec_open2(c, codec, &opt);

[h264_v4l2m2m @ 0x114ac00] Could not find a valid device
[h264_v4l2m2m @ 0x114ac00] can't configure encoder

May I know, why I get this error and how I could solve this?

Regards,

Adhuran.
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Error - h264_v4l2m2m @ 0x114ac00] Could not find a valid device

libav-users mailing list
Thank you very much.

Could you tell how I would be able to link x264 encoder for H264 and not v4l4m2m. To invoke x264 encoder with the source code.

Thanks in advance,

Kind Regards,

Adhuran

Sent from my Samsung Galaxy S9 - Powered by Three


From: Richard Hussong <[hidden email]>
Sent: Tuesday, October 8, 2019 6:46:26 PM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <[hidden email]>
Cc: Adhuran, Jayasingam (PG/R - Elec Electronic Eng) <[hidden email]>
Subject: Re: [Libav-user] Request for Help - Error - h264_v4l2m2m @ 0x114ac00] Could not find a valid device
 
You need a V4L2 video device to use that encoder. If you haven't already done this, run "ls -l /dev/video*", and make sure there is a video device and you have permission to write to it. If that doesn't help, you should raise the logging level of libav and see if it tells you what went wrong.

- Richard


On Tue, Oct 8, 2019 at 1:22 PM Adhuran Adhuran via Libav-user <[hidden email]> wrote:
Dear All,

I am trying to use ffmpeg source code top encode video streams in linux. I used the code provided in this link https://ffmpeg.org/doxygen/3.2/muxing_8c_source.html to encode videos.

I got an error, when the code accessed the function ret = avcodec_open2(c, codec, &opt);

[h264_v4l2m2m @ 0x114ac00] Could not find a valid device
[h264_v4l2m2m @ 0x114ac00] can't configure encoder

May I know, why I get this error and how I could solve this?

Regards,

Adhuran.
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Request for Help - Error - h264_v4l2m2m @ 0x114ac00] Could not find a valid device

Richard Hussong
I think you want the "libx264" encoder. To use it, you need to install libx264, and your libav libraries need to have been built with the "enable-libx264" flag. It is enabled by default in most distributions, I think. The libx264 encoder has a lot of options; you should probably just pick one of its presets and use that. The accepted answer to this old post shows how you can do that using av_dict_set(): https://stackoverflow.com/questions/19146587/how-do-you-enable-veryfast-libx264-preset-from-code-using-libavcodec

- Richard

On Tue, Oct 8, 2019 at 1:58 PM Adhuran Adhuran <[hidden email]> wrote:
Thank you very much.

Could you tell how I would be able to link x264 encoder for H264 and not v4l4m2m. To invoke x264 encoder with the source code.

Thanks in advance,

Kind Regards,

Adhuran

Sent from my Samsung Galaxy S9 - Powered by Three


From: Richard Hussong <[hidden email]>
Sent: Tuesday, October 8, 2019 6:46:26 PM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <[hidden email]>
Cc: Adhuran, Jayasingam (PG/R - Elec Electronic Eng) <[hidden email]>
Subject: Re: [Libav-user] Request for Help - Error - h264_v4l2m2m @ 0x114ac00] Could not find a valid device
 
You need a V4L2 video device to use that encoder. If you haven't already done this, run "ls -l /dev/video*", and make sure there is a video device and you have permission to write to it. If that doesn't help, you should raise the logging level of libav and see if it tells you what went wrong.

- Richard


On Tue, Oct 8, 2019 at 1:22 PM Adhuran Adhuran via Libav-user <[hidden email]> wrote:
Dear All,

I am trying to use ffmpeg source code top encode video streams in linux. I used the code provided in this link https://ffmpeg.org/doxygen/3.2/muxing_8c_source.html to encode videos.

I got an error, when the code accessed the function ret = avcodec_open2(c, codec, &opt);

[h264_v4l2m2m @ 0x114ac00] Could not find a valid device
[h264_v4l2m2m @ 0x114ac00] can't configure encoder

May I know, why I get this error and how I could solve this?

Regards,

Adhuran.
_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".

_______________________________________________
Libav-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/libav-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".