Encoding .png images with h264 to a file on disk

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Encoding .png images with h264 to a file on disk

laddoe
Hi there,

Can somebody help me to find out why I end up with a file on disk that is only 24 kb and not readable by vlc or so, while I send valid YUV images to the codec. I have added the  .h and .cpp file. Up till "avcodec_receive_packet" everything seems to be OK. The function call "avcodec_send_frame" returns 0, so that must be OK but "avcodec_receive_packet" returns -11. If I flush the encoder (currently commented) then "avcodec_receive_packet"  returns 0 and I can see encoded data if I store it on disk. Also the input image to the encoder is also correct (currently commented) and checked. I'm aiming for an intra-frame encoding, so I should get the encoded frame data back, but I don't get anything back even if I send 24 images to it.

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

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

moviecodec.cpp (11K) Download Attachment
moviecodec.h (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Encoding .png images with h264 to a file on disk

laddoe
Is there anyone who can help me with my question I posted a couple of days ago with subject "Encoding .png images with h264 to a file on disk" ?
________________________________
Van: ffmpeg-user <[hidden email]> namens laddoe <[hidden email]>
Verzonden: donderdag 18 februari 2021 01:27
Aan: [hidden email] <[hidden email]>
Onderwerp: [FFmpeg-user] Encoding .png images with h264 to a file on disk

Hi there,

Can somebody help me to find out why I end up with a file on disk that is only 24 kb and not readable by vlc or so, while I send valid YUV images to the codec. I have added the  .h and .cpp file. Up till "avcodec_receive_packet" everything seems to be OK. The function call "avcodec_send_frame" returns 0, so that must be OK but "avcodec_receive_packet" returns -11. If I flush the encoder (currently commented) then "avcodec_receive_packet"  returns 0 and I can see encoded data if I store it on disk. Also the input image to the encoder is also correct (currently commented) and checked. I'm aiming for an intra-frame encoding, so I should get the encoded frame data back, but I don't get anything back even if I send 24 images to it.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

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

Re: Encoding .png images with h264 to a file on disk

Carl Eugen Hoyos-2
Am So., 21. Feb. 2021 um 12:24 Uhr schrieb laddoe <[hidden email]>:
>
> Is there anyone who can help me with my question I posted a couple of
> days ago with subject "Encoding .png images with h264 to a file on disk" ?

Did you read https://ffmpeg.org/contact.html#MailingLists ?
You are more likely to receive an answer on the libav-user mailing list.

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

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