Decode Error

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

Decode Error

Hu Saijun
Hi,dear friends, recently I have a task which need cut the long videos to many segments. The concrete code I used as follow:

1.      First I convert all video to mpeg4 codec. Use
[cid:image001.png@01D53569.052114F0]

2.      Second I cut the video in a simple python script. Use
[cid:image002.png@01D53569.647DEC70]

3.      Then when I decode the video, try to extract some i-frames and MVs,I got a error..
[cid:image003.png@01D53569.F5AEF5E0]



The mpeg4 header seems to be damaged. But use the potplayer to play it's ok. So I want know the problem. thanks a lot.

_______________________________________________
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".

image001.png (12K) Download Attachment
image002.png (13K) Download Attachment
image003.png (122K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Decode Error

kumowoon1025
> On Jul 7, 2019, at 8:51 PM, Hu Saijun <[hidden email]> wrote:
>
> Hi,dear friends, recently I have a task which need cut the long videos to many segments. The concrete code I used as follow:
>
> 1.      First I convert all video to mpeg4 codec. Use
> [cid:image001.png@01D53569.052114F0]
>
> 2.      Second I cut the video in a simple python script. Use
> [cid:image002.png@01D53569.647DEC70]
>
> 3.      Then when I decode the video, try to extract some i-frames and MVs,I got a error..
> [cid:image003.png@01D53569.F5AEF5E0]

Is there a reason for transcoding to mpeg4 and then splitting? If you transcode them as separate segments in the first place, I don’t think you will see this issue (codec copying and splitting mpeg4 might be the problem). Something like:

ffmpeg -ss ${start} -to ${end} -i ${inname} -vf scale=340:256,setsar=1:1 -q:v 1 -c:v mpeg4 ${output1}

and repeat for however many cuts you need to make.

P.S. It’s preferable to paste the command and output as text rather attach an image of them
_______________________________________________
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
|

答复: Decode Error

Hu Saijun
Well ,thanks very much ! it sounds a good idea to it together.

-----邮件原件-----
发件人: ffmpeg-user <[hidden email]> 代表 Ted Park
发送时间: 2019年7月8日 10:45
收件人: FFmpeg user questions <[hidden email]>
主题: Re: [FFmpeg-user] Decode Error

> On Jul 7, 2019, at 8:51 PM, Hu Saijun <[hidden email]> wrote:
>
> Hi,dear friends, recently I have a task which need cut the long videos to many segments. The concrete code I used as follow:
>
> 1.      First I convert all video to mpeg4 codec. Use
> [cid:image001.png@01D53569.052114F0]
>
> 2.      Second I cut the video in a simple python script. Use
> [cid:image002.png@01D53569.647DEC70]
>
> 3.      Then when I decode the video, try to extract some i-frames and MVs,I got a error..
> [cid:image003.png@01D53569.F5AEF5E0]

Is there a reason for transcoding to mpeg4 and then splitting? If you transcode them as separate segments in the first place, I don’t think you will see this issue (codec copying and splitting mpeg4 might be the problem). Something like:

ffmpeg -ss ${start} -to ${end} -i ${inname} -vf scale=340:256,setsar=1:1 -q:v 1 -c:v mpeg4 ${output1}

and repeat for however many cuts you need to make.

P.S. It’s preferable to paste the command and output as text rather attach an image of them _______________________________________________
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".
_______________________________________________
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".