<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пн, 7 нояб. 2022 г., 21:27 Terje J. Hanssen <<a href="mailto:terjejhanssen@gmail.com">terjejhanssen@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    <br>
    <br>
    <div>Den 07.11.2022 18:58, skrev Andrew
      Randrianasulu:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div><br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">пн, 7 нояб. 2022 г., 20:50
              Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com" target="_blank" rel="noreferrer">randrianasulu@gmail.com</a>>:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div><br>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">пн, 7 нояб. 2022
                      г., 20:30 Andrew Randrianasulu <<a href="mailto:randrianasulu@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">randrianasulu@gmail.com</a>>:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="auto">
                        <div><br>
                          <br>
                          <div class="gmail_quote">
                            <div dir="ltr" class="gmail_attr">пн, 7
                              нояб. 2022 г., 19:40 Andrew Randrianasulu
                              <<a href="mailto:randrianasulu@gmail.com" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">randrianasulu@gmail.com</a>>:<br>
                            </div>
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                              <div dir="auto">
                                <div><br>
                                  <br>
                                  <div class="gmail_quote">
                                    <div dir="ltr" class="gmail_attr">пн,
                                      7 нояб. 2022 г., 19:10 Andrew
                                      Randrianasulu <<a href="mailto:randrianasulu@gmail.com" rel="noreferrer noreferrer
                                        noreferrer noreferrer noreferrer" target="_blank">randrianasulu@gmail.com</a>>:<br>
                                    </div>
                                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                      <div dir="auto">Because old
                                        thread  now a bit too big for
                                        mobile gmail  client.</div>
                                    </blockquote>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Yes, I also discovered that and thougt we should continue on another
    thread<br>
    (though Thunderbird/IMAP on my Ultrabook had no problems)<br>
    <br>
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div>
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div>
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="auto">
                        <div>
                          <div class="gmail_quote">
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                              <div dir="auto">
                                <div>
                                  <div class="gmail_quote">
                                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                      <div dir="auto">
                                        <div dir="auto"><br>
                                        </div>
                                        <div dir="auto">Yes, I'll try to
                                          see if it fails same way on my
                                          end. </div>
                                        <div dir="auto"><br>
                                        </div>
                                        <div dir="auto">code seems to
                                          check first 100 frames</div>
                                        <div dir="auto"><br>
                                        </div>
                                        <div dir="auto"><br>
                                        </div>
                                        <div dir="auto">
                                          <div dir="auto">2528 static
                                            int
                                            field_probe(AVFormatContext
                                            *fmt_ctx, AVStream *st)</div>
                                          <div dir="auto">2529 {</div>
                                          <div dir="auto">2530 
                                             AVDictionary *copts = 0;</div>
                                          <div dir="auto">2531 
                                             //av_dict_copy(&copts,
                                            opts, 0);</div>
                                          <div dir="auto">2532 
                                             AVCodecID codec_id =
                                            st->codecpar->codec_id;</div>
                                          <div dir="auto">2533 #if
                                            LIBAVCODEC_VERSION_INT <=
                                            AV_VERSION_INT(58,134,100)</div>
                                          <div dir="auto">2534   AVCodec
                                            *decoder =
                                            avcodec_find_decoder(codec_id);</div>
                                          <div dir="auto">2535 #endif</div>
                                          <div dir="auto">2536 #if
                                            LIBAVCODEC_VERSION_INT >=
                                            AV_VERSION_INT(59,16,100)</div>
                                          <div dir="auto">2537   const
                                            AVCodec *decoder =
                                            avcodec_find_decoder(codec_id);</div>
                                          <div dir="auto">2538 #endif</div>
                                          <div dir="auto">2539 
                                             AVCodecContext *ctx =
                                            avcodec_alloc_context3(decoder);</div>
                                          <div dir="auto">2540   if(
                                            !ctx ) {</div>
                                          <div dir="auto">2541   
                                             fprintf(stderr,"codec alloc
                                            failed\n");</div>
                                          <div dir="auto">2542   
                                             return -1;</div>
                                          <div dir="auto">2543   }</div>
                                          <div dir="auto">2544 
                                             avcodec_parameters_to_context(ctx,
                                            st->codecpar);</div>
                                          <div dir="auto">2545   if(
                                            avcodec_open2(ctx, decoder,
                                            &copts) < 0 ) {</div>
                                          <div dir="auto">2546   
                                             fprintf(stderr,"codec open
                                            failed\n");</div>
                                          <div dir="auto">2547   
                                             return -1;</div>
                                          <div dir="auto">2548   }</div>
                                          <div dir="auto">2549 
                                             av_dict_free(&copts);</div>
                                          <div dir="auto">2550 </div>
                                          <div dir="auto">2551   AVFrame
                                            *ipic = av_frame_alloc();</div>
                                          <div dir="auto">2552 
                                             AVPacket ipkt;</div>
                                          <div dir="auto">2553 
                                             av_init_packet(&ipkt);</div>
                                          <div dir="auto">2554   int
                                            ilaced = -1;</div>
                                          <div dir="auto">2555   for(
                                            int retrys=100;
                                            --retrys>=0 &&
                                            ilaced<0; ) {</div>
                                          <div dir="auto">2556   
                                             av_packet_unref(&ipkt);</div>
                                          <div dir="auto">2557     int
                                            ret = av_read_frame(fmt_ctx,
                                            &ipkt);</div>
                                          <div dir="auto">2558     if(
                                            ret == AVERROR_EOF ) break;</div>
                                          <div dir="auto">2559     if(
                                            ret != 0 ) continue;</div>
                                          <div dir="auto">2560     if(
                                            ipkt.stream_index !=
                                            st->index ) continue;</div>
                                          <div dir="auto">2561     if(
                                            !ipkt.data || !ipkt.size )
                                            continue;</div>
                                          <div dir="auto">2562     ret =
                                            avcodec_send_packet(ctx,
                                            &ipkt);</div>
                                          <div dir="auto">2563     if(
                                            ret < 0 ) {</div>
                                          <div dir="auto">2564     
                                             fprintf(stderr,
                                            "avcodec_send_packet
                                            failed\n");</div>
                                          <div dir="auto">2565     
                                             break;</div>
                                          <div dir="auto">2566     }</div>
                                          <div dir="auto">2567     ret =
                                            avcodec_receive_frame(ctx,
                                            ipic);</div>
                                          <div dir="auto">2568     if(
                                            ret >= 0 ) {</div>
                                          <div dir="auto">2569     
                                             ilaced =
                                            ipic->interlaced_frame ?
                                            1 : 0;</div>
                                          <div dir="auto">2570     
                                             break;</div>
                                          <div dir="auto">2571     }</div>
                                          <div dir="auto">2572     if(
                                            ret != AVERROR(EAGAIN) )</div>
                                          <div dir="auto">2573     
                                             fprintf(stderr,
                                            "avcodec_receive_frame
                                            failed %d\n", ret);</div>
                                          <div dir="auto">2574   }</div>
                                          <div dir="auto">2575 
                                             av_packet_unref(&ipkt);</div>
                                          <div dir="auto">2576 
                                             av_frame_free(&ipic);</div>
                                          <div dir="auto">2577 
                                             avcodec_free_context(&ctx);</div>
                                          <div dir="auto">2578   return
                                            ilaced;</div>
                                          <div dir="auto"><br>
                                          </div>
                                          <div dir="auto">may be we can
                                            add flags to force
                                            interlaced vs progressive to
                                            bdwrite ... and/or debug why
                                            it fails.</div>
                                          <div dir="auto"><br>
                                          </div>
                                        </div>
                                      </div>
                                    </blockquote>
                                  </div>
                                </div>
                                <div dir="auto"><br>
                                </div>
                                <div dir="auto">sorry, not m2t or m2ts
                                  files were found on my main harddrive,
                                  so blind shot!</div>
                                <div dir="auto"><br>
                                </div>
                                <div dir="auto">Terje, can you recompile
                                  bdwrite with attached patch and see if
                                  it improves situation?</div>
                              </div>
                            </blockquote>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    I hope to avoid recompiling my ultrabook, where I just have
    installed the CinGG appimage<br>
     <br>
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div>
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div>
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="auto">
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto"><br>
                        </div>
                        <div dir="auto">err, I think second patch also
                          needed, because ilace in bdwrite is just
                          1/0/-1 not more detailed.</div>
                      </div>
                    </blockquote>
                  </div>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">finally found m2t file, for me bdwrite
                  does not complain but resulting file is unplayable</div>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    Note:<br>
    I just used the short m2t file you linked to; maybe it is to short
    for interlace probe?<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">may be! try to cp it under few different names then cat them together to get longer file?</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
     <br>
    <blockquote>
      <div dir="auto">this one contain real very short hdv sample with
        mp2 sound</div>
      <a href="http://twenkid.com/os/3.m2t" target="_blank" rel="noreferrer">http://twenkid.com/os/3.m2t</a><br>
    </blockquote>
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div>
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div dir="auto"><br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">note I used -b switch for new mkudffs so
                  it works with 2048 blocks and not default 512 <br>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    I used the plain manual step 3 without -b, as also used for 2048
    blocks in the sample step 2 ?<br>
    I 'll do a new attempt with -b and reort the result<br>
    <br>
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div>
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div dir="auto"><br>
                </div>
                <div dir="auto">root@slax:/tmp# mkudffs -b 2048
                  /tmp/newfilename.udfs 25915           
                   filename=/tmp/newfilename.udfs                       
                              label=LinuxUDF                           
                                                uuid=6369651cdf849fbf   
                                                               
                  blocksize=2048                                       
                                    blocks=25915                       
                                                      udfrev=2.01       
                                                                       </div>
                <div dir="auto">start=0, blocks=16, type=ERASE         
                                                start=16, blocks=4,
                  type=VRS                                           
                  start=20, blocks=76, type=ERASE                       
                                start=96, blocks=16, type=MVDS         
                                            start=112, blocks=16,
                  type=ERASE                              start=128,
                  blocks=4, type=LVID                               
                  start=132, blocks=124, type=ERASE                     
                    start=256, blocks=1, type=ANCHOR            </div>
                <div dir="auto">start=257, blocks=25400, type=PSPACE   
                    start=25657, blocks=1, type=ERASE    </div>
                <div dir="auto">start=25658, blocks=1, type=ANCHOR     
                                          start=25659, blocks=69,
                  type=ERASE                               start=25728,
                  blocks=16, type=RVDS                               
                   start=25744, blocks=170, type=ERASE                 
                            start=25914, blocks=1, type=ANCHOR         
                                       </div>
                <div dir="auto">root@slax:/tmp# mount -o loop
                  /tmp/newfilename.udfs /mnt/test           </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">root@slax:/tmp# bdwrite /mnt/test
                  /home/guest/20081103140154.m2t        </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">root@slax:/tmp# umount /mnt/test<br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">playing result in many</div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">root@slax:/tmp# mplayer -vo null
                  br://tmp/newfilename.udfs            </div>
                <div dir="auto">  MPlayer UNKNOWN-11.2.0 (C) 2000-2022
                  MPlayer Team           </div>
                <div dir="auto"> do_connect: could not connect to
                  socket                         connect: No such file
                  or directory                 </div>
                <div dir="auto"> Failed to open LIRC support. You will
                  not be able to use your remote control.               
                                                                       
                                                                       
                                 Playing br://tmp/newfilename.udfs.     
                                                 The hostname option
                  must be an integer: tmp              Struct bluray,
                  field hostname parsing error: tmp           
                   libavformat version 59.33.100 (internal)             
                               bluray.c:707: Skipping broken unit at 0 
                                              bluray.c:255: 00000.m2ts:
                  no timestamp for SPN 0 (got 0). clip
                  46909800-47511000.                                   
                     bluray.c:707: Skipping broken unit at 0           
                                    bluray.c:707: Skipping broken unit
                  at 6144                        bluray.c:255:
                  00000.m2ts: no timestamp for SPN 0 (got 0). clip
                  46909800-47511000.                                   
                     bluray.c:707: Skipping broken unit at 0           
                                     bluray.c:707: Skipping broken unit
                  at 6144                     bluray.c:707: Skipping
                  broken unit at 12288                    bluray.c:707:
                  Skipping broken unit at 18432                   
                  bluray.c:707: Skipping broken unit at 24576<br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">{and so on}</div>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">on the other hand reencoding audio like this</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">root@slax:/tmp# ffmpeg -i
          /home/guest/20081103140154.m2t -c:v copy -c:a ac3 -b:a 384k
          2008.m2ts<br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">and repeating steps with mkudffs / mount
          /bdwrite /umount resulted in working in mplayer file!</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">I have 'old' 4.4 ffmpeg, so no bluray encoding
          for me.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">also, I used wcalc as console calc</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="auto">
                <div dir="auto"><br>
                </div>
                <div dir="auto"><br>
                </div>
                <div dir="auto">
                  <div class="gmail_quote">
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="auto">
                        <div dir="auto">
                          <div class="gmail_quote">
                            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                              <div dir="auto">
                                <div dir="auto"><br>
                                </div>
                                <div dir="auto"><br>
                                </div>
                                <div dir="auto">
                                  <div class="gmail_quote">
                                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                      <div dir="auto">
                                        <div dir="auto">
                                          <div dir="auto"><br>
                                          </div>
                                        </div>
                                      </div>
                                    </blockquote>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div></div></div>